diff options
author | Marek Olšák <[email protected]> | 2019-11-06 20:19:10 -0500 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2019-11-27 19:28:10 -0500 |
commit | 42318f9197c3a5e6c715c1b8260275717251848f (patch) | |
tree | 955d96cb2e082cc437320aa19f3f925d898abe9f /src | |
parent | 51cc380894b6c541ac3383336389242cf3f9fd67 (diff) |
ac/nir: don't rely on data.patch for tess factors
Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/amd/llvm/ac_nir_to_llvm.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/amd/llvm/ac_nir_to_llvm.c b/src/amd/llvm/ac_nir_to_llvm.c index 210a37a3906..589f39c3c03 100644 --- a/src/amd/llvm/ac_nir_to_llvm.c +++ b/src/amd/llvm/ac_nir_to_llvm.c @@ -2000,7 +2000,9 @@ static LLVMValueRef load_tess_varyings(struct ac_nir_context *ctx, unsigned location = var->data.location; unsigned driver_location = var->data.driver_location; - const bool is_patch = var->data.patch; + const bool is_patch = var->data.patch || + var->data.location == VARYING_SLOT_TESS_LEVEL_INNER || + var->data.location == VARYING_SLOT_TESS_LEVEL_OUTER; const bool is_compact = var->data.compact; get_deref_offset(ctx, nir_instr_as_deref(instr->src[0].ssa->parent_instr), @@ -2247,7 +2249,9 @@ visit_store_var(struct ac_nir_context *ctx, LLVMValueRef vertex_index = NULL; LLVMValueRef indir_index = NULL; unsigned const_index = 0; - const bool is_patch = var->data.patch; + const bool is_patch = var->data.patch || + var->data.location == VARYING_SLOT_TESS_LEVEL_INNER || + var->data.location == VARYING_SLOT_TESS_LEVEL_OUTER; get_deref_offset(ctx, deref, false, NULL, is_patch ? NULL : &vertex_index, |