summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/tgsi/tgsi_dump.h
diff options
context:
space:
mode:
authorJosé Fonseca <[email protected]>2013-11-14 14:02:24 +0000
committerJosé Fonseca <[email protected]>2013-11-14 14:04:28 +0000
commita29e40a42382630c2d9d95d3a1e03a7b3db87add (patch)
treeb6101e3c368e80f6f1b1f02d2c05d33b2118c533 /src/gallium/auxiliary/tgsi/tgsi_dump.h
parent673d5391a2f4084525de6c5cebf322ddb0e2acf1 (diff)
gallivm: Compile flag to debug TGSI execution through printfs.
It is similar to tgsi_exec.c's DEBUG_EXECUTION compile flag. I had prototyped this for a while while debugging an issue, but finally cleaned this up and added a few more bells and whistles. v2: Use '$' as marker; better output. Thanks to Brian, Zack and Roland reviews. Here is a sample output. CONST[0].x = 0.00625000009 0.00625000009 0.00625000009 0.00625000009 CONST[0].y = -0.00714285718 -0.00714285718 -0.00714285718 -0.00714285718 CONST[0].z = -1 -1 -1 -1 CONST[0].w = 1 1 1 1 IN[0].x = 143.5 175.5 175.5 143.5 IN[0].y = 123.5 123.5 155.5 155.5 IN[0].z = 0 0 0 0 IN[0].w = 1 1 1 1 $ 1: RCP TEMP[0].w, IN[0].wwww TEMP[0].w = 1 1 1 1 $ 2: MAD TEMP[0].xy, IN[0], CONST[0], CONST[0].zwzw TEMP[0].x = -0.103124976 0.0968750715 0.0968750715 -0.103124976 TEMP[0].y = 0.117857158 0.117857158 -0.110714316 -0.110714316 $ 3: MUL OUT[0].xy, TEMP[0], TEMP[0].wwww OUT[0].x = -0.103124976 0.0968750715 0.0968750715 -0.103124976 OUT[0].y = 0.117857158 0.117857158 -0.110714316 -0.110714316 $ 4: MUL OUT[0].z, IN[0].zzzz, TEMP[0].wwww OUT[0].z = 0 0 0 0 $ 5: MOV OUT[0].w, TEMP[0] OUT[0].w = 1 1 1 1 $ 6: END OUT[0].x = -0.103124976 0.0968750715 0.0968750715 -0.103124976 OUT[0].y = 0.117857158 0.117857158 -0.110714316 -0.110714316 OUT[0].z = 0 0 0 0 OUT[0].w = 1 1 1 1
Diffstat (limited to 'src/gallium/auxiliary/tgsi/tgsi_dump.h')
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_dump.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_dump.h b/src/gallium/auxiliary/tgsi/tgsi_dump.h
index adaef9d89fe..9820bb1cacf 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_dump.h
+++ b/src/gallium/auxiliary/tgsi/tgsi_dump.h
@@ -58,6 +58,13 @@ tgsi_dump_immediate(
const struct tgsi_full_immediate *imm );
void
+tgsi_dump_instruction_str(
+ const struct tgsi_full_instruction *inst,
+ uint instno,
+ char *str,
+ size_t size);
+
+void
tgsi_dump_instruction(
const struct tgsi_full_instruction *inst,
uint instno );