Mesa (main): intel/disasm: fix missing oword index decoding
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Aug 3 17:40:55 UTC 2021
Module: Mesa
Branch: main
Commit: 97be8e42e42f3b739c3de808553094f86ad8879f
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=97be8e42e42f3b739c3de808553094f86ad8879f
Author: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Date: Tue Aug 3 15:48:03 2021 +0300
intel/disasm: fix missing oword index decoding
Also switch to array of strings to show high/low dwords.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Fixes: daba2894ffc300 ("intel/disasm: decode/describe more send messages")
Acked-by: Caio Marcelo de Oliveira Filho <caio.oliveira at intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12183>
---
src/intel/compiler/brw_disasm.c | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/src/intel/compiler/brw_disasm.c b/src/intel/compiler/brw_disasm.c
index 84b1c7c9e77..7fca5b27bee 100644
--- a/src/intel/compiler/brw_disasm.c
+++ b/src/intel/compiler/brw_disasm.c
@@ -429,11 +429,12 @@ static const char *const dp_dc0_msg_type_gfx7[16] = {
[GFX7_DATAPORT_DC_UNTYPED_SURFACE_WRITE] = "DC untyped surface write",
};
-static const int dp_oword_block_rw[8] = {
- [BRW_DATAPORT_OWORD_BLOCK_1_OWORDLOW] = 1,
- [BRW_DATAPORT_OWORD_BLOCK_2_OWORDS] = 2,
- [BRW_DATAPORT_OWORD_BLOCK_4_OWORDS] = 4,
- [BRW_DATAPORT_OWORD_BLOCK_8_OWORDS] = 8,
+static const char *const dp_oword_block_rw[8] = {
+ [BRW_DATAPORT_OWORD_BLOCK_1_OWORDLOW] = "1-low",
+ [BRW_DATAPORT_OWORD_BLOCK_1_OWORDHIGH] = "1-high",
+ [BRW_DATAPORT_OWORD_BLOCK_2_OWORDS] = "2",
+ [BRW_DATAPORT_OWORD_BLOCK_4_OWORDS] = "4",
+ [BRW_DATAPORT_OWORD_BLOCK_8_OWORDS] = "8",
};
static const char *const dp_dc1_msg_type_hsw[32] = {
@@ -2307,8 +2308,8 @@ brw_disassemble_inst(FILE *file, const struct intel_device_info *devinfo,
case GFX7_DATAPORT_DC_OWORD_BLOCK_READ:
case GFX7_DATAPORT_DC_OWORD_BLOCK_WRITE: {
unsigned msg_ctrl = brw_dp_desc_msg_control(devinfo, imm_desc);
- assert(dp_oword_block_rw[msg_ctrl & 7] > 0);
- format(file, "owords = %d, aligned = %d",
+ assert(dp_oword_block_rw[msg_ctrl & 7]);
+ format(file, "owords = %s, aligned = %d",
dp_oword_block_rw[msg_ctrl & 7], (msg_ctrl >> 3) & 3);
break;
}
@@ -2369,8 +2370,8 @@ brw_disassemble_inst(FILE *file, const struct intel_device_info *devinfo,
break;
case GFX9_DATAPORT_DC_PORT1_A64_OWORD_BLOCK_WRITE:
case GFX9_DATAPORT_DC_PORT1_A64_OWORD_BLOCK_READ:
- assert(dp_oword_block_rw[msg_ctrl & 7] > 0);
- format(file, "owords = %d, aligned = %d",
+ assert(dp_oword_block_rw[msg_ctrl & 7]);
+ format(file, "owords = %s, aligned = %d",
dp_oword_block_rw[msg_ctrl & 7], (msg_ctrl >> 3) & 3);
break;
default:
More information about the mesa-commit
mailing list