From 3a633cc2cbd0a527ac97cfe60a9d66df18b7de64 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Thu, 30 Mar 2017 08:12:27 +0100 Subject: [PATCH] radv/ac: add support for patch inputs to unique index code. This add support for tessellation patch inputs to the code that finds the unique parameter index. Reviewed-by: Bas Nieuwenhuizen Signed-off-by: Dave Airlie --- src/amd/common/ac_nir_to_llvm.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c index 6f096dd2f53..cb7469168cd 100644 --- a/src/amd/common/ac_nir_to_llvm.c +++ b/src/amd/common/ac_nir_to_llvm.c @@ -179,6 +179,14 @@ static unsigned radeon_llvm_reg_index_soa(unsigned index, unsigned chan) static unsigned shader_io_get_unique_index(gl_varying_slot slot) { + /* handle patch indices separate */ + if (slot == VARYING_SLOT_TESS_LEVEL_OUTER) + return 0; + if (slot == VARYING_SLOT_TESS_LEVEL_INNER) + return 1; + if (slot >= VARYING_SLOT_PATCH0 && slot <= VARYING_SLOT_TESS_MAX) + return 2 + (slot - VARYING_SLOT_PATCH0); + if (slot == VARYING_SLOT_POS) return 0; if (slot == VARYING_SLOT_PSIZ) -- 2.30.2