summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/tgsi/core
diff options
context:
space:
mode:
authormichal <michal@michal-laptop.(none)>2007-08-07 12:50:12 +0100
committermichal <michal@michal-laptop.(none)>2007-08-07 12:50:12 +0100
commit281dad225947b4f00bfc5e785d92d2a7c2f06afe (patch)
treee396ae9e9785e8c9a45bd1459f2c560b2c935785 /src/mesa/pipe/tgsi/core
parentf141399031981d6af19a32025ae7c1b947196480 (diff)
Handle labels for IF/ELSE correctly
Diffstat (limited to 'src/mesa/pipe/tgsi/core')
-rw-r--r--src/mesa/pipe/tgsi/core/tgsi_dump.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/mesa/pipe/tgsi/core/tgsi_dump.c b/src/mesa/pipe/tgsi/core/tgsi_dump.c
index 68b81b7ffe..641339c896 100644
--- a/src/mesa/pipe/tgsi/core/tgsi_dump.c
+++ b/src/mesa/pipe/tgsi/core/tgsi_dump.c
@@ -686,12 +686,15 @@ dump_immediate_verbose(
static void
dump_instruction_short(
struct text_dump *dump,
- struct tgsi_full_instruction *inst )
+ struct tgsi_full_instruction *inst,
+ GLuint instno )
{
GLuint i;
GLboolean first_reg = GL_TRUE;
CHR( '\n' );
+ UID( instno );
+ CHR( ':' );
ENM( inst->Instruction.Opcode, TGSI_OPCODES_SHORT );
switch( inst->Instruction.Saturate ) {
@@ -781,6 +784,14 @@ dump_instruction_short(
first_reg = GL_FALSE;
}
+
+ switch( inst->Instruction.Opcode ) {
+ case TGSI_OPCODE_IF:
+ case TGSI_OPCODE_ELSE:
+ TXT( " : " );
+ UID( inst->InstructionExtLabel.Label );
+ break;
+ }
}
static void
@@ -1140,6 +1151,7 @@ tgsi_dump(
GLuint verbose = flags & TGSI_DUMP_VERBOSE;
GLuint ignored = !(flags & TGSI_DUMP_NO_IGNORED);
GLuint deflt = !(flags & TGSI_DUMP_NO_DEFAULT);
+ GLuint instno = 0;
{
#if 0
@@ -1206,7 +1218,9 @@ tgsi_dump(
case TGSI_TOKEN_TYPE_INSTRUCTION:
dump_instruction_short(
dump,
- &parse.FullToken.FullInstruction );
+ &parse.FullToken.FullInstruction,
+ instno );
+ instno++;
break;
default: