From: Dave Airlie Date: Thu, 30 Mar 2017 07:12:27 +0000 (+0100) Subject: radv/ac: add support for patch inputs to unique index code. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3a633cc2cbd0a527ac97cfe60a9d66df18b7de64;p=mesa.git 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 --- 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)