mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-14 23:56:16 +00:00
tint/spirv: Fix atomicCompareExchangeWeak
We were missing an `UnwrapRef` when generating the return type, and were generating invalid SPIR-V when the value being stored was a reference. The auto-generated builtin tests only test with literal values. Fixed: tint:1573 Change-Id: If42280b3cc8ad3fba7355d333e02400c6db843fa Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/92144 Reviewed-by: Antonio Maiorano <amaiorano@google.com> Auto-Submit: James Price <jrprice@google.com> Kokoro: Kokoro <noreply+kokoro@google.com> Commit-Queue: James Price <jrprice@google.com>
This commit is contained in:
committed by
Dawn LUCI CQ
parent
6ac7c8a7b9
commit
37d92ca244
@@ -3161,7 +3161,7 @@ bool Builder::GenerateAtomicBuiltin(const sem::Call* call,
|
||||
return false;
|
||||
}
|
||||
|
||||
auto* value_sem_type = TypeOf(call->Arguments()[2]->Declaration());
|
||||
auto* value_sem_type = call->Target()->Signature().parameters[2]->Type();
|
||||
|
||||
auto value_type = GenerateTypeIfNeeded(value_sem_type);
|
||||
if (value_type == 0) {
|
||||
|
||||
Reference in New Issue
Block a user