tgsi/dump: fix declaration printing of tessellation inputs/outputs

mareko: only output second dimension for non-patch semantics

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
Ilia Mirkin 2014-07-13 14:26:05 -04:00 committed by Marek Olšák
parent dfc3bced2c
commit d7081828cc
1 changed files with 18 additions and 2 deletions

View File

@ -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("[]");
}