From 4367de152cc5bd7240d75a33e75c1b1671b5cc16 Mon Sep 17 00:00:00 2001 From: Michal Krol Date: Tue, 19 Jan 2010 13:16:20 +0100 Subject: tgsi: Handle 2-D declarations. --- src/gallium/auxiliary/tgsi/tgsi_dump.c | 50 +++++++++++++++------------------- 1 file changed, 22 insertions(+), 28 deletions(-) (limited to 'src/gallium/auxiliary/tgsi/tgsi_dump.c') 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 @@ -177,29 +177,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, @@ -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 ); -- cgit v1.2.3