brw: Replace fs_inst::last_rt with a logical control source

Rather than using a bit in the generic fs_inst data structure, we can
simply set a source on our logical FB write messages.  (We already do
so for many other cases.)

In the repclear shader, setting this wasn't actually having an effect,
as we were setting it on a SHADER_OPCODE_SEND message which ignored it.
(We had already correctly set the bit in the message descriptor.)

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33297>
This commit is contained in:
Kenneth Graunke
2025-01-16 15:26:18 -08:00
committed by Marge Bot
parent fce01b8461
commit 32dd722ff3
4 changed files with 7 additions and 5 deletions
+2 -2
View File
@@ -33,6 +33,7 @@ brw_emit_single_fb_write(fs_visitor &s, const brw_builder &bld,
sources[FB_WRITE_LOGICAL_SRC_SRC0_ALPHA] = src0_alpha;
sources[FB_WRITE_LOGICAL_SRC_COMPONENTS] = brw_imm_ud(components);
sources[FB_WRITE_LOGICAL_SRC_NULL_RT] = brw_imm_ud(null_rt);
sources[FB_WRITE_LOGICAL_SRC_LAST_RT] = brw_imm_ud(false);
if (prog_data->uses_omask)
sources[FB_WRITE_LOGICAL_SRC_OMASK] = s.sample_mask;
@@ -105,7 +106,7 @@ brw_do_emit_fb_writes(fs_visitor &s, int nr_color_regions, bool replicate_alpha)
inst->target = 0;
}
inst->last_rt = true;
inst->src[FB_WRITE_LOGICAL_SRC_LAST_RT] = brw_imm_ud(true);
inst->eot = true;
}
@@ -655,7 +656,6 @@ brw_emit_repclear_shader(fs_visitor &s)
write->mlen = 1 + write->header_size;
}
write->eot = true;
write->last_rt = true;
brw_calculate_cfg(s);