[Nouveau] [PATCH] nouveau/codegen: dump tgsi floats as hex values

Tobias Klausmann tobias.johannes.klausmann at mni.thm.de
Tue Nov 14 14:11:05 UTC 2017


Printing without this could lead to the following output, while the values are
not exactly zero:
IMM[5] FLT32 {    0.0000,     0.0000,     0.0000,     0.0000}
IMM[6] FLT32 {    0.0000,     0.0000,     0.0000,     0.0000}
IMM[7] FLT32 {    0.0000,     0.0000,     0.0000,     0.0000}

when printing the values as hex, we can now see the differences:
IMM[5] FLT32 {0x00000019, 0x0000000f, 0x00000005, 0x0000001e}
IMM[6] FLT32 {0x0000001e, 0x00000005, 0x0000000a, 0x00000014}
IMM[7] FLT32 {0x00000014, 0x0000000a, 0x0000000f, 0x00000019}

Signed-off-by: Tobias Klausmann <tobias.johannes.klausmann at mni.thm.de>
---
 src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp
index 34351dab51..898031811d 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp
@@ -1095,7 +1095,7 @@ Source::Source(struct nv50_ir_prog_info *prog) : info(prog)
    tokens = (const struct tgsi_token *)info->bin.source;
 
    if (prog->dbgFlags & NV50_IR_DEBUG_BASIC)
-      tgsi_dump(tokens, 0);
+      tgsi_dump(tokens, TGSI_DUMP_FLOAT_AS_HEX);
 }
 
 Source::~Source()
-- 
2.15.0



More information about the Nouveau mailing list