intel/brw: Omit type and region in payload sources when printing IR

These are not really used since SEND messages deal with full GRFs.

Before

```
send(8) (mlen: 1) (ex_mlen: 1) (null):UD, 0u, 0u, g1:UD, g8:UD
send(8) (mlen: 1) g5:UD, 0u, 0u, g4:UD, (null):UD
send(8) (mlen: 1) (ex_mlen: 1) (null):UD, 0u, 16777216u, g1:D, g6:UD
send(8) (mlen: 1) (EOT) (null):UD, 0u, 0u, g126:UD, (null):UD NoMask
```

and after

```
send(8) (mlen: 1) (ex_mlen: 1) (null), 0u, 0u, g1, g8
send(8) (mlen: 1) g5, 0u, 0u, g4, (null)
send(8) (mlen: 1) (ex_mlen: 1) (null), 0u, 16777216u, g1, g6
send(8) (mlen: 1) (EOT) (null), 0u, 0u, g126, (null) NoMask
```

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32259>
This commit is contained in:
Caio Oliveira 2024-11-20 09:21:34 -08:00 committed by Marge Bot
parent 8474dc853d
commit 71d362db66

View File

@ -421,6 +421,9 @@ brw_print_instruction_to_file(const fs_visitor &s, const fs_inst *inst, FILE *fi
fprintf(file, "(EOT) ");
}
const bool is_send = inst->opcode == BRW_OPCODE_SEND ||
inst->opcode == SHADER_OPCODE_SEND;
switch (inst->dst.file) {
case VGRF:
if (defs && defs->get(inst->dst))
@ -477,9 +480,11 @@ brw_print_instruction_to_file(const fs_visitor &s, const fs_inst *inst, FILE *fi
inst->dst.offset % reg_size);
}
if (inst->dst.stride != 1)
fprintf(file, "<%u>", inst->dst.stride);
fprintf(file, ":%s", brw_reg_type_to_letters(inst->dst.type));
if (!is_send) {
if (inst->dst.stride != 1)
fprintf(file, "<%u>", inst->dst.stride);
fprintf(file, ":%s", brw_reg_type_to_letters(inst->dst.type));
}
for (int i = 0; i < inst->sources; i++) {
if (inst->opcode == SHADER_OPCODE_MEMORY_LOAD_LOGICAL ||
@ -600,7 +605,10 @@ brw_print_instruction_to_file(const fs_visitor &s, const fs_inst *inst, FILE *fi
if (inst->src[i].abs)
fprintf(file, "|");
if (inst->src[i].file != IMM) {
/* Just print register numbers for payload sources. */
const bool omit_src_type_and_region = is_send && i >= 2;
if (inst->src[i].file != IMM && !omit_src_type_and_region) {
unsigned stride;
if (inst->src[i].file == ARF || inst->src[i].file == FIXED_GRF) {
unsigned hstride = inst->src[i].hstride;