mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-12 06:45:16 +00:00
[writer/hlsl]: Fix order of atomic method arguments.
Change-Id: Ice1b07c748bc6502a51b29690dfc00466a684c12 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/57461 Auto-Submit: Ben Clayton <bclayton@google.com> Commit-Queue: James Price <jrprice@google.com> Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: James Price <jrprice@google.com>
This commit is contained in:
committed by
Tint LUCI CQ
parent
3d9f0e99c2
commit
1843c0b8d7
@@ -880,6 +880,10 @@ bool GeneratorImpl::EmitStorageAtomicCall(
|
||||
auto* offset = expr->params()[1];
|
||||
|
||||
auto call_buffer_method = [&](const char* name) {
|
||||
// First two arguments to the DecomposeMemoryAccess::Intrinsic are the
|
||||
// buffer and offset. The buffer is the moved to the LHS of the '.', and the
|
||||
// offset becomes the first argument. The rest of the method's arguments are
|
||||
// the same.
|
||||
auto pre = line();
|
||||
if (!EmitExpression(pre, buffer)) {
|
||||
return false;
|
||||
@@ -891,7 +895,7 @@ bool GeneratorImpl::EmitStorageAtomicCall(
|
||||
return false;
|
||||
}
|
||||
|
||||
for (size_t i = 1; i < expr->params().size() - 1; i++) {
|
||||
for (size_t i = 2; i < expr->params().size(); i++) {
|
||||
auto* arg = expr->params()[i];
|
||||
pre << ", ";
|
||||
if (!EmitExpression(pre, arg)) {
|
||||
|
||||
Reference in New Issue
Block a user