From d116af383ffef775ccfc8f2f64b603aebb6b374a Mon Sep 17 00:00:00 2001 From: Timothy Arceri Date: Fri, 2 Feb 2018 13:14:41 +1100 Subject: ac/radeonsi: add load_local_group_size() to the abi MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Marek Olšák --- src/amd/common/ac_nir_to_llvm.c | 3 +++ src/amd/common/ac_shader_abi.h | 2 ++ 2 files changed, 5 insertions(+) (limited to 'src/amd') diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c index ae569d4c7fc..9dcbe253803 100644 --- a/src/amd/common/ac_nir_to_llvm.c +++ b/src/amd/common/ac_nir_to_llvm.c @@ -4308,6 +4308,9 @@ static void visit_intrinsic(struct ac_nir_context *ctx, result = ctx->abi->base_vertex; break; } + case nir_intrinsic_load_local_group_size: + result = ctx->abi->load_local_group_size(ctx->abi); + break; case nir_intrinsic_load_vertex_id_zero_base: { result = ctx->abi->vertex_id; break; diff --git a/src/amd/common/ac_shader_abi.h b/src/amd/common/ac_shader_abi.h index 9a35ff925b4..55842ea342d 100644 --- a/src/amd/common/ac_shader_abi.h +++ b/src/amd/common/ac_shader_abi.h @@ -157,6 +157,8 @@ struct ac_shader_abi { LLVMValueRef (*load_sample_position)(struct ac_shader_abi *abi, LLVMValueRef sample_id); + LLVMValueRef (*load_local_group_size)(struct ac_shader_abi *abi); + /* Whether to clamp the shadow reference value to [0,1]on VI. Radeonsi currently * uses it due to promoting D16 to D32, but radv needs it off. */ bool clamp_shadow_reference; -- cgit v1.2.3