diff options
author | Kenneth Graunke <[email protected]> | 2014-06-07 02:27:43 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2014-06-10 16:38:26 -0700 |
commit | 35e48bd6188a56097016eb1c05e16d1ba35345c4 (patch) | |
tree | 9ea326596ed7f0b8fdd47fe19788ac0b12e29571 /src/mesa/drivers/dri | |
parent | f3ddd71f2878e42d2c9e927bd5f695a62b357c58 (diff) |
i965/fs: Drop the generate_math[12]_gen7 methods.
These functions are basically identical, so we should combine them.
However, they're so trivial, we may as well just fold them into their
only call sites.
Signed-off-by: Kenneth Graunke <[email protected]>
Reviewed-by: Matt Turner <[email protected]>
Reviewed-by: Jordan Justen <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs.h | 7 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs_generator.cpp | 28 |
2 files changed, 5 insertions, 30 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs.h b/src/mesa/drivers/dri/i965/brw_fs.h index cda344e47cb..9c4e116e3f6 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.h +++ b/src/mesa/drivers/dri/i965/brw_fs.h @@ -627,13 +627,6 @@ private: void generate_linterp(fs_inst *inst, struct brw_reg dst, struct brw_reg *src); void generate_tex(fs_inst *inst, struct brw_reg dst, struct brw_reg src); - void generate_math1_gen7(fs_inst *inst, - struct brw_reg dst, - struct brw_reg src); - void generate_math2_gen7(fs_inst *inst, - struct brw_reg dst, - struct brw_reg src0, - struct brw_reg src1); void generate_math1_gen6(fs_inst *inst, struct brw_reg dst, struct brw_reg src); diff --git a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp index 6c028d8f73c..9a592747458 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp @@ -293,25 +293,6 @@ fs_generator::generate_linterp(fs_inst *inst, } void -fs_generator::generate_math1_gen7(fs_inst *inst, - struct brw_reg dst, - struct brw_reg src0) -{ - assert(inst->mlen == 0); - gen6_math(p, dst, brw_math_function(inst->opcode), src0, brw_null_reg()); -} - -void -fs_generator::generate_math2_gen7(fs_inst *inst, - struct brw_reg dst, - struct brw_reg src0, - struct brw_reg src1) -{ - assert(inst->mlen == 0); - gen6_math(p, dst, brw_math_function(inst->opcode), src0, src1); -} - -void fs_generator::generate_math1_gen6(fs_inst *inst, struct brw_reg dst, struct brw_reg src0) @@ -338,8 +319,6 @@ fs_generator::generate_math2_gen6(fs_inst *inst, { int op = brw_math_function(inst->opcode); - assert(inst->mlen == 0); - brw_set_default_compression_control(p, BRW_COMPRESSION_NONE); gen6_math(p, dst, op, src0, src1); @@ -1625,8 +1604,10 @@ fs_generator::generate_code(exec_list *instructions) case SHADER_OPCODE_LOG2: case SHADER_OPCODE_SIN: case SHADER_OPCODE_COS: + assert(brw->gen < 6 || inst->mlen == 0); if (brw->gen >= 7) { - generate_math1_gen7(inst, dst, src[0]); + gen6_math(p, dst, brw_math_function(inst->opcode), src[0], + brw_null_reg()); } else if (brw->gen == 6) { generate_math1_gen6(inst, dst, src[0]); } else if (brw->gen == 5 || brw->is_g4x) { @@ -1638,8 +1619,9 @@ fs_generator::generate_code(exec_list *instructions) case SHADER_OPCODE_INT_QUOTIENT: case SHADER_OPCODE_INT_REMAINDER: case SHADER_OPCODE_POW: + assert(brw->gen < 6 || inst->mlen == 0); if (brw->gen >= 7) { - generate_math2_gen7(inst, dst, src[0], src[1]); + gen6_math(p, dst, brw_math_function(inst->opcode), src[0], src[1]); } else if (brw->gen == 6) { generate_math2_gen6(inst, dst, src[0], src[1]); } else { |