intel/brw: Pull lower_load_payload 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 16:30:53 -08:00 committed by Marge Bot
parent 7397d3c950
commit 19b28ee44a
2 changed files with 7 additions and 7 deletions

View file

@ -3351,11 +3351,11 @@ brw_fs_opt_remove_extra_rounding_modes(fs_visitor &s)
}
bool
fs_visitor::lower_load_payload()
brw_fs_lower_load_payload(fs_visitor &s)
{
bool progress = false;
foreach_block_and_inst_safe (block, fs_inst, inst, cfg) {
foreach_block_and_inst_safe (block, fs_inst, inst, s.cfg) {
if (inst->opcode != SHADER_OPCODE_LOAD_PAYLOAD)
continue;
@ -3367,7 +3367,7 @@ fs_visitor::lower_load_payload()
if (dst.file == MRF)
dst.nr = dst.nr & ~BRW_MRF_COMPR4;
const fs_builder ibld(this, block, inst);
const fs_builder ibld(&s, block, inst);
const fs_builder ubld = ibld.exec_all();
for (uint8_t i = 0; i < inst->header_size;) {
@ -3409,7 +3409,7 @@ fs_visitor::lower_load_payload()
assert(inst->header_size + 4 <= inst->sources);
for (uint8_t i = inst->header_size; i < inst->header_size + 4; i++) {
if (inst->src[i].file != BAD_FILE) {
if (devinfo->has_compr4) {
if (s.devinfo->has_compr4) {
fs_reg compr4_dst = retype(dst, inst->src[i].type);
compr4_dst.nr |= BRW_MRF_COMPR4;
ibld.MOV(compr4_dst, inst->src[i]);
@ -3453,7 +3453,7 @@ fs_visitor::lower_load_payload()
}
if (progress)
invalidate_analysis(DEPENDENCY_INSTRUCTIONS);
s.invalidate_analysis(DEPENDENCY_INSTRUCTIONS);
return progress;
}
@ -5741,7 +5741,7 @@ fs_visitor::optimize()
OPT(brw_fs_opt_remove_redundant_halts, *this);
if (OPT(lower_load_payload)) {
if (OPT(brw_fs_lower_load_payload, *this)) {
OPT(brw_fs_opt_split_virtual_grfs, *this);
/* Lower 64 bit MOVs generated by payload lowering. */

View file

@ -270,7 +270,6 @@ public:
void vfail(const char *msg, va_list args);
void fail(const char *msg, ...);
void limit_dispatch_width(unsigned n, const char *msg);
bool lower_load_payload();
bool lower_scoreboard();
void emit_repclear_shader();
@ -596,6 +595,7 @@ bool brw_fs_lower_find_live_channel(fs_visitor &s);
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_load_payload(fs_visitor &s);
bool brw_fs_lower_regioning(fs_visitor &s);
bool brw_fs_lower_sends_overlapping_payload(fs_visitor &s);
bool brw_fs_lower_simd_width(fs_visitor &s);