mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 09:28:07 +02:00
ac/nir: Fix ordering of parameters for image atomic cmpswap intrinsics
The NIR parameters are ordered "compare, data", matching GLSL, but both the image and buffer LLVM intrinsics take them the other way around. This is already handled correctly for SSBO atomics. Signed-off-by: Alex Smith <asmith@feralinteractive.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Fixes:f4e499ec79"radv: add initial non-conformant radv vulkan driver" (cherry picked from commitc2a5cb6427)
This commit is contained in:
parent
401c37f500
commit
49b5da785f
1 changed files with 1 additions and 1 deletions
|
|
@ -3370,9 +3370,9 @@ static LLVMValueRef visit_image_atomic(struct nir_to_llvm_context *ctx,
|
|||
abort();
|
||||
}
|
||||
|
||||
params[param_count++] = get_src(ctx, instr->src[2]);
|
||||
if (instr->intrinsic == nir_intrinsic_image_atomic_comp_swap)
|
||||
params[param_count++] = get_src(ctx, instr->src[3]);
|
||||
params[param_count++] = get_src(ctx, instr->src[2]);
|
||||
|
||||
if (glsl_get_sampler_dim(type) == GLSL_SAMPLER_DIM_BUF) {
|
||||
params[param_count++] = get_sampler_desc(ctx, instr->variables[0], DESC_BUFFER);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue