summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/tgsi/tgsi_dump.c
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2009-11-24 13:41:03 +0000
committerKeith Whitwell <[email protected]>2009-11-24 13:41:03 +0000
commitba1ca28cc62fed71c77902b95ae4ed36c6bf25f8 (patch)
tree084fbb1b23239140a2adbd76013be830e1ba6f26 /src/gallium/auxiliary/tgsi/tgsi_dump.c
parent3c46bbee1bb4f107d68addae472cf7bbc0976653 (diff)
gallium: simplify tgsi tokens further
Drop anonymous 'Extended' fields, have every optional token named explicitly in its parent. Eg. there is now an Instruction.Label flag, etc. Drop destination modifiers and other functionality which cannot be generated by tgsi_ureg.c, which is now the primary way of creating shaders. Pull source modifiers into the source register token, drop the second negate flag. The source register token is now full - if we need to expand it, probably best to move all of the modifiers to a new token and have a single flag for it.
Diffstat (limited to 'src/gallium/auxiliary/tgsi/tgsi_dump.c')
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_dump.c40
1 files changed, 7 insertions, 33 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_dump.c b/src/gallium/auxiliary/tgsi/tgsi_dump.c
index d16e64f9c59..7eb64167fb2 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_dump.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_dump.c
@@ -150,17 +150,6 @@ static const char *texture_names[] =
};
-static const char *modulate_names[TGSI_MODULATE_COUNT] =
-{
- "",
- "_2X",
- "_4X",
- "_8X",
- "_D2",
- "_D4",
- "_D8"
-};
-
static void
_dump_register(
struct dump_ctx *ctx,
@@ -385,7 +374,6 @@ iter_instruction(
dst->DstRegister.Index,
dst->DstRegister.Index );
}
- ENM( dst->DstRegisterExtModulate.Modulate, modulate_names );
_dump_writemask( ctx, dst->DstRegister.WriteMask );
first_reg = FALSE;
@@ -398,18 +386,10 @@ iter_instruction(
CHR( ',' );
CHR( ' ' );
- if (src->SrcRegisterExtMod.Negate)
+ if (src->SrcRegister.Negate)
TXT( "-(" );
- if (src->SrcRegisterExtMod.Absolute)
+ if (src->SrcRegister.Absolute)
CHR( '|' );
- if (src->SrcRegisterExtMod.Scale2X)
- TXT( "2*(" );
- if (src->SrcRegisterExtMod.Bias)
- CHR( '(' );
- if (src->SrcRegisterExtMod.Complement)
- TXT( "1-(" );
- if (src->SrcRegister.Negate)
- CHR( '-' );
if (src->SrcRegister.Indirect) {
_dump_register_ind(
@@ -439,23 +419,17 @@ iter_instruction(
ENM( src->SrcRegister.SwizzleW, swizzle_names );
}
- if (src->SrcRegisterExtMod.Complement)
- CHR( ')' );
- if (src->SrcRegisterExtMod.Bias)
- TXT( ")-.5" );
- if (src->SrcRegisterExtMod.Scale2X)
- CHR( ')' );
- if (src->SrcRegisterExtMod.Absolute)
+ if (src->SrcRegister.Absolute)
CHR( '|' );
- if (src->SrcRegisterExtMod.Negate)
+ if (src->SrcRegister.Negate)
CHR( ')' );
first_reg = FALSE;
}
- if (inst->InstructionExtTexture.Texture != TGSI_TEXTURE_UNKNOWN) {
+ if (inst->Instruction.Texture) {
TXT( ", " );
- ENM( inst->InstructionExtTexture.Texture, texture_names );
+ ENM( inst->InstructionTexture.Texture, texture_names );
}
switch (inst->Instruction.Opcode) {
@@ -465,7 +439,7 @@ iter_instruction(
case TGSI_OPCODE_ENDLOOP:
case TGSI_OPCODE_CAL:
TXT( " :" );
- UID( inst->InstructionExtLabel.Label );
+ UID( inst->InstructionLabel.Label );
break;
}