mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 10:50:10 +01:00
ac/llvm: fix the local invocation index for wave32
Fixes dEQP-VK.compute.builtin_var.local_invocation_index with RADV_PERFTEST=cswave32. My initial fix was to lower it but Rhys suggested the shift-right and it's much better like this. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
This commit is contained in:
parent
b99295fb33
commit
bfb307aea9
1 changed files with 4 additions and 0 deletions
|
|
@ -2905,6 +2905,10 @@ visit_load_local_invocation_index(struct ac_nir_context *ctx)
|
|||
result = LLVMBuildAnd(ctx->ac.builder, ctx->abi->tg_size,
|
||||
LLVMConstInt(ctx->ac.i32, 0xfc0, false), "");
|
||||
|
||||
if (ctx->ac.wave_size == 32)
|
||||
result = LLVMBuildLShr(ctx->ac.builder, result,
|
||||
LLVMConstInt(ctx->ac.i32, 1, false), "");
|
||||
|
||||
return LLVMBuildAdd(ctx->ac.builder, result, thread_id, "");
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue