[Mesa-dev] [PATCH 19/19] tgsi/dump: fix declaration printing of tessellation inputs/outputs
Ilia Mirkin
imirkin at alum.mit.edu
Sat May 2 13:16:43 PDT 2015
Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
mareko: only output second dimension for non-patch semantics
---
src/gallium/auxiliary/tgsi/tgsi_dump.c | 20 ++++++++++++++++++--
1 file changed, 18 insertions(+), 2 deletions(-)
diff --git a/src/gallium/auxiliary/tgsi/tgsi_dump.c b/src/gallium/auxiliary/tgsi/tgsi_dump.c
index 13d6769..27d4108 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_dump.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_dump.c
@@ -271,14 +271,30 @@ iter_declaration(
struct tgsi_full_declaration *decl )
{
struct dump_ctx *ctx = (struct dump_ctx *)iter;
+ boolean patch = decl->Semantic.Name == TGSI_SEMANTIC_PATCH ||
+ decl->Semantic.Name == TGSI_SEMANTIC_TESSINNER ||
+ decl->Semantic.Name == TGSI_SEMANTIC_TESSOUTER ||
+ decl->Semantic.Name == TGSI_SEMANTIC_PRIMID;
TXT( "DCL " );
TXT(tgsi_file_name(decl->Declaration.File));
- /* all geometry shader inputs are two dimensional */
+ /* all geometry shader inputs and non-patch tessellation shader inputs are
+ * two dimensional
+ */
if (decl->Declaration.File == TGSI_FILE_INPUT &&
- iter->processor.Processor == TGSI_PROCESSOR_GEOMETRY) {
+ (iter->processor.Processor == TGSI_PROCESSOR_GEOMETRY ||
+ (!patch &&
+ (iter->processor.Processor == TGSI_PROCESSOR_TESSCTRL ||
+ iter->processor.Processor == TGSI_PROCESSOR_TESSEVAL)))) {
+ TXT("[]");
+ }
+
+ /* all non-patch tess ctrl shader outputs are two dimensional */
+ if (decl->Declaration.File == TGSI_FILE_OUTPUT &&
+ !patch &&
+ iter->processor.Processor == TGSI_PROCESSOR_TESSCTRL) {
TXT("[]");
}
--
2.0.5
More information about the mesa-dev
mailing list