diff --git a/src/intel/compiler/brw_fs.cpp b/src/intel/compiler/brw_fs.cpp index 3777f7fd714..b97b9329175 100644 --- a/src/intel/compiler/brw_fs.cpp +++ b/src/intel/compiler/brw_fs.cpp @@ -5116,20 +5116,21 @@ brw_fs_lower_simd_width(fs_visitor &s) * component layout. */ bool -fs_visitor::lower_barycentrics() +brw_fs_lower_barycentrics(fs_visitor &s) { + const intel_device_info *devinfo = s.devinfo; const bool has_interleaved_layout = devinfo->has_pln || (devinfo->ver >= 7 && devinfo->ver < 20); bool progress = false; - if (stage != MESA_SHADER_FRAGMENT || !has_interleaved_layout) + if (s.stage != MESA_SHADER_FRAGMENT || !has_interleaved_layout) return false; - foreach_block_and_inst_safe(block, fs_inst, inst, cfg) { + foreach_block_and_inst_safe(block, fs_inst, inst, s.cfg) { if (inst->exec_size < 16) continue; - const fs_builder ibld(this, block, inst); + const fs_builder ibld(&s, block, inst); const fs_builder ubld = ibld.exec_all().group(8, 0); switch (inst->opcode) { @@ -5176,7 +5177,7 @@ fs_visitor::lower_barycentrics() } if (progress) - invalidate_analysis(DEPENDENCY_INSTRUCTIONS | DEPENDENCY_VARIABLES); + s.invalidate_analysis(DEPENDENCY_INSTRUCTIONS | DEPENDENCY_VARIABLES); return progress; } @@ -5702,7 +5703,7 @@ fs_visitor::optimize() } OPT(brw_fs_lower_simd_width, *this); - OPT(lower_barycentrics); + OPT(brw_fs_lower_barycentrics, *this); OPT(lower_logical_sends); /* After logical SEND lowering. */ diff --git a/src/intel/compiler/brw_fs.h b/src/intel/compiler/brw_fs.h index 7b129e7e13a..7a1cfe0b804 100644 --- a/src/intel/compiler/brw_fs.h +++ b/src/intel/compiler/brw_fs.h @@ -277,7 +277,6 @@ public: bool lower_regioning(); bool lower_logical_sends(); bool lower_integer_multiplication(); - bool lower_barycentrics(); bool lower_derivatives(); bool lower_find_live_channel(); bool lower_scoreboard(); @@ -603,6 +602,7 @@ bool brw_lower_dpas(fs_visitor &v); void nir_to_brw(fs_visitor *s); +bool brw_fs_lower_barycentrics(fs_visitor &s); bool brw_fs_lower_constant_loads(fs_visitor &s); bool brw_fs_lower_pack(fs_visitor &s); bool brw_fs_lower_simd_width(fs_visitor &s);