summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2024-01-30 19:32:41 -0800
committerMarge Bot <emma+marge@anholt.net>2024-03-12 21:31:30 +0000
commit31f640bc5f1078a8e838a9b0a5a9c1fd4b05a536 (patch)
tree20913e53e404a37c0c9942c90e30f2f4553574e5
parentf89d9cc53d91a3a9b7627d894c8c7ba73f3c6e99 (diff)
intel/brw: Correctly dump subnr for FIXED_GRF in INTEL_DEBUG=optimizer
v2: Also update printing FIXED_GRF as destionation. Suggested by Lionel. Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27552>
-rw-r--r--src/intel/compiler/brw_fs.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/intel/compiler/brw_fs.cpp b/src/intel/compiler/brw_fs.cpp
index 9794c84d078..d8174ca7ed7 100644
--- a/src/intel/compiler/brw_fs.cpp
+++ b/src/intel/compiler/brw_fs.cpp
@@ -2515,6 +2515,8 @@ fs_visitor::dump_instruction_to_file(const fs_inst *inst, FILE *file) const
break;
case FIXED_GRF:
fprintf(file, "g%d", inst->dst.nr);
+ if (inst->dst.subnr != 0)
+ fprintf(file, ".%d", inst->dst.subnr / type_sz(inst->dst.type));
break;
case BAD_FILE:
fprintf(file, "(null)");
@@ -2644,7 +2646,11 @@ fs_visitor::dump_instruction_to_file(const fs_inst *inst, FILE *file) const
break;
}
- if (inst->src[i].offset ||
+ if (inst->src[i].file == FIXED_GRF && inst->src[i].subnr != 0) {
+ assert(inst->src[i].offset == 0);
+
+ fprintf(file, ".%d", inst->src[i].subnr / type_sz(inst->src[i].type));
+ } else if (inst->src[i].offset ||
(inst->src[i].file == VGRF &&
alloc.sizes[inst->src[i].nr] * REG_SIZE != inst->size_read(i))) {
const unsigned reg_size = (inst->src[i].file == UNIFORM ? 4 : REG_SIZE);