ac/radeonsi: add load_local_group_size() to the abi
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -5985,6 +5985,7 @@ static bool si_compile_tgsi_main(struct si_shader_context *ctx,
|
||||
ctx->abi.load_sample_position = load_sample_position;
|
||||
break;
|
||||
case PIPE_SHADER_COMPUTE:
|
||||
ctx->abi.load_local_group_size = get_block_size;
|
||||
break;
|
||||
default:
|
||||
assert(!"Unsupported shader type");
|
||||
|
||||
Reference in New Issue
Block a user