diff options
author | Dave Airlie <[email protected]> | 2017-03-30 08:12:27 +0100 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2017-04-01 07:15:57 +1000 |
commit | 3a633cc2cbd0a527ac97cfe60a9d66df18b7de64 (patch) | |
tree | 4972703ca632c6f404cd6536bafd6ece279943dc /src/amd | |
parent | aeb49bc2b9e1d6f98b760a8cc3f208418b7f4349 (diff) |
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 <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/amd')
-rw-r--r-- | src/amd/common/ac_nir_to_llvm.c | 8 |
1 files changed, 8 insertions, 0 deletions
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) |