summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2013-03-11 11:10:34 -0700
committerKenneth Graunke <[email protected]>2013-03-20 10:40:44 -0700
commitd24819dce8cf6dac23f27df46fabbf756a732229 (patch)
treefb78e00df9f218587eff138a6b7e6c999dbb45da /src
parent095c3755ee4f0c3c8f71467345ae7c0e92c9ca6a (diff)
i965/vs: Add IR dumping for immediates.
This makes dump_instructions more useful. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/i965/brw_vec4.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/drivers/dri/i965/brw_vec4.cpp
index d759710af3c..9ab599f4b21 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4.cpp
@@ -981,6 +981,22 @@ vec4_visitor::dump_instruction(vec4_instruction *inst)
case UNIFORM:
printf("u%d", inst->src[i].reg);
break;
+ case IMM:
+ switch (inst->src[i].type) {
+ case BRW_REGISTER_TYPE_F:
+ printf("%fF", inst->src[i].imm.f);
+ break;
+ case BRW_REGISTER_TYPE_D:
+ printf("%dD", inst->src[i].imm.i);
+ break;
+ case BRW_REGISTER_TYPE_UD:
+ printf("%uU", inst->src[i].imm.u);
+ break;
+ default:
+ printf("???");
+ break;
+ }
+ break;
case BAD_FILE:
printf("(null)");
break;