From f8d4198998e770317b3647d36729638339aa5cd1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Thu, 1 Aug 2019 14:16:01 -0400 Subject: [PATCH] tgsi_to_nir: handle tess level inner/outer varyings MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit for internal radeonsi shaders Reviewed-By: Timur Kristóf Reviewed-by: Eric Anholt Reviewed-by: Connor Abbott --- src/gallium/auxiliary/nir/tgsi_to_nir.c | 7 +++++++ 1 file changed, 7 insertions(+) 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) { -- 2.30.2