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
struct tgsi_iterate_context iter;
uint instno;
+ uint immno;
int indent;
uint indentation;
{
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,
struct dump_ctx ctx;
ctx.instno = instno;
+ ctx.immno = instno;
ctx.indent = 0;
ctx.dump_printf = dump_ctx_printf;
ctx.indentation = 0;
ctx.iter.epilog = NULL;
ctx.instno = 0;
+ ctx.immno = 0;
ctx.indent = 0;
ctx.dump_printf = dump_ctx_printf;
ctx.indentation = 0;
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;