mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-25 09:10:40 +02:00
ac/nir: fix atomic compare-and-swap
The LLVM instruction returns { i32, i1 }, where the i1 indicates success.
We're only interested in the first part, which is the loaded value.
Fixes dEQP-GLES31.functional.compute.shared_var.atomic.compswap.*
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
This commit is contained in:
parent
e788b987d8
commit
a807a9b215
1 changed files with 1 additions and 0 deletions
|
|
@ -2631,6 +2631,7 @@ static LLVMValueRef visit_var_atomic(struct ac_nir_context *ctx,
|
|||
LLVMAtomicOrderingSequentiallyConsistent,
|
||||
LLVMAtomicOrderingSequentiallyConsistent,
|
||||
false);
|
||||
result = LLVMBuildExtractValue(ctx->ac.builder, result, 0, "");
|
||||
} else {
|
||||
LLVMAtomicRMWBinOp op;
|
||||
switch (instr->intrinsic) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue