diff --git a/src/intel/compiler/brw_fs.cpp b/src/intel/compiler/brw_fs.cpp index 3150d2a3fcf..513a7e92b32 100644 --- a/src/intel/compiler/brw_fs.cpp +++ b/src/intel/compiler/brw_fs.cpp @@ -3954,12 +3954,12 @@ brw_fs_lower_integer_multiplication(fs_visitor &s) } bool -fs_visitor::lower_sub_sat() +brw_fs_lower_sub_sat(fs_visitor &s) { bool progress = false; - foreach_block_and_inst_safe(block, fs_inst, inst, cfg) { - const fs_builder ibld(this, block, inst); + foreach_block_and_inst_safe(block, fs_inst, inst, s.cfg) { + const fs_builder ibld(&s, block, inst); if (inst->opcode == SHADER_OPCODE_USUB_SAT || inst->opcode == SHADER_OPCODE_ISUB_SAT) { @@ -4037,7 +4037,7 @@ fs_visitor::lower_sub_sat() } if (progress) - invalidate_analysis(DEPENDENCY_INSTRUCTIONS | DEPENDENCY_VARIABLES); + s.invalidate_analysis(DEPENDENCY_INSTRUCTIONS | DEPENDENCY_VARIABLES); return progress; } @@ -5761,7 +5761,7 @@ fs_visitor::optimize() */ OPT(brw_fs_lower_integer_multiplication, *this); } - OPT(lower_sub_sat); + OPT(brw_fs_lower_sub_sat, *this); progress = false; OPT(lower_derivatives); diff --git a/src/intel/compiler/brw_fs.h b/src/intel/compiler/brw_fs.h index b1d8dde4c9c..7e4c1648472 100644 --- a/src/intel/compiler/brw_fs.h +++ b/src/intel/compiler/brw_fs.h @@ -277,7 +277,6 @@ public: bool lower_derivatives(); bool lower_find_live_channel(); bool lower_scoreboard(); - bool lower_sub_sat(); void emit_repclear_shader(); void emit_interpolation_setup_gfx4(); @@ -601,6 +600,7 @@ bool brw_fs_lower_integer_multiplication(fs_visitor &s); bool brw_fs_lower_logical_sends(fs_visitor &s); bool brw_fs_lower_pack(fs_visitor &s); bool brw_fs_lower_simd_width(fs_visitor &s); +bool brw_fs_lower_sub_sat(fs_visitor &s); bool brw_fs_opt_algebraic(fs_visitor &s); bool brw_fs_opt_bank_conflicts(fs_visitor &s);