intel/brw: Pull lower_barycentrics out of fs_visitor

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26887>
This commit is contained in:
Caio Oliveira 2024-01-03 15:41:21 -08:00 committed by Marge Bot
parent af2b3c478c
commit 422b4bead6
2 changed files with 8 additions and 7 deletions

View file

@ -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. */

View file

@ -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);