summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/tgsi/tgsi_dump.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/auxiliary/tgsi/tgsi_dump.c')
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_dump.c79
1 files changed, 46 insertions, 33 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_dump.c b/src/gallium/auxiliary/tgsi/tgsi_dump.c
index d7ff262f30..dd36555875 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_dump.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_dump.c
@@ -159,7 +159,9 @@ static const char *property_names[] =
{
"GS_INPUT_PRIMITIVE",
"GS_OUTPUT_PRIMITIVE",
- "GS_MAX_OUTPUT_VERTICES"
+ "GS_MAX_OUTPUT_VERTICES",
+ "FS_COORD_ORIGIN",
+ "FS_COORD_PIXEL_CENTER"
};
static const char *primitive_names[] =
@@ -176,29 +178,18 @@ static const char *primitive_names[] =
"POLYGON"
};
-
-static void
-_dump_register_decl(
- struct dump_ctx *ctx,
- uint file,
- int first,
- int last )
+static const char *fs_coord_origin_names[] =
{
- ENM( file, file_names );
+ "UPPER_LEFT",
+ "LOWER_LEFT"
+};
- /* all geometry shader inputs are two dimensional */
- if (file == TGSI_FILE_INPUT &&
- ctx->iter.processor.Processor == TGSI_PROCESSOR_GEOMETRY)
- TXT("[]");
+static const char *fs_coord_pixel_center_names[] =
+{
+ "HALF_INTEGER",
+ "INTEGER"
+};
- CHR( '[' );
- SID( first );
- if (first != last) {
- TXT( ".." );
- SID( last );
- }
- CHR( ']' );
-}
static void
_dump_register_dst(
@@ -219,8 +210,13 @@ _dump_register_src(
struct dump_ctx *ctx,
const struct tgsi_full_src_register *src )
{
+ ENM(src->Register.File, file_names);
+ if (src->Register.Dimension) {
+ CHR('[');
+ SID(src->Dimension.Index);
+ CHR(']');
+ }
if (src->Register.Indirect) {
- ENM( src->Register.File, file_names );
CHR( '[' );
ENM( src->Indirect.File, file_names );
CHR( '[' );
@@ -234,16 +230,10 @@ _dump_register_src(
}
CHR( ']' );
} else {
- ENM( src->Register.File, file_names );
CHR( '[' );
SID( src->Register.Index );
CHR( ']' );
}
- if (src->Register.Dimension) {
- CHR( '[' );
- SID( src->Dimension.Index );
- CHR( ']' );
- }
}
static void
@@ -300,11 +290,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 );
@@ -373,6 +380,12 @@ iter_property(
case TGSI_PROPERTY_GS_OUTPUT_PRIM:
ENM(prop->u[i].Data, primitive_names);
break;
+ case TGSI_PROPERTY_FS_COORD_ORIGIN:
+ ENM(prop->u[i].Data, fs_coord_origin_names);
+ break;
+ case TGSI_PROPERTY_FS_COORD_PIXEL_CENTER:
+ ENM(prop->u[i].Data, fs_coord_pixel_center_names);
+ break;
default:
SID( prop->u[i].Data );
break;