From: Marek Olšák Date: Thu, 1 Aug 2019 18:16:01 +0000 (-0400) Subject: tgsi_to_nir: handle tess level inner/outer varyings X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f8d4198998e770317b3647d36729638339aa5cd1;p=mesa.git tgsi_to_nir: handle tess level inner/outer varyings for internal radeonsi shaders Reviewed-By: Timur Kristóf Reviewed-by: Eric Anholt Reviewed-by: Connor Abbott --- 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) {