diff options
author | Marek Olšák <[email protected]> | 2019-08-01 14:47:03 -0400 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2019-08-12 14:52:17 -0400 |
commit | 4e545f934f3bf6a58a1b41260366546a05333663 (patch) | |
tree | b8b82161584167e1fa84a82f8daa19f9dfb77b86 /src/amd | |
parent | 9c7746ceaea94cf9d5496d4d4680ada92f1553b1 (diff) |
radeonsi/nir: implement default tess level system values
Reviewed-by: Connor Abbott <[email protected]>
Diffstat (limited to 'src/amd')
-rw-r--r-- | src/amd/common/ac_nir_to_llvm.c | 10 | ||||
-rw-r--r-- | src/amd/common/ac_shader_abi.h | 3 |
2 files changed, 10 insertions, 3 deletions
diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c index 219aa5f95f0..9b59c82f385 100644 --- a/src/amd/common/ac_nir_to_llvm.c +++ b/src/amd/common/ac_nir_to_llvm.c @@ -3537,10 +3537,16 @@ static void visit_intrinsic(struct ac_nir_context *ctx, result = ctx->abi->load_tess_coord(ctx->abi); break; case nir_intrinsic_load_tess_level_outer: - result = ctx->abi->load_tess_level(ctx->abi, VARYING_SLOT_TESS_LEVEL_OUTER); + result = ctx->abi->load_tess_level(ctx->abi, VARYING_SLOT_TESS_LEVEL_OUTER, false); break; case nir_intrinsic_load_tess_level_inner: - result = ctx->abi->load_tess_level(ctx->abi, VARYING_SLOT_TESS_LEVEL_INNER); + result = ctx->abi->load_tess_level(ctx->abi, VARYING_SLOT_TESS_LEVEL_INNER, false); + break; + case nir_intrinsic_load_tess_level_outer_default: + result = ctx->abi->load_tess_level(ctx->abi, VARYING_SLOT_TESS_LEVEL_OUTER, true); + break; + case nir_intrinsic_load_tess_level_inner_default: + result = ctx->abi->load_tess_level(ctx->abi, VARYING_SLOT_TESS_LEVEL_INNER, true); break; case nir_intrinsic_load_patch_vertices_in: result = ctx->abi->load_patch_vertices_in(ctx->abi); diff --git a/src/amd/common/ac_shader_abi.h b/src/amd/common/ac_shader_abi.h index 3a2b5322385..7dd580bb195 100644 --- a/src/amd/common/ac_shader_abi.h +++ b/src/amd/common/ac_shader_abi.h @@ -139,7 +139,8 @@ struct ac_shader_abi { LLVMValueRef (*load_patch_vertices_in)(struct ac_shader_abi *abi); LLVMValueRef (*load_tess_level)(struct ac_shader_abi *abi, - unsigned varying_id); + unsigned varying_id, + bool load_default_state); LLVMValueRef (*load_ubo)(struct ac_shader_abi *abi, LLVMValueRef index); |