summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/tgsi/tgsi_dump.c
diff options
context:
space:
mode:
authorMichal Krol <michal@vmware.com>2010-01-19 13:16:20 +0100
committerMichal Krol <michal@vmware.com>2010-01-28 14:07:24 +0100
commit4367de152cc5bd7240d75a33e75c1b1671b5cc16 (patch)
tree71ed2b871eac71d6113bf97555a96e0f4974ab0e /src/gallium/auxiliary/tgsi/tgsi_dump.c
parent0adfdaeaa1e20c81a9f37455fe78d15c6406e3d3 (diff)
tgsi: Handle 2-D declarations.
Diffstat (limited to 'src/gallium/auxiliary/tgsi/tgsi_dump.c')
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_dump.c50
1 files changed, 22 insertions, 28 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_dump.c b/src/gallium/auxiliary/tgsi/tgsi_dump.c
index c254a7274f..5472466eb6 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_dump.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_dump.c
@@ -178,29 +178,6 @@ static const char *primitive_names[] =
static void
-_dump_register_decl(
- struct dump_ctx *ctx,
- uint file,
- int first,
- int last )
-{
- ENM( file, file_names );
-
- /* all geometry shader inputs are two dimensional */
- if (file == TGSI_FILE_INPUT &&
- ctx->iter.processor.Processor == TGSI_PROCESSOR_GEOMETRY)
- TXT("[]");
-
- CHR( '[' );
- SID( first );
- if (first != last) {
- TXT( ".." );
- SID( last );
- }
- CHR( ']' );
-}
-
-static void
_dump_register_dst(
struct dump_ctx *ctx,
uint file,
@@ -299,11 +276,28 @@ iter_declaration(
TXT( "DCL " );
- _dump_register_decl(
- ctx,
- decl->Declaration.File,
- decl->Range.First,
- decl->Range.Last );
+ ENM(decl->Declaration.File, file_names);
+
+ /* all geometry shader inputs are two dimensional */
+ if (decl->Declaration.File == TGSI_FILE_INPUT &&
+ iter->processor.Processor == TGSI_PROCESSOR_GEOMETRY) {
+ TXT("[]");
+ }
+
+ if (decl->Declaration.Dimension) {
+ CHR('[');
+ SID(decl->Dim.Index2D);
+ CHR(']');
+ }
+
+ CHR('[');
+ SID(decl->Range.First);
+ if (decl->Range.First != decl->Range.Last) {
+ TXT("..");
+ SID(decl->Range.Last);
+ }
+ CHR(']');
+
_dump_writemask(
ctx,
decl->Declaration.UsageMask );