[Mesa-dev] [PATCH] i965/vs: Add IR dumping for immediates.
Kenneth Graunke
kenneth at whitecape.org
Mon Mar 11 11:10:34 PDT 2013
This makes dump_instructions more useful.
Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
---
src/mesa/drivers/dri/i965/brw_vec4.cpp | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/drivers/dri/i965/brw_vec4.cpp
index f319f32..8e65be8 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;
--
1.8.1.5
More information about the mesa-dev
mailing list