intel/compiler: Fix INTEL_DEBUG=hex

With the missing else, this prints the compacted hex followed by hex
for an uncompacted version of the compacted instruction. It also
doesn't print hex for instructions that are not compacted.

Fixes: bc4a127d6e ("intel/disasm: Label support in shader disassembly for UIP/JIP")
Fixes: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4245
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10535>
(cherry picked from commit 3f04383521)
This commit is contained in:
Jordan Justen 2021-04-29 15:12:10 -07:00 committed by Dylan Baker
parent f5ce440e1b
commit baaf7cfb82
2 changed files with 2 additions and 1 deletions

View file

@ -139,7 +139,7 @@
"description": "intel/compiler: Fix INTEL_DEBUG=hex",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"master_sha": null,
"because_sha": "bc4a127d6e10318d48fa8b540b9c1ff7d62c8d29"
},

View file

@ -566,6 +566,7 @@ brw_disassemble(const struct gen_device_info *devinfo,
brw_uncompact_instruction(devinfo, &uncompacted, compacted);
insn = &uncompacted;
} else {
if (dump_hex) {
unsigned char * insn_ptr = ((unsigned char *)&insn[0]);
for (int i = 0 ; i < 16; i = i + 4) {