summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2019-08-01 14:16:01 -0400
committerMarek Olšák <[email protected]>2019-08-12 14:52:17 -0400
commitf8d4198998e770317b3647d36729638339aa5cd1 (patch)
tree10720160d7cd6552a5f8db87431c4cf7a84a1561 /src/gallium/auxiliary
parent8ac2583cd89dc7e8602eb967e2d502daaa31ae63 (diff)
tgsi_to_nir: handle tess level inner/outer varyings
for internal radeonsi shaders Reviewed-By: Timur Kristóf <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Connor Abbott <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r--src/gallium/auxiliary/nir/tgsi_to_nir.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/nir/tgsi_to_nir.c b/src/gallium/auxiliary/nir/tgsi_to_nir.c
index 24187503a30..09d7f18881e 100644
--- a/src/gallium/auxiliary/nir/tgsi_to_nir.c
+++ b/src/gallium/auxiliary/nir/tgsi_to_nir.c
@@ -158,6 +158,10 @@ tgsi_varying_semantic_to_slot(unsigned semantic, unsigned index)
return VARYING_SLOT_VIEWPORT;
case TGSI_SEMANTIC_LAYER:
return VARYING_SLOT_LAYER;
+ case TGSI_SEMANTIC_TESSINNER:
+ return VARYING_SLOT_TESS_LEVEL_INNER;
+ case TGSI_SEMANTIC_TESSOUTER:
+ return VARYING_SLOT_TESS_LEVEL_OUTER;
default:
fprintf(stderr, "Bad TGSI semantic: %d/%d\n", semantic, index);
abort();
@@ -393,6 +397,9 @@ ttn_emit_declaration(struct ttn_compile *c)
var->data.index = 0;
var->data.interpolation =
ttn_translate_interp_mode(decl->Interp.Interpolate);
+ var->data.patch = semantic_name == TGSI_SEMANTIC_TESSINNER ||
+ semantic_name == TGSI_SEMANTIC_TESSOUTER ||
+ semantic_name == TGSI_SEMANTIC_PATCH;
if (c->scan->processor == PIPE_SHADER_FRAGMENT) {
switch (semantic_name) {