[Mesa-dev] [PATCH 13/25] radv/ac: add support for patch inputs to unique index code.
Dave Airlie
airlied at gmail.com
Thu Mar 30 08:01:03 UTC 2017
From: Dave Airlie <airlied at redhat.com>
This add support for tessellation patch inputs to the code
that finds the unique parameter index.
Signed-off-by: Dave Airlie <airlied at redhat.com>
---
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 dbbf91c..f8350d8 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.9.3
More information about the mesa-dev
mailing list