From 391da3610c09cbb72609377c9778b19adade9a93 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Mon, 1 Apr 2024 16:43:54 -0700 Subject: [PATCH] intel/brw: Print W/UW immediates correctly We were printing 24w as 0x180018d which not only scarily shows the wrong type, but also the replicated format of the word. Reviewed-by: Ian Romanick Part-of: --- src/intel/compiler/brw_fs.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/intel/compiler/brw_fs.cpp b/src/intel/compiler/brw_fs.cpp index 8342af29e82..52033bf357d 100644 --- a/src/intel/compiler/brw_fs.cpp +++ b/src/intel/compiler/brw_fs.cpp @@ -2599,10 +2599,14 @@ fs_visitor::dump_instruction_to_file(const fs_inst *inst, FILE *file) const fprintf(file, "%fdf", inst->src[i].df); break; case BRW_TYPE_W: + fprintf(file, "%dw", (int)(int16_t)inst->src[i].d); + break; case BRW_TYPE_D: fprintf(file, "%dd", inst->src[i].d); break; case BRW_TYPE_UW: + fprintf(file, "%duw", inst->src[i].ud & 0xffff); + break; case BRW_TYPE_UD: fprintf(file, "%uu", inst->src[i].ud); break;