summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary
diff options
context:
space:
mode:
authorJosé Fonseca <[email protected]>2012-10-11 14:56:26 +0100
committerJosé Fonseca <[email protected]>2012-10-12 18:52:14 +0100
commit9ccf91f9ef72f63871b0a8c6b43f7bd452d73b94 (patch)
tree16e5f9a8d34a12af9c44149f202de78149bdc60e /src/gallium/auxiliary
parentd366520e8553f4a16151ee946d6e8136cab3de5e (diff)
tgsi: Dump register number when dumping immediates.
For example: VERT DCL IN[0] DCL OUT[0], POSITION DCL OUT[1], GENERIC[12] DCL CONST[0..4] DCL TEMP[0], LOCAL DCL TEMP[1], LOCAL IMM[0] UINT32 {4294967295, 0, 0, 0} IMM[1] FLT32 { 0.0000, 1.0000, 0.0000, 0.0000} 0: SEQ TEMP[0].x, CONST[3].xxxx, IMM[0].xxxx 1: F2I TEMP[0].x, -TEMP[0] 2: SEQ TEMP[1].x, CONST[4].xxxx, IMM[0].xxxx 3: F2I TEMP[1].x, -TEMP[1] 4: AND TEMP[0].x, TEMP[0].xxxx, TEMP[1].xxxx 5: IF TEMP[0].xxxx :0 6: MOV TEMP[0], IMM[1].xyxy 7: ELSE :0 8: MOV TEMP[0], IMM[1].yxxy 9: ENDIF 10: MOV OUT[1], TEMP[0] 11: MOV OUT[0], IN[0] 12: END instead of VERT DCL IN[0] DCL OUT[0], POSITION DCL OUT[1], GENERIC[12] DCL CONST[0..4] DCL TEMP[0], LOCAL DCL TEMP[1], LOCAL IMM UINT32 {4294967295, 0, 0, 0} IMM FLT32 { 0.0000, 1.0000, 0.0000, 0.0000} 0: SEQ TEMP[0].x, CONST[3].xxxx, IMM[0].xxxx 1: F2I TEMP[0].x, -TEMP[0] 2: SEQ TEMP[1].x, CONST[4].xxxx, IMM[0].xxxx 3: F2I TEMP[1].x, -TEMP[1] 4: AND TEMP[0].x, TEMP[0].xxxx, TEMP[1].xxxx 5: IF TEMP[0].xxxx :0 6: MOV TEMP[0], IMM[1].xyxy 7: ELSE :0 8: MOV TEMP[0], IMM[1].yxxy 9: ENDIF 10: MOV OUT[1], TEMP[0] 11: MOV OUT[0], IN[0] 12: END
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_dump.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_dump.c b/src/gallium/auxiliary/tgsi/tgsi_dump.c
index 383c54590af..c202033921f 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_dump.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_dump.c
@@ -44,6 +44,7 @@ struct dump_ctx
struct tgsi_iterate_context iter;
uint instno;
+ uint immno;
int indent;
uint indentation;
@@ -455,7 +456,9 @@ iter_immediate(
{
struct dump_ctx *ctx = (struct dump_ctx *) iter;
- TXT( "IMM " );
+ TXT( "IMM[" );
+ SID( ctx->immno++ );
+ TXT( "] " );
ENM( imm->Immediate.DataType, tgsi_immediate_type_names );
dump_imm_data(iter, imm->u, imm->Immediate.NrTokens - 1,
@@ -626,6 +629,7 @@ tgsi_dump_instruction(
struct dump_ctx ctx;
ctx.instno = instno;
+ ctx.immno = instno;
ctx.indent = 0;
ctx.dump_printf = dump_ctx_printf;
ctx.indentation = 0;
@@ -658,6 +662,7 @@ tgsi_dump(
ctx.iter.epilog = NULL;
ctx.instno = 0;
+ ctx.immno = 0;
ctx.indent = 0;
ctx.dump_printf = dump_ctx_printf;
ctx.indentation = 0;
@@ -713,6 +718,7 @@ tgsi_dump_str(
ctx.base.iter.epilog = NULL;
ctx.base.instno = 0;
+ ctx.base.immno = 0;
ctx.base.indent = 0;
ctx.base.dump_printf = &str_dump_ctx_printf;
ctx.base.indentation = 0;