diff --git a/src/gallium/drivers/radeonsi/si_shader_llvm.c b/src/gallium/drivers/radeonsi/si_shader_llvm.c index 014e8a1d4b3..f3ffee660f8 100644 --- a/src/gallium/drivers/radeonsi/si_shader_llvm.c +++ b/src/gallium/drivers/radeonsi/si_shader_llvm.c @@ -356,22 +356,8 @@ LLVMValueRef si_llvm_get_block_size(struct ac_shader_abi *abi) { struct si_shader_context *ctx = si_shader_context_from_abi(abi); - LLVMValueRef values[3]; - LLVMValueRef result; - unsigned i; - - if (!ctx->shader->selector->info.base.cs.local_size_variable) { - uint16_t *local_size = ctx->shader->selector->info.base.cs.local_size; - - for (i = 0; i < 3; ++i) - values[i] = LLVMConstInt(ctx->ac.i32, local_size[i], 0); - - result = ac_build_gather_values(&ctx->ac, values, 3); - } else { - result = ac_get_arg(&ctx->ac, ctx->block_size); - } - - return result; + assert(ctx->shader->selector->info.base.cs.local_size_variable); + return ac_get_arg(&ctx->ac, ctx->block_size); } void si_llvm_declare_compute_memory(struct si_shader_context *ctx) diff --git a/src/gallium/drivers/radeonsi/si_shader_nir.c b/src/gallium/drivers/radeonsi/si_shader_nir.c index b39b6432d83..44b1a71a9e7 100644 --- a/src/gallium/drivers/radeonsi/si_shader_nir.c +++ b/src/gallium/drivers/radeonsi/si_shader_nir.c @@ -352,8 +352,7 @@ void si_nir_scan_shader(const struct nir_shader *nir, struct si_shader_info *inf info->uses_subgroup_info = nir->info.system_values_read & BITFIELD64_BIT(SYSTEM_VALUE_LOCAL_INVOCATION_INDEX) || nir->info.system_values_read & BITFIELD64_BIT(SYSTEM_VALUE_SUBGROUP_ID) || nir->info.system_values_read & BITFIELD64_BIT(SYSTEM_VALUE_NUM_SUBGROUPS); - info->uses_variable_block_size = info->base.cs.local_size_variable && - nir->info.system_values_read & BITFIELD64_BIT(SYSTEM_VALUE_LOCAL_GROUP_SIZE); + info->uses_variable_block_size = nir->info.system_values_read & BITFIELD64_BIT(SYSTEM_VALUE_LOCAL_GROUP_SIZE); info->uses_drawid = nir->info.system_values_read & BITFIELD64_BIT(SYSTEM_VALUE_DRAW_ID); info->uses_primid = nir->info.system_values_read & BITFIELD64_BIT(SYSTEM_VALUE_PRIMITIVE_ID) || nir->info.inputs_read & VARYING_BIT_PRIMITIVE_ID;