summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/tgsi/tgsi_scan.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2017-02-18 15:26:42 +0100
committerMarek Olšák <[email protected]>2017-02-21 21:27:23 +0100
commit58af0a5385e108e53f766578c9e14af4bb8fc189 (patch)
tree335c21c1f72e75851395b09a66e32e75382f9920 /src/gallium/auxiliary/tgsi/tgsi_scan.c
parentf31ed6d0cd3c6b66304bb060a0c204ecf8621e6a (diff)
tgsi/scan: add basic info about tessellation OUT and IN uses
not all of them will be used immediately Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/tgsi/tgsi_scan.c')
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_scan.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_scan.c b/src/gallium/auxiliary/tgsi/tgsi_scan.c
index a9aa36be46c..7d5496c9603 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_scan.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_scan.c
@@ -199,6 +199,28 @@ scan_src_operand(struct tgsi_shader_info *info,
}
}
+ if (info->processor == PIPE_SHADER_TESS_CTRL &&
+ src->Register.File == TGSI_FILE_OUTPUT) {
+ unsigned input;
+
+ if (src->Register.Indirect && src->Indirect.ArrayID)
+ input = info->output_array_first[src->Indirect.ArrayID];
+ else
+ input = src->Register.Index;
+
+ switch (info->output_semantic_name[input]) {
+ case TGSI_SEMANTIC_PATCH:
+ info->reads_perpatch_outputs = true;
+ break;
+ case TGSI_SEMANTIC_TESSINNER:
+ case TGSI_SEMANTIC_TESSOUTER:
+ info->reads_tessfactor_outputs = true;
+ break;
+ default:
+ info->reads_pervertex_outputs = true;
+ }
+ }
+
/* check for indirect register reads */
if (src->Register.Indirect) {
info->indirect_files |= (1 << src->Register.File);
@@ -539,6 +561,10 @@ scan_declaration(struct tgsi_shader_info *info,
case TGSI_SEMANTIC_SAMPLEMASK:
info->reads_samplemask = TRUE;
break;
+ case TGSI_SEMANTIC_TESSINNER:
+ case TGSI_SEMANTIC_TESSOUTER:
+ info->reads_tess_factors = true;
+ break;
}
break;