ir3: fix printing of brcst.active and quad_shuffle

Make sure they aren't treated as a texture instructions. For
brcst.active, also print its cluster size.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26950>
This commit is contained in:
Job Noorman 2024-01-09 12:35:48 +01:00 committed by Marge Bot
parent 6fa99abac0
commit 6148e38a09
2 changed files with 19 additions and 1 deletions

View file

@ -1000,6 +1000,21 @@ is_tex(struct ir3_instruction *instr)
return (opc_cat(instr->opc) == 5) && instr->opc != OPC_TCINV;
}
static inline bool
is_tex_shuffle(struct ir3_instruction *instr)
{
switch (instr->opc) {
case OPC_BRCST_ACTIVE:
case OPC_QUAD_SHUFFLE_BRCST:
case OPC_QUAD_SHUFFLE_HORIZ:
case OPC_QUAD_SHUFFLE_VERT:
case OPC_QUAD_SHUFFLE_DIAG:
return true;
default:
return false;
}
}
static inline bool
is_tex_or_prefetch(struct ir3_instruction *instr)
{

View file

@ -358,6 +358,8 @@ print_instr(struct log_stream *stream, struct ir3_instruction *instr, int lvl)
print_instr_name(stream, instr, true);
if (is_tex(instr)) {
if (instr->opc == OPC_BRCST_ACTIVE)
mesa_log_stream_printf(stream, ".w%d", instr->cat5.cluster_size);
mesa_log_stream_printf(stream, " (%s)(", type_name(instr->cat5.type));
for (unsigned i = 0; i < 4; i++)
if (instr->dsts[0]->wrmask & (1 << i))
@ -391,7 +393,8 @@ print_instr(struct log_stream *stream, struct ir3_instruction *instr, int lvl)
}
}
if (is_tex(instr) && !(instr->flags & IR3_INSTR_S2EN)) {
if (is_tex(instr) && !(instr->flags & IR3_INSTR_S2EN) &&
!is_tex_shuffle(instr)) {
if (!!(instr->flags & IR3_INSTR_B) && !!(instr->flags & IR3_INSTR_A1EN)) {
mesa_log_stream_printf(stream, ", s#%d", instr->cat5.samp);
} else {