i965: Rename brw_math to gen4_math.
Usually, I try to use "brw" for functions that apply to all generations, and "gen4" for dead end/legacy code that is only used on Gen4-5. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
This commit is contained in:
@@ -277,7 +277,7 @@ void brw_SAMPLE(struct brw_compile *p,
|
|||||||
unsigned simd_mode,
|
unsigned simd_mode,
|
||||||
unsigned return_format);
|
unsigned return_format);
|
||||||
|
|
||||||
void brw_math( struct brw_compile *p,
|
void gen4_math(struct brw_compile *p,
|
||||||
struct brw_reg dest,
|
struct brw_reg dest,
|
||||||
unsigned function,
|
unsigned function,
|
||||||
unsigned msg_reg_nr,
|
unsigned msg_reg_nr,
|
||||||
|
@@ -1828,7 +1828,7 @@ void brw_WAIT (struct brw_compile *p)
|
|||||||
|
|
||||||
/** Extended math function, float[8].
|
/** Extended math function, float[8].
|
||||||
*/
|
*/
|
||||||
void brw_math( struct brw_compile *p,
|
void gen4_math(struct brw_compile *p,
|
||||||
struct brw_reg dest,
|
struct brw_reg dest,
|
||||||
unsigned function,
|
unsigned function,
|
||||||
unsigned msg_reg_nr,
|
unsigned msg_reg_nr,
|
||||||
|
@@ -39,7 +39,7 @@ void brw_math_invert( struct brw_compile *p,
|
|||||||
struct brw_reg dst,
|
struct brw_reg dst,
|
||||||
struct brw_reg src)
|
struct brw_reg src)
|
||||||
{
|
{
|
||||||
brw_math( p,
|
gen4_math(p,
|
||||||
dst,
|
dst,
|
||||||
BRW_MATH_FUNCTION_INV,
|
BRW_MATH_FUNCTION_INV,
|
||||||
0,
|
0,
|
||||||
|
@@ -360,19 +360,19 @@ fs_generator::generate_math_gen4(fs_inst *inst,
|
|||||||
assert(inst->mlen >= 1);
|
assert(inst->mlen >= 1);
|
||||||
|
|
||||||
brw_set_default_compression_control(p, BRW_COMPRESSION_NONE);
|
brw_set_default_compression_control(p, BRW_COMPRESSION_NONE);
|
||||||
brw_math(p, dst,
|
gen4_math(p, dst,
|
||||||
op,
|
op,
|
||||||
inst->base_mrf, src,
|
inst->base_mrf, src,
|
||||||
BRW_MATH_DATA_VECTOR,
|
BRW_MATH_DATA_VECTOR,
|
||||||
BRW_MATH_PRECISION_FULL);
|
BRW_MATH_PRECISION_FULL);
|
||||||
|
|
||||||
if (dispatch_width == 16) {
|
if (dispatch_width == 16) {
|
||||||
brw_set_default_compression_control(p, BRW_COMPRESSION_2NDHALF);
|
brw_set_default_compression_control(p, BRW_COMPRESSION_2NDHALF);
|
||||||
brw_math(p, sechalf(dst),
|
gen4_math(p, sechalf(dst),
|
||||||
op,
|
op,
|
||||||
inst->base_mrf + 1, sechalf(src),
|
inst->base_mrf + 1, sechalf(src),
|
||||||
BRW_MATH_DATA_VECTOR,
|
BRW_MATH_DATA_VECTOR,
|
||||||
BRW_MATH_PRECISION_FULL);
|
BRW_MATH_PRECISION_FULL);
|
||||||
|
|
||||||
brw_set_default_compression_control(p, BRW_COMPRESSION_COMPRESSED);
|
brw_set_default_compression_control(p, BRW_COMPRESSION_COMPRESSED);
|
||||||
}
|
}
|
||||||
@@ -394,11 +394,11 @@ fs_generator::generate_math_g45(fs_inst *inst,
|
|||||||
|
|
||||||
assert(inst->mlen >= 1);
|
assert(inst->mlen >= 1);
|
||||||
|
|
||||||
brw_math(p, dst,
|
gen4_math(p, dst,
|
||||||
op,
|
op,
|
||||||
inst->base_mrf, src,
|
inst->base_mrf, src,
|
||||||
BRW_MATH_DATA_VECTOR,
|
BRW_MATH_DATA_VECTOR,
|
||||||
BRW_MATH_PRECISION_FULL);
|
BRW_MATH_PRECISION_FULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@@ -322,13 +322,13 @@ static void invert_det( struct brw_sf_compile *c)
|
|||||||
/* Looks like we invert all 8 elements just to get 1/det in
|
/* Looks like we invert all 8 elements just to get 1/det in
|
||||||
* position 2 !?!
|
* position 2 !?!
|
||||||
*/
|
*/
|
||||||
brw_math(&c->func,
|
gen4_math(&c->func,
|
||||||
c->inv_det,
|
c->inv_det,
|
||||||
BRW_MATH_FUNCTION_INV,
|
BRW_MATH_FUNCTION_INV,
|
||||||
0,
|
0,
|
||||||
c->det,
|
c->det,
|
||||||
BRW_MATH_DATA_SCALAR,
|
BRW_MATH_DATA_SCALAR,
|
||||||
BRW_MATH_PRECISION_FULL);
|
BRW_MATH_PRECISION_FULL);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -611,13 +611,13 @@ void brw_emit_point_sprite_setup(struct brw_sf_compile *c, bool allocate)
|
|||||||
if (pc_coord_replace) {
|
if (pc_coord_replace) {
|
||||||
set_predicate_control_flag_value(p, c, pc_coord_replace);
|
set_predicate_control_flag_value(p, c, pc_coord_replace);
|
||||||
/* Caculate 1.0/PointWidth */
|
/* Caculate 1.0/PointWidth */
|
||||||
brw_math(&c->func,
|
gen4_math(&c->func,
|
||||||
c->tmp,
|
c->tmp,
|
||||||
BRW_MATH_FUNCTION_INV,
|
BRW_MATH_FUNCTION_INV,
|
||||||
0,
|
0,
|
||||||
c->dx0,
|
c->dx0,
|
||||||
BRW_MATH_DATA_SCALAR,
|
BRW_MATH_DATA_SCALAR,
|
||||||
BRW_MATH_PRECISION_FULL);
|
BRW_MATH_PRECISION_FULL);
|
||||||
|
|
||||||
brw_set_default_access_mode(p, BRW_ALIGN_16);
|
brw_set_default_access_mode(p, BRW_ALIGN_16);
|
||||||
|
|
||||||
|
@@ -158,13 +158,13 @@ vec4_generator::generate_math1_gen4(vec4_instruction *inst,
|
|||||||
struct brw_reg dst,
|
struct brw_reg dst,
|
||||||
struct brw_reg src)
|
struct brw_reg src)
|
||||||
{
|
{
|
||||||
brw_math(p,
|
gen4_math(p,
|
||||||
dst,
|
dst,
|
||||||
brw_math_function(inst->opcode),
|
brw_math_function(inst->opcode),
|
||||||
inst->base_mrf,
|
inst->base_mrf,
|
||||||
src,
|
src,
|
||||||
BRW_MATH_DATA_VECTOR,
|
BRW_MATH_DATA_VECTOR,
|
||||||
BRW_MATH_PRECISION_FULL);
|
BRW_MATH_PRECISION_FULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -241,13 +241,13 @@ vec4_generator::generate_math2_gen4(vec4_instruction *inst,
|
|||||||
brw_MOV(p, retype(brw_message_reg(inst->base_mrf + 1), op1.type), op1);
|
brw_MOV(p, retype(brw_message_reg(inst->base_mrf + 1), op1.type), op1);
|
||||||
brw_pop_insn_state(p);
|
brw_pop_insn_state(p);
|
||||||
|
|
||||||
brw_math(p,
|
gen4_math(p,
|
||||||
dst,
|
dst,
|
||||||
brw_math_function(inst->opcode),
|
brw_math_function(inst->opcode),
|
||||||
inst->base_mrf,
|
inst->base_mrf,
|
||||||
op0,
|
op0,
|
||||||
BRW_MATH_DATA_VECTOR,
|
BRW_MATH_DATA_VECTOR,
|
||||||
BRW_MATH_PRECISION_FULL);
|
BRW_MATH_PRECISION_FULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
Reference in New Issue
Block a user