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,7 +360,7 @@ 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,
|
||||||
@@ -368,7 +368,7 @@ fs_generator::generate_math_gen4(fs_inst *inst,
|
|||||||
|
|
||||||
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,
|
||||||
@@ -394,7 +394,7 @@ 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,
|
||||||
|
@@ -322,7 +322,7 @@ 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,
|
||||||
@@ -611,7 +611,7 @@ 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,
|
||||||
|
@@ -158,7 +158,7 @@ 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,
|
||||||
@@ -241,7 +241,7 @@ 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,
|
||||||
|
Reference in New Issue
Block a user