From 0a32a724f4a8105663e5e63d1df8298d09ca92b4 Mon Sep 17 00:00:00 2001 From: Ben Clayton Date: Fri, 18 Jun 2021 18:56:13 +0000 Subject: [PATCH] writer/wgsl: Emit atomic types Bug: tint:892 Change-Id: Ie483167bcf669e5f2d6b5489a915584fc3678183 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/54649 Kokoro: Kokoro Reviewed-by: David Neto --- src/writer/wgsl/generator_impl.cc | 7 ++++++ .../gen/atomicAdd/794055.wgsl.expected.hlsl | 12 +++++++++- .../gen/atomicAdd/794055.wgsl.expected.spvasm | 12 +++++++++- .../gen/atomicAdd/794055.wgsl.expected.wgsl | 11 ++++++--- .../gen/atomicAdd/8a199a.wgsl.expected.msl | 20 +++++++++++++++- .../gen/atomicAdd/8a199a.wgsl.expected.spvasm | 20 +++++++++++++++- .../gen/atomicAdd/8a199a.wgsl.expected.wgsl | 23 +++++++++++++++---- .../gen/atomicAdd/d32fe4.wgsl.expected.msl | 20 +++++++++++++++- .../gen/atomicAdd/d32fe4.wgsl.expected.spvasm | 20 +++++++++++++++- .../gen/atomicAdd/d32fe4.wgsl.expected.wgsl | 23 +++++++++++++++---- .../gen/atomicAdd/d5db1d.wgsl.expected.hlsl | 12 +++++++++- .../gen/atomicAdd/d5db1d.wgsl.expected.spvasm | 12 +++++++++- .../gen/atomicAdd/d5db1d.wgsl.expected.wgsl | 11 ++++++--- .../gen/atomicAnd/152966.wgsl.expected.msl | 20 +++++++++++++++- .../gen/atomicAnd/152966.wgsl.expected.spvasm | 20 +++++++++++++++- .../gen/atomicAnd/152966.wgsl.expected.wgsl | 23 +++++++++++++++---- .../gen/atomicAnd/34edd3.wgsl.expected.hlsl | 12 +++++++++- .../gen/atomicAnd/34edd3.wgsl.expected.spvasm | 12 +++++++++- .../gen/atomicAnd/34edd3.wgsl.expected.wgsl | 11 ++++++--- .../gen/atomicAnd/45a819.wgsl.expected.hlsl | 12 +++++++++- .../gen/atomicAnd/45a819.wgsl.expected.spvasm | 12 +++++++++- .../gen/atomicAnd/45a819.wgsl.expected.wgsl | 11 ++++++--- .../gen/atomicAnd/85a8d9.wgsl.expected.msl | 20 +++++++++++++++- .../gen/atomicAnd/85a8d9.wgsl.expected.spvasm | 20 +++++++++++++++- .../gen/atomicAnd/85a8d9.wgsl.expected.wgsl | 23 +++++++++++++++---- .../12871c.wgsl.expected.msl | 20 +++++++++++++++- .../12871c.wgsl.expected.spvasm | 20 +++++++++++++++- .../12871c.wgsl.expected.wgsl | 23 +++++++++++++++---- .../6673da.wgsl.expected.msl | 20 +++++++++++++++- .../6673da.wgsl.expected.spvasm | 20 +++++++++++++++- .../6673da.wgsl.expected.wgsl | 23 +++++++++++++++---- .../89ea3b.wgsl.expected.hlsl | 12 +++++++++- .../89ea3b.wgsl.expected.spvasm | 12 +++++++++- .../89ea3b.wgsl.expected.wgsl | 11 ++++++--- .../b2ab2c.wgsl.expected.hlsl | 12 +++++++++- .../b2ab2c.wgsl.expected.spvasm | 12 +++++++++- .../b2ab2c.wgsl.expected.wgsl | 11 ++++++--- .../atomicExchange/0a5dca.wgsl.expected.hlsl | 12 +++++++++- .../0a5dca.wgsl.expected.spvasm | 12 +++++++++- .../atomicExchange/0a5dca.wgsl.expected.wgsl | 11 ++++++--- .../atomicExchange/d59712.wgsl.expected.msl | 20 +++++++++++++++- .../d59712.wgsl.expected.spvasm | 20 +++++++++++++++- .../atomicExchange/d59712.wgsl.expected.wgsl | 23 +++++++++++++++---- .../atomicExchange/e114ba.wgsl.expected.hlsl | 12 +++++++++- .../e114ba.wgsl.expected.spvasm | 12 +++++++++- .../atomicExchange/e114ba.wgsl.expected.wgsl | 11 ++++++--- .../atomicExchange/f2e22f.wgsl.expected.msl | 20 +++++++++++++++- .../f2e22f.wgsl.expected.spvasm | 20 +++++++++++++++- .../atomicExchange/f2e22f.wgsl.expected.wgsl | 23 +++++++++++++++---- .../gen/atomicLoad/0806ad.wgsl.expected.msl | 20 +++++++++++++++- .../atomicLoad/0806ad.wgsl.expected.spvasm | 20 +++++++++++++++- .../gen/atomicLoad/0806ad.wgsl.expected.wgsl | 23 +++++++++++++++---- .../gen/atomicLoad/361bf1.wgsl.expected.hlsl | 12 +++++++++- .../atomicLoad/361bf1.wgsl.expected.spvasm | 12 +++++++++- .../gen/atomicLoad/361bf1.wgsl.expected.wgsl | 11 ++++++--- .../gen/atomicLoad/afcc03.wgsl.expected.hlsl | 12 +++++++++- .../atomicLoad/afcc03.wgsl.expected.spvasm | 12 +++++++++- .../gen/atomicLoad/afcc03.wgsl.expected.wgsl | 11 ++++++--- .../gen/atomicLoad/fe6cc3.wgsl.expected.msl | 20 +++++++++++++++- .../atomicLoad/fe6cc3.wgsl.expected.spvasm | 20 +++++++++++++++- .../gen/atomicLoad/fe6cc3.wgsl.expected.wgsl | 23 +++++++++++++++---- .../gen/atomicMax/51b9be.wgsl.expected.msl | 20 +++++++++++++++- .../gen/atomicMax/51b9be.wgsl.expected.spvasm | 20 +++++++++++++++- .../gen/atomicMax/51b9be.wgsl.expected.wgsl | 23 +++++++++++++++---- .../gen/atomicMax/92aa72.wgsl.expected.msl | 20 +++++++++++++++- .../gen/atomicMax/92aa72.wgsl.expected.spvasm | 20 +++++++++++++++- .../gen/atomicMax/92aa72.wgsl.expected.wgsl | 23 +++++++++++++++---- .../gen/atomicMax/a89cc3.wgsl.expected.hlsl | 12 +++++++++- .../gen/atomicMax/a89cc3.wgsl.expected.spvasm | 12 +++++++++- .../gen/atomicMax/a89cc3.wgsl.expected.wgsl | 11 ++++++--- .../gen/atomicMax/beccfc.wgsl.expected.hlsl | 12 +++++++++- .../gen/atomicMax/beccfc.wgsl.expected.spvasm | 12 +++++++++- .../gen/atomicMax/beccfc.wgsl.expected.wgsl | 11 ++++++--- .../gen/atomicMin/278235.wgsl.expected.hlsl | 12 +++++++++- .../gen/atomicMin/278235.wgsl.expected.spvasm | 12 +++++++++- .../gen/atomicMin/278235.wgsl.expected.wgsl | 11 ++++++--- .../gen/atomicMin/69d383.wgsl.expected.hlsl | 12 +++++++++- .../gen/atomicMin/69d383.wgsl.expected.spvasm | 12 +++++++++- .../gen/atomicMin/69d383.wgsl.expected.wgsl | 11 ++++++--- .../gen/atomicMin/8e38dc.wgsl.expected.msl | 20 +++++++++++++++- .../gen/atomicMin/8e38dc.wgsl.expected.spvasm | 20 +++++++++++++++- .../gen/atomicMin/8e38dc.wgsl.expected.wgsl | 23 +++++++++++++++---- .../gen/atomicMin/c67a74.wgsl.expected.msl | 20 +++++++++++++++- .../gen/atomicMin/c67a74.wgsl.expected.spvasm | 20 +++++++++++++++- .../gen/atomicMin/c67a74.wgsl.expected.wgsl | 23 +++++++++++++++---- .../gen/atomicOr/5e3d61.wgsl.expected.hlsl | 12 +++++++++- .../gen/atomicOr/5e3d61.wgsl.expected.spvasm | 12 +++++++++- .../gen/atomicOr/5e3d61.wgsl.expected.wgsl | 11 ++++++--- .../gen/atomicOr/5e95d4.wgsl.expected.msl | 20 +++++++++++++++- .../gen/atomicOr/5e95d4.wgsl.expected.spvasm | 20 +++++++++++++++- .../gen/atomicOr/5e95d4.wgsl.expected.wgsl | 23 +++++++++++++++---- .../gen/atomicOr/8d96a0.wgsl.expected.msl | 20 +++++++++++++++- .../gen/atomicOr/8d96a0.wgsl.expected.spvasm | 20 +++++++++++++++- .../gen/atomicOr/8d96a0.wgsl.expected.wgsl | 23 +++++++++++++++---- .../gen/atomicOr/d09248.wgsl.expected.hlsl | 12 +++++++++- .../gen/atomicOr/d09248.wgsl.expected.spvasm | 12 +++++++++- .../gen/atomicOr/d09248.wgsl.expected.wgsl | 11 ++++++--- .../gen/atomicStore/726882.wgsl.expected.hlsl | 12 +++++++++- .../atomicStore/726882.wgsl.expected.spvasm | 12 +++++++++- .../gen/atomicStore/726882.wgsl.expected.wgsl | 11 ++++++--- .../gen/atomicStore/8bea94.wgsl.expected.hlsl | 12 +++++++++- .../atomicStore/8bea94.wgsl.expected.spvasm | 12 +++++++++- .../gen/atomicStore/8bea94.wgsl.expected.wgsl | 11 ++++++--- .../gen/atomicStore/cdc29e.wgsl.expected.msl | 20 +++++++++++++++- .../atomicStore/cdc29e.wgsl.expected.spvasm | 20 +++++++++++++++- .../gen/atomicStore/cdc29e.wgsl.expected.wgsl | 23 +++++++++++++++---- .../gen/atomicStore/d1e9a6.wgsl.expected.msl | 20 +++++++++++++++- .../atomicStore/d1e9a6.wgsl.expected.spvasm | 20 +++++++++++++++- .../gen/atomicStore/d1e9a6.wgsl.expected.wgsl | 23 +++++++++++++++---- .../gen/atomicXor/54510e.wgsl.expected.msl | 20 +++++++++++++++- .../gen/atomicXor/54510e.wgsl.expected.spvasm | 20 +++++++++++++++- .../gen/atomicXor/54510e.wgsl.expected.wgsl | 23 +++++++++++++++---- .../gen/atomicXor/75dc95.wgsl.expected.hlsl | 12 +++++++++- .../gen/atomicXor/75dc95.wgsl.expected.spvasm | 12 +++++++++- .../gen/atomicXor/75dc95.wgsl.expected.wgsl | 11 ++++++--- .../gen/atomicXor/c1b78c.wgsl.expected.msl | 20 +++++++++++++++- .../gen/atomicXor/c1b78c.wgsl.expected.spvasm | 20 +++++++++++++++- .../gen/atomicXor/c1b78c.wgsl.expected.wgsl | 23 +++++++++++++++---- .../gen/atomicXor/c8e6be.wgsl.expected.hlsl | 12 +++++++++- .../gen/atomicXor/c8e6be.wgsl.expected.spvasm | 12 +++++++++- .../gen/atomicXor/c8e6be.wgsl.expected.wgsl | 11 ++++++--- 121 files changed, 1727 insertions(+), 240 deletions(-) diff --git a/src/writer/wgsl/generator_impl.cc b/src/writer/wgsl/generator_impl.cc index 8b01b28dd0..94d7b3a55f 100644 --- a/src/writer/wgsl/generator_impl.cc +++ b/src/writer/wgsl/generator_impl.cc @@ -20,6 +20,7 @@ #include "src/ast/access.h" #include "src/ast/alias.h" #include "src/ast/array.h" +#include "src/ast/atomic.h" #include "src/ast/bool.h" #include "src/ast/bool_literal.h" #include "src/ast/call_statement.h" @@ -409,6 +410,12 @@ bool GeneratorImpl::EmitType(const ast::Type* ty) { return false; } out_ << ">"; + } else if (auto* atomic = ty->As()) { + out_ << "atomic<"; + if (!EmitType(atomic->type())) { + return false; + } + out_ << ">"; } else if (auto* sampler = ty->As()) { out_ << "sampler"; diff --git a/test/intrinsics/gen/atomicAdd/794055.wgsl.expected.hlsl b/test/intrinsics/gen/atomicAdd/794055.wgsl.expected.hlsl index 83c0306c0f..1722f96692 100644 --- a/test/intrinsics/gen/atomicAdd/794055.wgsl.expected.hlsl +++ b/test/intrinsics/gen/atomicAdd/794055.wgsl.expected.hlsl @@ -1,5 +1,15 @@ SKIP: FAILED -var arg_0 : +var arg_0 : atomic; + +fn atomicAdd_794055() { + var res : i32 = atomicAdd(&(arg_0), 1); +} + +[[stage(compute)]] +fn compute_main() { + atomicAdd_794055(); +} + Failed to generate: error: unknown type in EmitType diff --git a/test/intrinsics/gen/atomicAdd/794055.wgsl.expected.spvasm b/test/intrinsics/gen/atomicAdd/794055.wgsl.expected.spvasm index ef25b4ffbe..03bf81e6be 100644 --- a/test/intrinsics/gen/atomicAdd/794055.wgsl.expected.spvasm +++ b/test/intrinsics/gen/atomicAdd/794055.wgsl.expected.spvasm @@ -1,5 +1,15 @@ SKIP: FAILED -var arg_0 : +var arg_0 : atomic; + +fn atomicAdd_794055() { + var res : i32 = atomicAdd(&(arg_0), 1); +} + +[[stage(compute)]] +fn compute_main() { + atomicAdd_794055(); +} + Failed to generate: unable to convert type: __atomic__i32 diff --git a/test/intrinsics/gen/atomicAdd/794055.wgsl.expected.wgsl b/test/intrinsics/gen/atomicAdd/794055.wgsl.expected.wgsl index d42e421a5b..de545c8288 100644 --- a/test/intrinsics/gen/atomicAdd/794055.wgsl.expected.wgsl +++ b/test/intrinsics/gen/atomicAdd/794055.wgsl.expected.wgsl @@ -1,5 +1,10 @@ -SKIP: FAILED +var arg_0 : atomic; +fn atomicAdd_794055() { + var res : i32 = atomicAdd(&(arg_0), 1); +} -var arg_0 : -Failed to generate: error: unknown type in EmitType: __atomic__i32 +[[stage(compute)]] +fn compute_main() { + atomicAdd_794055(); +} diff --git a/test/intrinsics/gen/atomicAdd/8a199a.wgsl.expected.msl b/test/intrinsics/gen/atomicAdd/8a199a.wgsl.expected.msl index 28d463e18d..86b5492fb0 100644 --- a/test/intrinsics/gen/atomicAdd/8a199a.wgsl.expected.msl +++ b/test/intrinsics/gen/atomicAdd/8a199a.wgsl.expected.msl @@ -3,5 +3,23 @@ SKIP: FAILED [[block]] struct SB_RW { - arg_0 : + arg_0 : atomic; +}; + +[[group(0), binding(0)]] var sb_rw : SB_RW; + +fn atomicAdd_8a199a() { + var res : u32 = atomicAdd(&(sb_rw.arg_0), 1u); +} + +[[stage(fragment)]] +fn fragment_main() { + atomicAdd_8a199a(); +} + +[[stage(compute)]] +fn compute_main() { + atomicAdd_8a199a(); +} + Failed to generate: error: unknown type in EmitType: __atomic__u32 diff --git a/test/intrinsics/gen/atomicAdd/8a199a.wgsl.expected.spvasm b/test/intrinsics/gen/atomicAdd/8a199a.wgsl.expected.spvasm index 1013691440..0aef1b3487 100644 --- a/test/intrinsics/gen/atomicAdd/8a199a.wgsl.expected.spvasm +++ b/test/intrinsics/gen/atomicAdd/8a199a.wgsl.expected.spvasm @@ -3,5 +3,23 @@ SKIP: FAILED [[block]] struct SB_RW { - arg_0 : + arg_0 : atomic; +}; + +[[group(0), binding(0)]] var sb_rw : SB_RW; + +fn atomicAdd_8a199a() { + var res : u32 = atomicAdd(&(sb_rw.arg_0), 1u); +} + +[[stage(fragment)]] +fn fragment_main() { + atomicAdd_8a199a(); +} + +[[stage(compute)]] +fn compute_main() { + atomicAdd_8a199a(); +} + Failed to generate: unable to convert type: __atomic__u32 diff --git a/test/intrinsics/gen/atomicAdd/8a199a.wgsl.expected.wgsl b/test/intrinsics/gen/atomicAdd/8a199a.wgsl.expected.wgsl index 28d463e18d..cd7a8e1370 100644 --- a/test/intrinsics/gen/atomicAdd/8a199a.wgsl.expected.wgsl +++ b/test/intrinsics/gen/atomicAdd/8a199a.wgsl.expected.wgsl @@ -1,7 +1,20 @@ -SKIP: FAILED - - [[block]] struct SB_RW { - arg_0 : -Failed to generate: error: unknown type in EmitType: __atomic__u32 + arg_0 : atomic; +}; + +[[group(0), binding(0)]] var sb_rw : SB_RW; + +fn atomicAdd_8a199a() { + var res : u32 = atomicAdd(&(sb_rw.arg_0), 1u); +} + +[[stage(fragment)]] +fn fragment_main() { + atomicAdd_8a199a(); +} + +[[stage(compute)]] +fn compute_main() { + atomicAdd_8a199a(); +} diff --git a/test/intrinsics/gen/atomicAdd/d32fe4.wgsl.expected.msl b/test/intrinsics/gen/atomicAdd/d32fe4.wgsl.expected.msl index 6088b5aeb6..85b0ee5491 100644 --- a/test/intrinsics/gen/atomicAdd/d32fe4.wgsl.expected.msl +++ b/test/intrinsics/gen/atomicAdd/d32fe4.wgsl.expected.msl @@ -3,5 +3,23 @@ SKIP: FAILED [[block]] struct SB_RW { - arg_0 : + arg_0 : atomic; +}; + +[[group(0), binding(0)]] var sb_rw : SB_RW; + +fn atomicAdd_d32fe4() { + var res : i32 = atomicAdd(&(sb_rw.arg_0), 1); +} + +[[stage(fragment)]] +fn fragment_main() { + atomicAdd_d32fe4(); +} + +[[stage(compute)]] +fn compute_main() { + atomicAdd_d32fe4(); +} + Failed to generate: error: unknown type in EmitType: __atomic__i32 diff --git a/test/intrinsics/gen/atomicAdd/d32fe4.wgsl.expected.spvasm b/test/intrinsics/gen/atomicAdd/d32fe4.wgsl.expected.spvasm index 17354c31f5..9240e6e475 100644 --- a/test/intrinsics/gen/atomicAdd/d32fe4.wgsl.expected.spvasm +++ b/test/intrinsics/gen/atomicAdd/d32fe4.wgsl.expected.spvasm @@ -3,5 +3,23 @@ SKIP: FAILED [[block]] struct SB_RW { - arg_0 : + arg_0 : atomic; +}; + +[[group(0), binding(0)]] var sb_rw : SB_RW; + +fn atomicAdd_d32fe4() { + var res : i32 = atomicAdd(&(sb_rw.arg_0), 1); +} + +[[stage(fragment)]] +fn fragment_main() { + atomicAdd_d32fe4(); +} + +[[stage(compute)]] +fn compute_main() { + atomicAdd_d32fe4(); +} + Failed to generate: unable to convert type: __atomic__i32 diff --git a/test/intrinsics/gen/atomicAdd/d32fe4.wgsl.expected.wgsl b/test/intrinsics/gen/atomicAdd/d32fe4.wgsl.expected.wgsl index 6088b5aeb6..acdcce6ab3 100644 --- a/test/intrinsics/gen/atomicAdd/d32fe4.wgsl.expected.wgsl +++ b/test/intrinsics/gen/atomicAdd/d32fe4.wgsl.expected.wgsl @@ -1,7 +1,20 @@ -SKIP: FAILED - - [[block]] struct SB_RW { - arg_0 : -Failed to generate: error: unknown type in EmitType: __atomic__i32 + arg_0 : atomic; +}; + +[[group(0), binding(0)]] var sb_rw : SB_RW; + +fn atomicAdd_d32fe4() { + var res : i32 = atomicAdd(&(sb_rw.arg_0), 1); +} + +[[stage(fragment)]] +fn fragment_main() { + atomicAdd_d32fe4(); +} + +[[stage(compute)]] +fn compute_main() { + atomicAdd_d32fe4(); +} diff --git a/test/intrinsics/gen/atomicAdd/d5db1d.wgsl.expected.hlsl b/test/intrinsics/gen/atomicAdd/d5db1d.wgsl.expected.hlsl index 83c0306c0f..388aa97782 100644 --- a/test/intrinsics/gen/atomicAdd/d5db1d.wgsl.expected.hlsl +++ b/test/intrinsics/gen/atomicAdd/d5db1d.wgsl.expected.hlsl @@ -1,5 +1,15 @@ SKIP: FAILED -var arg_0 : +var arg_0 : atomic; + +fn atomicAdd_d5db1d() { + var res : u32 = atomicAdd(&(arg_0), 1u); +} + +[[stage(compute)]] +fn compute_main() { + atomicAdd_d5db1d(); +} + Failed to generate: error: unknown type in EmitType diff --git a/test/intrinsics/gen/atomicAdd/d5db1d.wgsl.expected.spvasm b/test/intrinsics/gen/atomicAdd/d5db1d.wgsl.expected.spvasm index 9fdcd875e2..e5ca410e73 100644 --- a/test/intrinsics/gen/atomicAdd/d5db1d.wgsl.expected.spvasm +++ b/test/intrinsics/gen/atomicAdd/d5db1d.wgsl.expected.spvasm @@ -1,5 +1,15 @@ SKIP: FAILED -var arg_0 : +var arg_0 : atomic; + +fn atomicAdd_d5db1d() { + var res : u32 = atomicAdd(&(arg_0), 1u); +} + +[[stage(compute)]] +fn compute_main() { + atomicAdd_d5db1d(); +} + Failed to generate: unable to convert type: __atomic__u32 diff --git a/test/intrinsics/gen/atomicAdd/d5db1d.wgsl.expected.wgsl b/test/intrinsics/gen/atomicAdd/d5db1d.wgsl.expected.wgsl index caa65d286b..af92a4103e 100644 --- a/test/intrinsics/gen/atomicAdd/d5db1d.wgsl.expected.wgsl +++ b/test/intrinsics/gen/atomicAdd/d5db1d.wgsl.expected.wgsl @@ -1,5 +1,10 @@ -SKIP: FAILED +var arg_0 : atomic; +fn atomicAdd_d5db1d() { + var res : u32 = atomicAdd(&(arg_0), 1u); +} -var arg_0 : -Failed to generate: error: unknown type in EmitType: __atomic__u32 +[[stage(compute)]] +fn compute_main() { + atomicAdd_d5db1d(); +} diff --git a/test/intrinsics/gen/atomicAnd/152966.wgsl.expected.msl b/test/intrinsics/gen/atomicAnd/152966.wgsl.expected.msl index 6088b5aeb6..efcd326bcd 100644 --- a/test/intrinsics/gen/atomicAnd/152966.wgsl.expected.msl +++ b/test/intrinsics/gen/atomicAnd/152966.wgsl.expected.msl @@ -3,5 +3,23 @@ SKIP: FAILED [[block]] struct SB_RW { - arg_0 : + arg_0 : atomic; +}; + +[[group(0), binding(0)]] var sb_rw : SB_RW; + +fn atomicAnd_152966() { + var res : i32 = atomicAnd(&(sb_rw.arg_0), 1); +} + +[[stage(fragment)]] +fn fragment_main() { + atomicAnd_152966(); +} + +[[stage(compute)]] +fn compute_main() { + atomicAnd_152966(); +} + Failed to generate: error: unknown type in EmitType: __atomic__i32 diff --git a/test/intrinsics/gen/atomicAnd/152966.wgsl.expected.spvasm b/test/intrinsics/gen/atomicAnd/152966.wgsl.expected.spvasm index 17354c31f5..ab01640088 100644 --- a/test/intrinsics/gen/atomicAnd/152966.wgsl.expected.spvasm +++ b/test/intrinsics/gen/atomicAnd/152966.wgsl.expected.spvasm @@ -3,5 +3,23 @@ SKIP: FAILED [[block]] struct SB_RW { - arg_0 : + arg_0 : atomic; +}; + +[[group(0), binding(0)]] var sb_rw : SB_RW; + +fn atomicAnd_152966() { + var res : i32 = atomicAnd(&(sb_rw.arg_0), 1); +} + +[[stage(fragment)]] +fn fragment_main() { + atomicAnd_152966(); +} + +[[stage(compute)]] +fn compute_main() { + atomicAnd_152966(); +} + Failed to generate: unable to convert type: __atomic__i32 diff --git a/test/intrinsics/gen/atomicAnd/152966.wgsl.expected.wgsl b/test/intrinsics/gen/atomicAnd/152966.wgsl.expected.wgsl index 6088b5aeb6..0f3e8649f1 100644 --- a/test/intrinsics/gen/atomicAnd/152966.wgsl.expected.wgsl +++ b/test/intrinsics/gen/atomicAnd/152966.wgsl.expected.wgsl @@ -1,7 +1,20 @@ -SKIP: FAILED - - [[block]] struct SB_RW { - arg_0 : -Failed to generate: error: unknown type in EmitType: __atomic__i32 + arg_0 : atomic; +}; + +[[group(0), binding(0)]] var sb_rw : SB_RW; + +fn atomicAnd_152966() { + var res : i32 = atomicAnd(&(sb_rw.arg_0), 1); +} + +[[stage(fragment)]] +fn fragment_main() { + atomicAnd_152966(); +} + +[[stage(compute)]] +fn compute_main() { + atomicAnd_152966(); +} diff --git a/test/intrinsics/gen/atomicAnd/34edd3.wgsl.expected.hlsl b/test/intrinsics/gen/atomicAnd/34edd3.wgsl.expected.hlsl index 83c0306c0f..b51ffc031a 100644 --- a/test/intrinsics/gen/atomicAnd/34edd3.wgsl.expected.hlsl +++ b/test/intrinsics/gen/atomicAnd/34edd3.wgsl.expected.hlsl @@ -1,5 +1,15 @@ SKIP: FAILED -var arg_0 : +var arg_0 : atomic; + +fn atomicAnd_34edd3() { + var res : u32 = atomicAnd(&(arg_0), 1u); +} + +[[stage(compute)]] +fn compute_main() { + atomicAnd_34edd3(); +} + Failed to generate: error: unknown type in EmitType diff --git a/test/intrinsics/gen/atomicAnd/34edd3.wgsl.expected.spvasm b/test/intrinsics/gen/atomicAnd/34edd3.wgsl.expected.spvasm index 9fdcd875e2..d123701d2f 100644 --- a/test/intrinsics/gen/atomicAnd/34edd3.wgsl.expected.spvasm +++ b/test/intrinsics/gen/atomicAnd/34edd3.wgsl.expected.spvasm @@ -1,5 +1,15 @@ SKIP: FAILED -var arg_0 : +var arg_0 : atomic; + +fn atomicAnd_34edd3() { + var res : u32 = atomicAnd(&(arg_0), 1u); +} + +[[stage(compute)]] +fn compute_main() { + atomicAnd_34edd3(); +} + Failed to generate: unable to convert type: __atomic__u32 diff --git a/test/intrinsics/gen/atomicAnd/34edd3.wgsl.expected.wgsl b/test/intrinsics/gen/atomicAnd/34edd3.wgsl.expected.wgsl index caa65d286b..ca4cbc24f3 100644 --- a/test/intrinsics/gen/atomicAnd/34edd3.wgsl.expected.wgsl +++ b/test/intrinsics/gen/atomicAnd/34edd3.wgsl.expected.wgsl @@ -1,5 +1,10 @@ -SKIP: FAILED +var arg_0 : atomic; +fn atomicAnd_34edd3() { + var res : u32 = atomicAnd(&(arg_0), 1u); +} -var arg_0 : -Failed to generate: error: unknown type in EmitType: __atomic__u32 +[[stage(compute)]] +fn compute_main() { + atomicAnd_34edd3(); +} diff --git a/test/intrinsics/gen/atomicAnd/45a819.wgsl.expected.hlsl b/test/intrinsics/gen/atomicAnd/45a819.wgsl.expected.hlsl index 83c0306c0f..a393010f34 100644 --- a/test/intrinsics/gen/atomicAnd/45a819.wgsl.expected.hlsl +++ b/test/intrinsics/gen/atomicAnd/45a819.wgsl.expected.hlsl @@ -1,5 +1,15 @@ SKIP: FAILED -var arg_0 : +var arg_0 : atomic; + +fn atomicAnd_45a819() { + var res : i32 = atomicAnd(&(arg_0), 1); +} + +[[stage(compute)]] +fn compute_main() { + atomicAnd_45a819(); +} + Failed to generate: error: unknown type in EmitType diff --git a/test/intrinsics/gen/atomicAnd/45a819.wgsl.expected.spvasm b/test/intrinsics/gen/atomicAnd/45a819.wgsl.expected.spvasm index ef25b4ffbe..e163a7fa4c 100644 --- a/test/intrinsics/gen/atomicAnd/45a819.wgsl.expected.spvasm +++ b/test/intrinsics/gen/atomicAnd/45a819.wgsl.expected.spvasm @@ -1,5 +1,15 @@ SKIP: FAILED -var arg_0 : +var arg_0 : atomic; + +fn atomicAnd_45a819() { + var res : i32 = atomicAnd(&(arg_0), 1); +} + +[[stage(compute)]] +fn compute_main() { + atomicAnd_45a819(); +} + Failed to generate: unable to convert type: __atomic__i32 diff --git a/test/intrinsics/gen/atomicAnd/45a819.wgsl.expected.wgsl b/test/intrinsics/gen/atomicAnd/45a819.wgsl.expected.wgsl index d42e421a5b..3b32d40510 100644 --- a/test/intrinsics/gen/atomicAnd/45a819.wgsl.expected.wgsl +++ b/test/intrinsics/gen/atomicAnd/45a819.wgsl.expected.wgsl @@ -1,5 +1,10 @@ -SKIP: FAILED +var arg_0 : atomic; +fn atomicAnd_45a819() { + var res : i32 = atomicAnd(&(arg_0), 1); +} -var arg_0 : -Failed to generate: error: unknown type in EmitType: __atomic__i32 +[[stage(compute)]] +fn compute_main() { + atomicAnd_45a819(); +} diff --git a/test/intrinsics/gen/atomicAnd/85a8d9.wgsl.expected.msl b/test/intrinsics/gen/atomicAnd/85a8d9.wgsl.expected.msl index 28d463e18d..31f25e8d54 100644 --- a/test/intrinsics/gen/atomicAnd/85a8d9.wgsl.expected.msl +++ b/test/intrinsics/gen/atomicAnd/85a8d9.wgsl.expected.msl @@ -3,5 +3,23 @@ SKIP: FAILED [[block]] struct SB_RW { - arg_0 : + arg_0 : atomic; +}; + +[[group(0), binding(0)]] var sb_rw : SB_RW; + +fn atomicAnd_85a8d9() { + var res : u32 = atomicAnd(&(sb_rw.arg_0), 1u); +} + +[[stage(fragment)]] +fn fragment_main() { + atomicAnd_85a8d9(); +} + +[[stage(compute)]] +fn compute_main() { + atomicAnd_85a8d9(); +} + Failed to generate: error: unknown type in EmitType: __atomic__u32 diff --git a/test/intrinsics/gen/atomicAnd/85a8d9.wgsl.expected.spvasm b/test/intrinsics/gen/atomicAnd/85a8d9.wgsl.expected.spvasm index 1013691440..db2169636b 100644 --- a/test/intrinsics/gen/atomicAnd/85a8d9.wgsl.expected.spvasm +++ b/test/intrinsics/gen/atomicAnd/85a8d9.wgsl.expected.spvasm @@ -3,5 +3,23 @@ SKIP: FAILED [[block]] struct SB_RW { - arg_0 : + arg_0 : atomic; +}; + +[[group(0), binding(0)]] var sb_rw : SB_RW; + +fn atomicAnd_85a8d9() { + var res : u32 = atomicAnd(&(sb_rw.arg_0), 1u); +} + +[[stage(fragment)]] +fn fragment_main() { + atomicAnd_85a8d9(); +} + +[[stage(compute)]] +fn compute_main() { + atomicAnd_85a8d9(); +} + Failed to generate: unable to convert type: __atomic__u32 diff --git a/test/intrinsics/gen/atomicAnd/85a8d9.wgsl.expected.wgsl b/test/intrinsics/gen/atomicAnd/85a8d9.wgsl.expected.wgsl index 28d463e18d..cc3903050b 100644 --- a/test/intrinsics/gen/atomicAnd/85a8d9.wgsl.expected.wgsl +++ b/test/intrinsics/gen/atomicAnd/85a8d9.wgsl.expected.wgsl @@ -1,7 +1,20 @@ -SKIP: FAILED - - [[block]] struct SB_RW { - arg_0 : -Failed to generate: error: unknown type in EmitType: __atomic__u32 + arg_0 : atomic; +}; + +[[group(0), binding(0)]] var sb_rw : SB_RW; + +fn atomicAnd_85a8d9() { + var res : u32 = atomicAnd(&(sb_rw.arg_0), 1u); +} + +[[stage(fragment)]] +fn fragment_main() { + atomicAnd_85a8d9(); +} + +[[stage(compute)]] +fn compute_main() { + atomicAnd_85a8d9(); +} diff --git a/test/intrinsics/gen/atomicCompareExchangeWeak/12871c.wgsl.expected.msl b/test/intrinsics/gen/atomicCompareExchangeWeak/12871c.wgsl.expected.msl index 6088b5aeb6..7135dea0c4 100644 --- a/test/intrinsics/gen/atomicCompareExchangeWeak/12871c.wgsl.expected.msl +++ b/test/intrinsics/gen/atomicCompareExchangeWeak/12871c.wgsl.expected.msl @@ -3,5 +3,23 @@ SKIP: FAILED [[block]] struct SB_RW { - arg_0 : + arg_0 : atomic; +}; + +[[group(0), binding(0)]] var sb_rw : SB_RW; + +fn atomicCompareExchangeWeak_12871c() { + var res : vec2 = atomicCompareExchangeWeak(&(sb_rw.arg_0), 1, 1); +} + +[[stage(fragment)]] +fn fragment_main() { + atomicCompareExchangeWeak_12871c(); +} + +[[stage(compute)]] +fn compute_main() { + atomicCompareExchangeWeak_12871c(); +} + Failed to generate: error: unknown type in EmitType: __atomic__i32 diff --git a/test/intrinsics/gen/atomicCompareExchangeWeak/12871c.wgsl.expected.spvasm b/test/intrinsics/gen/atomicCompareExchangeWeak/12871c.wgsl.expected.spvasm index 17354c31f5..420060e8d6 100644 --- a/test/intrinsics/gen/atomicCompareExchangeWeak/12871c.wgsl.expected.spvasm +++ b/test/intrinsics/gen/atomicCompareExchangeWeak/12871c.wgsl.expected.spvasm @@ -3,5 +3,23 @@ SKIP: FAILED [[block]] struct SB_RW { - arg_0 : + arg_0 : atomic; +}; + +[[group(0), binding(0)]] var sb_rw : SB_RW; + +fn atomicCompareExchangeWeak_12871c() { + var res : vec2 = atomicCompareExchangeWeak(&(sb_rw.arg_0), 1, 1); +} + +[[stage(fragment)]] +fn fragment_main() { + atomicCompareExchangeWeak_12871c(); +} + +[[stage(compute)]] +fn compute_main() { + atomicCompareExchangeWeak_12871c(); +} + Failed to generate: unable to convert type: __atomic__i32 diff --git a/test/intrinsics/gen/atomicCompareExchangeWeak/12871c.wgsl.expected.wgsl b/test/intrinsics/gen/atomicCompareExchangeWeak/12871c.wgsl.expected.wgsl index 6088b5aeb6..335c53798c 100644 --- a/test/intrinsics/gen/atomicCompareExchangeWeak/12871c.wgsl.expected.wgsl +++ b/test/intrinsics/gen/atomicCompareExchangeWeak/12871c.wgsl.expected.wgsl @@ -1,7 +1,20 @@ -SKIP: FAILED - - [[block]] struct SB_RW { - arg_0 : -Failed to generate: error: unknown type in EmitType: __atomic__i32 + arg_0 : atomic; +}; + +[[group(0), binding(0)]] var sb_rw : SB_RW; + +fn atomicCompareExchangeWeak_12871c() { + var res : vec2 = atomicCompareExchangeWeak(&(sb_rw.arg_0), 1, 1); +} + +[[stage(fragment)]] +fn fragment_main() { + atomicCompareExchangeWeak_12871c(); +} + +[[stage(compute)]] +fn compute_main() { + atomicCompareExchangeWeak_12871c(); +} diff --git a/test/intrinsics/gen/atomicCompareExchangeWeak/6673da.wgsl.expected.msl b/test/intrinsics/gen/atomicCompareExchangeWeak/6673da.wgsl.expected.msl index 28d463e18d..a6c99cee60 100644 --- a/test/intrinsics/gen/atomicCompareExchangeWeak/6673da.wgsl.expected.msl +++ b/test/intrinsics/gen/atomicCompareExchangeWeak/6673da.wgsl.expected.msl @@ -3,5 +3,23 @@ SKIP: FAILED [[block]] struct SB_RW { - arg_0 : + arg_0 : atomic; +}; + +[[group(0), binding(0)]] var sb_rw : SB_RW; + +fn atomicCompareExchangeWeak_6673da() { + var res : vec2 = atomicCompareExchangeWeak(&(sb_rw.arg_0), 1u, 1u); +} + +[[stage(fragment)]] +fn fragment_main() { + atomicCompareExchangeWeak_6673da(); +} + +[[stage(compute)]] +fn compute_main() { + atomicCompareExchangeWeak_6673da(); +} + Failed to generate: error: unknown type in EmitType: __atomic__u32 diff --git a/test/intrinsics/gen/atomicCompareExchangeWeak/6673da.wgsl.expected.spvasm b/test/intrinsics/gen/atomicCompareExchangeWeak/6673da.wgsl.expected.spvasm index 1013691440..d0a4f3a926 100644 --- a/test/intrinsics/gen/atomicCompareExchangeWeak/6673da.wgsl.expected.spvasm +++ b/test/intrinsics/gen/atomicCompareExchangeWeak/6673da.wgsl.expected.spvasm @@ -3,5 +3,23 @@ SKIP: FAILED [[block]] struct SB_RW { - arg_0 : + arg_0 : atomic; +}; + +[[group(0), binding(0)]] var sb_rw : SB_RW; + +fn atomicCompareExchangeWeak_6673da() { + var res : vec2 = atomicCompareExchangeWeak(&(sb_rw.arg_0), 1u, 1u); +} + +[[stage(fragment)]] +fn fragment_main() { + atomicCompareExchangeWeak_6673da(); +} + +[[stage(compute)]] +fn compute_main() { + atomicCompareExchangeWeak_6673da(); +} + Failed to generate: unable to convert type: __atomic__u32 diff --git a/test/intrinsics/gen/atomicCompareExchangeWeak/6673da.wgsl.expected.wgsl b/test/intrinsics/gen/atomicCompareExchangeWeak/6673da.wgsl.expected.wgsl index 28d463e18d..84518cb62e 100644 --- a/test/intrinsics/gen/atomicCompareExchangeWeak/6673da.wgsl.expected.wgsl +++ b/test/intrinsics/gen/atomicCompareExchangeWeak/6673da.wgsl.expected.wgsl @@ -1,7 +1,20 @@ -SKIP: FAILED - - [[block]] struct SB_RW { - arg_0 : -Failed to generate: error: unknown type in EmitType: __atomic__u32 + arg_0 : atomic; +}; + +[[group(0), binding(0)]] var sb_rw : SB_RW; + +fn atomicCompareExchangeWeak_6673da() { + var res : vec2 = atomicCompareExchangeWeak(&(sb_rw.arg_0), 1u, 1u); +} + +[[stage(fragment)]] +fn fragment_main() { + atomicCompareExchangeWeak_6673da(); +} + +[[stage(compute)]] +fn compute_main() { + atomicCompareExchangeWeak_6673da(); +} diff --git a/test/intrinsics/gen/atomicCompareExchangeWeak/89ea3b.wgsl.expected.hlsl b/test/intrinsics/gen/atomicCompareExchangeWeak/89ea3b.wgsl.expected.hlsl index 83c0306c0f..2b6a58e86b 100644 --- a/test/intrinsics/gen/atomicCompareExchangeWeak/89ea3b.wgsl.expected.hlsl +++ b/test/intrinsics/gen/atomicCompareExchangeWeak/89ea3b.wgsl.expected.hlsl @@ -1,5 +1,15 @@ SKIP: FAILED -var arg_0 : +var arg_0 : atomic; + +fn atomicCompareExchangeWeak_89ea3b() { + var res : vec2 = atomicCompareExchangeWeak(&(arg_0), 1, 1); +} + +[[stage(compute)]] +fn compute_main() { + atomicCompareExchangeWeak_89ea3b(); +} + Failed to generate: error: unknown type in EmitType diff --git a/test/intrinsics/gen/atomicCompareExchangeWeak/89ea3b.wgsl.expected.spvasm b/test/intrinsics/gen/atomicCompareExchangeWeak/89ea3b.wgsl.expected.spvasm index ef25b4ffbe..04788e8d02 100644 --- a/test/intrinsics/gen/atomicCompareExchangeWeak/89ea3b.wgsl.expected.spvasm +++ b/test/intrinsics/gen/atomicCompareExchangeWeak/89ea3b.wgsl.expected.spvasm @@ -1,5 +1,15 @@ SKIP: FAILED -var arg_0 : +var arg_0 : atomic; + +fn atomicCompareExchangeWeak_89ea3b() { + var res : vec2 = atomicCompareExchangeWeak(&(arg_0), 1, 1); +} + +[[stage(compute)]] +fn compute_main() { + atomicCompareExchangeWeak_89ea3b(); +} + Failed to generate: unable to convert type: __atomic__i32 diff --git a/test/intrinsics/gen/atomicCompareExchangeWeak/89ea3b.wgsl.expected.wgsl b/test/intrinsics/gen/atomicCompareExchangeWeak/89ea3b.wgsl.expected.wgsl index d42e421a5b..18ccb3097e 100644 --- a/test/intrinsics/gen/atomicCompareExchangeWeak/89ea3b.wgsl.expected.wgsl +++ b/test/intrinsics/gen/atomicCompareExchangeWeak/89ea3b.wgsl.expected.wgsl @@ -1,5 +1,10 @@ -SKIP: FAILED +var arg_0 : atomic; +fn atomicCompareExchangeWeak_89ea3b() { + var res : vec2 = atomicCompareExchangeWeak(&(arg_0), 1, 1); +} -var arg_0 : -Failed to generate: error: unknown type in EmitType: __atomic__i32 +[[stage(compute)]] +fn compute_main() { + atomicCompareExchangeWeak_89ea3b(); +} diff --git a/test/intrinsics/gen/atomicCompareExchangeWeak/b2ab2c.wgsl.expected.hlsl b/test/intrinsics/gen/atomicCompareExchangeWeak/b2ab2c.wgsl.expected.hlsl index 83c0306c0f..8d82315f8c 100644 --- a/test/intrinsics/gen/atomicCompareExchangeWeak/b2ab2c.wgsl.expected.hlsl +++ b/test/intrinsics/gen/atomicCompareExchangeWeak/b2ab2c.wgsl.expected.hlsl @@ -1,5 +1,15 @@ SKIP: FAILED -var arg_0 : +var arg_0 : atomic; + +fn atomicCompareExchangeWeak_b2ab2c() { + var res : vec2 = atomicCompareExchangeWeak(&(arg_0), 1u, 1u); +} + +[[stage(compute)]] +fn compute_main() { + atomicCompareExchangeWeak_b2ab2c(); +} + Failed to generate: error: unknown type in EmitType diff --git a/test/intrinsics/gen/atomicCompareExchangeWeak/b2ab2c.wgsl.expected.spvasm b/test/intrinsics/gen/atomicCompareExchangeWeak/b2ab2c.wgsl.expected.spvasm index 9fdcd875e2..819ff506c0 100644 --- a/test/intrinsics/gen/atomicCompareExchangeWeak/b2ab2c.wgsl.expected.spvasm +++ b/test/intrinsics/gen/atomicCompareExchangeWeak/b2ab2c.wgsl.expected.spvasm @@ -1,5 +1,15 @@ SKIP: FAILED -var arg_0 : +var arg_0 : atomic; + +fn atomicCompareExchangeWeak_b2ab2c() { + var res : vec2 = atomicCompareExchangeWeak(&(arg_0), 1u, 1u); +} + +[[stage(compute)]] +fn compute_main() { + atomicCompareExchangeWeak_b2ab2c(); +} + Failed to generate: unable to convert type: __atomic__u32 diff --git a/test/intrinsics/gen/atomicCompareExchangeWeak/b2ab2c.wgsl.expected.wgsl b/test/intrinsics/gen/atomicCompareExchangeWeak/b2ab2c.wgsl.expected.wgsl index caa65d286b..7e5b4b623b 100644 --- a/test/intrinsics/gen/atomicCompareExchangeWeak/b2ab2c.wgsl.expected.wgsl +++ b/test/intrinsics/gen/atomicCompareExchangeWeak/b2ab2c.wgsl.expected.wgsl @@ -1,5 +1,10 @@ -SKIP: FAILED +var arg_0 : atomic; +fn atomicCompareExchangeWeak_b2ab2c() { + var res : vec2 = atomicCompareExchangeWeak(&(arg_0), 1u, 1u); +} -var arg_0 : -Failed to generate: error: unknown type in EmitType: __atomic__u32 +[[stage(compute)]] +fn compute_main() { + atomicCompareExchangeWeak_b2ab2c(); +} diff --git a/test/intrinsics/gen/atomicExchange/0a5dca.wgsl.expected.hlsl b/test/intrinsics/gen/atomicExchange/0a5dca.wgsl.expected.hlsl index 83c0306c0f..8fd62b59a0 100644 --- a/test/intrinsics/gen/atomicExchange/0a5dca.wgsl.expected.hlsl +++ b/test/intrinsics/gen/atomicExchange/0a5dca.wgsl.expected.hlsl @@ -1,5 +1,15 @@ SKIP: FAILED -var arg_0 : +var arg_0 : atomic; + +fn atomicExchange_0a5dca() { + var res : u32 = atomicExchange(&(arg_0), 1u); +} + +[[stage(compute)]] +fn compute_main() { + atomicExchange_0a5dca(); +} + Failed to generate: error: unknown type in EmitType diff --git a/test/intrinsics/gen/atomicExchange/0a5dca.wgsl.expected.spvasm b/test/intrinsics/gen/atomicExchange/0a5dca.wgsl.expected.spvasm index 9fdcd875e2..828611fb4e 100644 --- a/test/intrinsics/gen/atomicExchange/0a5dca.wgsl.expected.spvasm +++ b/test/intrinsics/gen/atomicExchange/0a5dca.wgsl.expected.spvasm @@ -1,5 +1,15 @@ SKIP: FAILED -var arg_0 : +var arg_0 : atomic; + +fn atomicExchange_0a5dca() { + var res : u32 = atomicExchange(&(arg_0), 1u); +} + +[[stage(compute)]] +fn compute_main() { + atomicExchange_0a5dca(); +} + Failed to generate: unable to convert type: __atomic__u32 diff --git a/test/intrinsics/gen/atomicExchange/0a5dca.wgsl.expected.wgsl b/test/intrinsics/gen/atomicExchange/0a5dca.wgsl.expected.wgsl index caa65d286b..70c1945872 100644 --- a/test/intrinsics/gen/atomicExchange/0a5dca.wgsl.expected.wgsl +++ b/test/intrinsics/gen/atomicExchange/0a5dca.wgsl.expected.wgsl @@ -1,5 +1,10 @@ -SKIP: FAILED +var arg_0 : atomic; +fn atomicExchange_0a5dca() { + var res : u32 = atomicExchange(&(arg_0), 1u); +} -var arg_0 : -Failed to generate: error: unknown type in EmitType: __atomic__u32 +[[stage(compute)]] +fn compute_main() { + atomicExchange_0a5dca(); +} diff --git a/test/intrinsics/gen/atomicExchange/d59712.wgsl.expected.msl b/test/intrinsics/gen/atomicExchange/d59712.wgsl.expected.msl index 28d463e18d..d3d01f5054 100644 --- a/test/intrinsics/gen/atomicExchange/d59712.wgsl.expected.msl +++ b/test/intrinsics/gen/atomicExchange/d59712.wgsl.expected.msl @@ -3,5 +3,23 @@ SKIP: FAILED [[block]] struct SB_RW { - arg_0 : + arg_0 : atomic; +}; + +[[group(0), binding(0)]] var sb_rw : SB_RW; + +fn atomicExchange_d59712() { + var res : u32 = atomicExchange(&(sb_rw.arg_0), 1u); +} + +[[stage(fragment)]] +fn fragment_main() { + atomicExchange_d59712(); +} + +[[stage(compute)]] +fn compute_main() { + atomicExchange_d59712(); +} + Failed to generate: error: unknown type in EmitType: __atomic__u32 diff --git a/test/intrinsics/gen/atomicExchange/d59712.wgsl.expected.spvasm b/test/intrinsics/gen/atomicExchange/d59712.wgsl.expected.spvasm index 1013691440..f320864c38 100644 --- a/test/intrinsics/gen/atomicExchange/d59712.wgsl.expected.spvasm +++ b/test/intrinsics/gen/atomicExchange/d59712.wgsl.expected.spvasm @@ -3,5 +3,23 @@ SKIP: FAILED [[block]] struct SB_RW { - arg_0 : + arg_0 : atomic; +}; + +[[group(0), binding(0)]] var sb_rw : SB_RW; + +fn atomicExchange_d59712() { + var res : u32 = atomicExchange(&(sb_rw.arg_0), 1u); +} + +[[stage(fragment)]] +fn fragment_main() { + atomicExchange_d59712(); +} + +[[stage(compute)]] +fn compute_main() { + atomicExchange_d59712(); +} + Failed to generate: unable to convert type: __atomic__u32 diff --git a/test/intrinsics/gen/atomicExchange/d59712.wgsl.expected.wgsl b/test/intrinsics/gen/atomicExchange/d59712.wgsl.expected.wgsl index 28d463e18d..1ba5f7ff17 100644 --- a/test/intrinsics/gen/atomicExchange/d59712.wgsl.expected.wgsl +++ b/test/intrinsics/gen/atomicExchange/d59712.wgsl.expected.wgsl @@ -1,7 +1,20 @@ -SKIP: FAILED - - [[block]] struct SB_RW { - arg_0 : -Failed to generate: error: unknown type in EmitType: __atomic__u32 + arg_0 : atomic; +}; + +[[group(0), binding(0)]] var sb_rw : SB_RW; + +fn atomicExchange_d59712() { + var res : u32 = atomicExchange(&(sb_rw.arg_0), 1u); +} + +[[stage(fragment)]] +fn fragment_main() { + atomicExchange_d59712(); +} + +[[stage(compute)]] +fn compute_main() { + atomicExchange_d59712(); +} diff --git a/test/intrinsics/gen/atomicExchange/e114ba.wgsl.expected.hlsl b/test/intrinsics/gen/atomicExchange/e114ba.wgsl.expected.hlsl index 83c0306c0f..4b1ab2c90a 100644 --- a/test/intrinsics/gen/atomicExchange/e114ba.wgsl.expected.hlsl +++ b/test/intrinsics/gen/atomicExchange/e114ba.wgsl.expected.hlsl @@ -1,5 +1,15 @@ SKIP: FAILED -var arg_0 : +var arg_0 : atomic; + +fn atomicExchange_e114ba() { + var res : i32 = atomicExchange(&(arg_0), 1); +} + +[[stage(compute)]] +fn compute_main() { + atomicExchange_e114ba(); +} + Failed to generate: error: unknown type in EmitType diff --git a/test/intrinsics/gen/atomicExchange/e114ba.wgsl.expected.spvasm b/test/intrinsics/gen/atomicExchange/e114ba.wgsl.expected.spvasm index ef25b4ffbe..5107f95e6f 100644 --- a/test/intrinsics/gen/atomicExchange/e114ba.wgsl.expected.spvasm +++ b/test/intrinsics/gen/atomicExchange/e114ba.wgsl.expected.spvasm @@ -1,5 +1,15 @@ SKIP: FAILED -var arg_0 : +var arg_0 : atomic; + +fn atomicExchange_e114ba() { + var res : i32 = atomicExchange(&(arg_0), 1); +} + +[[stage(compute)]] +fn compute_main() { + atomicExchange_e114ba(); +} + Failed to generate: unable to convert type: __atomic__i32 diff --git a/test/intrinsics/gen/atomicExchange/e114ba.wgsl.expected.wgsl b/test/intrinsics/gen/atomicExchange/e114ba.wgsl.expected.wgsl index d42e421a5b..9d89550fb5 100644 --- a/test/intrinsics/gen/atomicExchange/e114ba.wgsl.expected.wgsl +++ b/test/intrinsics/gen/atomicExchange/e114ba.wgsl.expected.wgsl @@ -1,5 +1,10 @@ -SKIP: FAILED +var arg_0 : atomic; +fn atomicExchange_e114ba() { + var res : i32 = atomicExchange(&(arg_0), 1); +} -var arg_0 : -Failed to generate: error: unknown type in EmitType: __atomic__i32 +[[stage(compute)]] +fn compute_main() { + atomicExchange_e114ba(); +} diff --git a/test/intrinsics/gen/atomicExchange/f2e22f.wgsl.expected.msl b/test/intrinsics/gen/atomicExchange/f2e22f.wgsl.expected.msl index 6088b5aeb6..be0f8972fd 100644 --- a/test/intrinsics/gen/atomicExchange/f2e22f.wgsl.expected.msl +++ b/test/intrinsics/gen/atomicExchange/f2e22f.wgsl.expected.msl @@ -3,5 +3,23 @@ SKIP: FAILED [[block]] struct SB_RW { - arg_0 : + arg_0 : atomic; +}; + +[[group(0), binding(0)]] var sb_rw : SB_RW; + +fn atomicExchange_f2e22f() { + var res : i32 = atomicExchange(&(sb_rw.arg_0), 1); +} + +[[stage(fragment)]] +fn fragment_main() { + atomicExchange_f2e22f(); +} + +[[stage(compute)]] +fn compute_main() { + atomicExchange_f2e22f(); +} + Failed to generate: error: unknown type in EmitType: __atomic__i32 diff --git a/test/intrinsics/gen/atomicExchange/f2e22f.wgsl.expected.spvasm b/test/intrinsics/gen/atomicExchange/f2e22f.wgsl.expected.spvasm index 17354c31f5..2819c2943c 100644 --- a/test/intrinsics/gen/atomicExchange/f2e22f.wgsl.expected.spvasm +++ b/test/intrinsics/gen/atomicExchange/f2e22f.wgsl.expected.spvasm @@ -3,5 +3,23 @@ SKIP: FAILED [[block]] struct SB_RW { - arg_0 : + arg_0 : atomic; +}; + +[[group(0), binding(0)]] var sb_rw : SB_RW; + +fn atomicExchange_f2e22f() { + var res : i32 = atomicExchange(&(sb_rw.arg_0), 1); +} + +[[stage(fragment)]] +fn fragment_main() { + atomicExchange_f2e22f(); +} + +[[stage(compute)]] +fn compute_main() { + atomicExchange_f2e22f(); +} + Failed to generate: unable to convert type: __atomic__i32 diff --git a/test/intrinsics/gen/atomicExchange/f2e22f.wgsl.expected.wgsl b/test/intrinsics/gen/atomicExchange/f2e22f.wgsl.expected.wgsl index 6088b5aeb6..4e08fa54ab 100644 --- a/test/intrinsics/gen/atomicExchange/f2e22f.wgsl.expected.wgsl +++ b/test/intrinsics/gen/atomicExchange/f2e22f.wgsl.expected.wgsl @@ -1,7 +1,20 @@ -SKIP: FAILED - - [[block]] struct SB_RW { - arg_0 : -Failed to generate: error: unknown type in EmitType: __atomic__i32 + arg_0 : atomic; +}; + +[[group(0), binding(0)]] var sb_rw : SB_RW; + +fn atomicExchange_f2e22f() { + var res : i32 = atomicExchange(&(sb_rw.arg_0), 1); +} + +[[stage(fragment)]] +fn fragment_main() { + atomicExchange_f2e22f(); +} + +[[stage(compute)]] +fn compute_main() { + atomicExchange_f2e22f(); +} diff --git a/test/intrinsics/gen/atomicLoad/0806ad.wgsl.expected.msl b/test/intrinsics/gen/atomicLoad/0806ad.wgsl.expected.msl index 6088b5aeb6..39eff932e4 100644 --- a/test/intrinsics/gen/atomicLoad/0806ad.wgsl.expected.msl +++ b/test/intrinsics/gen/atomicLoad/0806ad.wgsl.expected.msl @@ -3,5 +3,23 @@ SKIP: FAILED [[block]] struct SB_RW { - arg_0 : + arg_0 : atomic; +}; + +[[group(0), binding(0)]] var sb_rw : SB_RW; + +fn atomicLoad_0806ad() { + var res : i32 = atomicLoad(&(sb_rw.arg_0)); +} + +[[stage(fragment)]] +fn fragment_main() { + atomicLoad_0806ad(); +} + +[[stage(compute)]] +fn compute_main() { + atomicLoad_0806ad(); +} + Failed to generate: error: unknown type in EmitType: __atomic__i32 diff --git a/test/intrinsics/gen/atomicLoad/0806ad.wgsl.expected.spvasm b/test/intrinsics/gen/atomicLoad/0806ad.wgsl.expected.spvasm index 17354c31f5..acf39ec161 100644 --- a/test/intrinsics/gen/atomicLoad/0806ad.wgsl.expected.spvasm +++ b/test/intrinsics/gen/atomicLoad/0806ad.wgsl.expected.spvasm @@ -3,5 +3,23 @@ SKIP: FAILED [[block]] struct SB_RW { - arg_0 : + arg_0 : atomic; +}; + +[[group(0), binding(0)]] var sb_rw : SB_RW; + +fn atomicLoad_0806ad() { + var res : i32 = atomicLoad(&(sb_rw.arg_0)); +} + +[[stage(fragment)]] +fn fragment_main() { + atomicLoad_0806ad(); +} + +[[stage(compute)]] +fn compute_main() { + atomicLoad_0806ad(); +} + Failed to generate: unable to convert type: __atomic__i32 diff --git a/test/intrinsics/gen/atomicLoad/0806ad.wgsl.expected.wgsl b/test/intrinsics/gen/atomicLoad/0806ad.wgsl.expected.wgsl index 6088b5aeb6..a5b58d8b93 100644 --- a/test/intrinsics/gen/atomicLoad/0806ad.wgsl.expected.wgsl +++ b/test/intrinsics/gen/atomicLoad/0806ad.wgsl.expected.wgsl @@ -1,7 +1,20 @@ -SKIP: FAILED - - [[block]] struct SB_RW { - arg_0 : -Failed to generate: error: unknown type in EmitType: __atomic__i32 + arg_0 : atomic; +}; + +[[group(0), binding(0)]] var sb_rw : SB_RW; + +fn atomicLoad_0806ad() { + var res : i32 = atomicLoad(&(sb_rw.arg_0)); +} + +[[stage(fragment)]] +fn fragment_main() { + atomicLoad_0806ad(); +} + +[[stage(compute)]] +fn compute_main() { + atomicLoad_0806ad(); +} diff --git a/test/intrinsics/gen/atomicLoad/361bf1.wgsl.expected.hlsl b/test/intrinsics/gen/atomicLoad/361bf1.wgsl.expected.hlsl index 83c0306c0f..eb5a4825c0 100644 --- a/test/intrinsics/gen/atomicLoad/361bf1.wgsl.expected.hlsl +++ b/test/intrinsics/gen/atomicLoad/361bf1.wgsl.expected.hlsl @@ -1,5 +1,15 @@ SKIP: FAILED -var arg_0 : +var arg_0 : atomic; + +fn atomicLoad_361bf1() { + var res : u32 = atomicLoad(&(arg_0)); +} + +[[stage(compute)]] +fn compute_main() { + atomicLoad_361bf1(); +} + Failed to generate: error: unknown type in EmitType diff --git a/test/intrinsics/gen/atomicLoad/361bf1.wgsl.expected.spvasm b/test/intrinsics/gen/atomicLoad/361bf1.wgsl.expected.spvasm index 9fdcd875e2..f524442f9a 100644 --- a/test/intrinsics/gen/atomicLoad/361bf1.wgsl.expected.spvasm +++ b/test/intrinsics/gen/atomicLoad/361bf1.wgsl.expected.spvasm @@ -1,5 +1,15 @@ SKIP: FAILED -var arg_0 : +var arg_0 : atomic; + +fn atomicLoad_361bf1() { + var res : u32 = atomicLoad(&(arg_0)); +} + +[[stage(compute)]] +fn compute_main() { + atomicLoad_361bf1(); +} + Failed to generate: unable to convert type: __atomic__u32 diff --git a/test/intrinsics/gen/atomicLoad/361bf1.wgsl.expected.wgsl b/test/intrinsics/gen/atomicLoad/361bf1.wgsl.expected.wgsl index caa65d286b..bb0694edbf 100644 --- a/test/intrinsics/gen/atomicLoad/361bf1.wgsl.expected.wgsl +++ b/test/intrinsics/gen/atomicLoad/361bf1.wgsl.expected.wgsl @@ -1,5 +1,10 @@ -SKIP: FAILED +var arg_0 : atomic; +fn atomicLoad_361bf1() { + var res : u32 = atomicLoad(&(arg_0)); +} -var arg_0 : -Failed to generate: error: unknown type in EmitType: __atomic__u32 +[[stage(compute)]] +fn compute_main() { + atomicLoad_361bf1(); +} diff --git a/test/intrinsics/gen/atomicLoad/afcc03.wgsl.expected.hlsl b/test/intrinsics/gen/atomicLoad/afcc03.wgsl.expected.hlsl index 83c0306c0f..c43459a6c7 100644 --- a/test/intrinsics/gen/atomicLoad/afcc03.wgsl.expected.hlsl +++ b/test/intrinsics/gen/atomicLoad/afcc03.wgsl.expected.hlsl @@ -1,5 +1,15 @@ SKIP: FAILED -var arg_0 : +var arg_0 : atomic; + +fn atomicLoad_afcc03() { + var res : i32 = atomicLoad(&(arg_0)); +} + +[[stage(compute)]] +fn compute_main() { + atomicLoad_afcc03(); +} + Failed to generate: error: unknown type in EmitType diff --git a/test/intrinsics/gen/atomicLoad/afcc03.wgsl.expected.spvasm b/test/intrinsics/gen/atomicLoad/afcc03.wgsl.expected.spvasm index ef25b4ffbe..b41da50a18 100644 --- a/test/intrinsics/gen/atomicLoad/afcc03.wgsl.expected.spvasm +++ b/test/intrinsics/gen/atomicLoad/afcc03.wgsl.expected.spvasm @@ -1,5 +1,15 @@ SKIP: FAILED -var arg_0 : +var arg_0 : atomic; + +fn atomicLoad_afcc03() { + var res : i32 = atomicLoad(&(arg_0)); +} + +[[stage(compute)]] +fn compute_main() { + atomicLoad_afcc03(); +} + Failed to generate: unable to convert type: __atomic__i32 diff --git a/test/intrinsics/gen/atomicLoad/afcc03.wgsl.expected.wgsl b/test/intrinsics/gen/atomicLoad/afcc03.wgsl.expected.wgsl index d42e421a5b..c4b58612d3 100644 --- a/test/intrinsics/gen/atomicLoad/afcc03.wgsl.expected.wgsl +++ b/test/intrinsics/gen/atomicLoad/afcc03.wgsl.expected.wgsl @@ -1,5 +1,10 @@ -SKIP: FAILED +var arg_0 : atomic; +fn atomicLoad_afcc03() { + var res : i32 = atomicLoad(&(arg_0)); +} -var arg_0 : -Failed to generate: error: unknown type in EmitType: __atomic__i32 +[[stage(compute)]] +fn compute_main() { + atomicLoad_afcc03(); +} diff --git a/test/intrinsics/gen/atomicLoad/fe6cc3.wgsl.expected.msl b/test/intrinsics/gen/atomicLoad/fe6cc3.wgsl.expected.msl index 28d463e18d..2c1eeff2eb 100644 --- a/test/intrinsics/gen/atomicLoad/fe6cc3.wgsl.expected.msl +++ b/test/intrinsics/gen/atomicLoad/fe6cc3.wgsl.expected.msl @@ -3,5 +3,23 @@ SKIP: FAILED [[block]] struct SB_RW { - arg_0 : + arg_0 : atomic; +}; + +[[group(0), binding(0)]] var sb_rw : SB_RW; + +fn atomicLoad_fe6cc3() { + var res : u32 = atomicLoad(&(sb_rw.arg_0)); +} + +[[stage(fragment)]] +fn fragment_main() { + atomicLoad_fe6cc3(); +} + +[[stage(compute)]] +fn compute_main() { + atomicLoad_fe6cc3(); +} + Failed to generate: error: unknown type in EmitType: __atomic__u32 diff --git a/test/intrinsics/gen/atomicLoad/fe6cc3.wgsl.expected.spvasm b/test/intrinsics/gen/atomicLoad/fe6cc3.wgsl.expected.spvasm index 1013691440..623a8ad5de 100644 --- a/test/intrinsics/gen/atomicLoad/fe6cc3.wgsl.expected.spvasm +++ b/test/intrinsics/gen/atomicLoad/fe6cc3.wgsl.expected.spvasm @@ -3,5 +3,23 @@ SKIP: FAILED [[block]] struct SB_RW { - arg_0 : + arg_0 : atomic; +}; + +[[group(0), binding(0)]] var sb_rw : SB_RW; + +fn atomicLoad_fe6cc3() { + var res : u32 = atomicLoad(&(sb_rw.arg_0)); +} + +[[stage(fragment)]] +fn fragment_main() { + atomicLoad_fe6cc3(); +} + +[[stage(compute)]] +fn compute_main() { + atomicLoad_fe6cc3(); +} + Failed to generate: unable to convert type: __atomic__u32 diff --git a/test/intrinsics/gen/atomicLoad/fe6cc3.wgsl.expected.wgsl b/test/intrinsics/gen/atomicLoad/fe6cc3.wgsl.expected.wgsl index 28d463e18d..8a7ee5ab5f 100644 --- a/test/intrinsics/gen/atomicLoad/fe6cc3.wgsl.expected.wgsl +++ b/test/intrinsics/gen/atomicLoad/fe6cc3.wgsl.expected.wgsl @@ -1,7 +1,20 @@ -SKIP: FAILED - - [[block]] struct SB_RW { - arg_0 : -Failed to generate: error: unknown type in EmitType: __atomic__u32 + arg_0 : atomic; +}; + +[[group(0), binding(0)]] var sb_rw : SB_RW; + +fn atomicLoad_fe6cc3() { + var res : u32 = atomicLoad(&(sb_rw.arg_0)); +} + +[[stage(fragment)]] +fn fragment_main() { + atomicLoad_fe6cc3(); +} + +[[stage(compute)]] +fn compute_main() { + atomicLoad_fe6cc3(); +} diff --git a/test/intrinsics/gen/atomicMax/51b9be.wgsl.expected.msl b/test/intrinsics/gen/atomicMax/51b9be.wgsl.expected.msl index 28d463e18d..9a9fb1dfdf 100644 --- a/test/intrinsics/gen/atomicMax/51b9be.wgsl.expected.msl +++ b/test/intrinsics/gen/atomicMax/51b9be.wgsl.expected.msl @@ -3,5 +3,23 @@ SKIP: FAILED [[block]] struct SB_RW { - arg_0 : + arg_0 : atomic; +}; + +[[group(0), binding(0)]] var sb_rw : SB_RW; + +fn atomicMax_51b9be() { + var res : u32 = atomicMax(&(sb_rw.arg_0), 1u); +} + +[[stage(fragment)]] +fn fragment_main() { + atomicMax_51b9be(); +} + +[[stage(compute)]] +fn compute_main() { + atomicMax_51b9be(); +} + Failed to generate: error: unknown type in EmitType: __atomic__u32 diff --git a/test/intrinsics/gen/atomicMax/51b9be.wgsl.expected.spvasm b/test/intrinsics/gen/atomicMax/51b9be.wgsl.expected.spvasm index 1013691440..c5f1a7804a 100644 --- a/test/intrinsics/gen/atomicMax/51b9be.wgsl.expected.spvasm +++ b/test/intrinsics/gen/atomicMax/51b9be.wgsl.expected.spvasm @@ -3,5 +3,23 @@ SKIP: FAILED [[block]] struct SB_RW { - arg_0 : + arg_0 : atomic; +}; + +[[group(0), binding(0)]] var sb_rw : SB_RW; + +fn atomicMax_51b9be() { + var res : u32 = atomicMax(&(sb_rw.arg_0), 1u); +} + +[[stage(fragment)]] +fn fragment_main() { + atomicMax_51b9be(); +} + +[[stage(compute)]] +fn compute_main() { + atomicMax_51b9be(); +} + Failed to generate: unable to convert type: __atomic__u32 diff --git a/test/intrinsics/gen/atomicMax/51b9be.wgsl.expected.wgsl b/test/intrinsics/gen/atomicMax/51b9be.wgsl.expected.wgsl index 28d463e18d..4904f1f098 100644 --- a/test/intrinsics/gen/atomicMax/51b9be.wgsl.expected.wgsl +++ b/test/intrinsics/gen/atomicMax/51b9be.wgsl.expected.wgsl @@ -1,7 +1,20 @@ -SKIP: FAILED - - [[block]] struct SB_RW { - arg_0 : -Failed to generate: error: unknown type in EmitType: __atomic__u32 + arg_0 : atomic; +}; + +[[group(0), binding(0)]] var sb_rw : SB_RW; + +fn atomicMax_51b9be() { + var res : u32 = atomicMax(&(sb_rw.arg_0), 1u); +} + +[[stage(fragment)]] +fn fragment_main() { + atomicMax_51b9be(); +} + +[[stage(compute)]] +fn compute_main() { + atomicMax_51b9be(); +} diff --git a/test/intrinsics/gen/atomicMax/92aa72.wgsl.expected.msl b/test/intrinsics/gen/atomicMax/92aa72.wgsl.expected.msl index 6088b5aeb6..a2997a1736 100644 --- a/test/intrinsics/gen/atomicMax/92aa72.wgsl.expected.msl +++ b/test/intrinsics/gen/atomicMax/92aa72.wgsl.expected.msl @@ -3,5 +3,23 @@ SKIP: FAILED [[block]] struct SB_RW { - arg_0 : + arg_0 : atomic; +}; + +[[group(0), binding(0)]] var sb_rw : SB_RW; + +fn atomicMax_92aa72() { + var res : i32 = atomicMax(&(sb_rw.arg_0), 1); +} + +[[stage(fragment)]] +fn fragment_main() { + atomicMax_92aa72(); +} + +[[stage(compute)]] +fn compute_main() { + atomicMax_92aa72(); +} + Failed to generate: error: unknown type in EmitType: __atomic__i32 diff --git a/test/intrinsics/gen/atomicMax/92aa72.wgsl.expected.spvasm b/test/intrinsics/gen/atomicMax/92aa72.wgsl.expected.spvasm index 17354c31f5..f1c5712c1f 100644 --- a/test/intrinsics/gen/atomicMax/92aa72.wgsl.expected.spvasm +++ b/test/intrinsics/gen/atomicMax/92aa72.wgsl.expected.spvasm @@ -3,5 +3,23 @@ SKIP: FAILED [[block]] struct SB_RW { - arg_0 : + arg_0 : atomic; +}; + +[[group(0), binding(0)]] var sb_rw : SB_RW; + +fn atomicMax_92aa72() { + var res : i32 = atomicMax(&(sb_rw.arg_0), 1); +} + +[[stage(fragment)]] +fn fragment_main() { + atomicMax_92aa72(); +} + +[[stage(compute)]] +fn compute_main() { + atomicMax_92aa72(); +} + Failed to generate: unable to convert type: __atomic__i32 diff --git a/test/intrinsics/gen/atomicMax/92aa72.wgsl.expected.wgsl b/test/intrinsics/gen/atomicMax/92aa72.wgsl.expected.wgsl index 6088b5aeb6..71f3f3978b 100644 --- a/test/intrinsics/gen/atomicMax/92aa72.wgsl.expected.wgsl +++ b/test/intrinsics/gen/atomicMax/92aa72.wgsl.expected.wgsl @@ -1,7 +1,20 @@ -SKIP: FAILED - - [[block]] struct SB_RW { - arg_0 : -Failed to generate: error: unknown type in EmitType: __atomic__i32 + arg_0 : atomic; +}; + +[[group(0), binding(0)]] var sb_rw : SB_RW; + +fn atomicMax_92aa72() { + var res : i32 = atomicMax(&(sb_rw.arg_0), 1); +} + +[[stage(fragment)]] +fn fragment_main() { + atomicMax_92aa72(); +} + +[[stage(compute)]] +fn compute_main() { + atomicMax_92aa72(); +} diff --git a/test/intrinsics/gen/atomicMax/a89cc3.wgsl.expected.hlsl b/test/intrinsics/gen/atomicMax/a89cc3.wgsl.expected.hlsl index 83c0306c0f..deabbd0f1c 100644 --- a/test/intrinsics/gen/atomicMax/a89cc3.wgsl.expected.hlsl +++ b/test/intrinsics/gen/atomicMax/a89cc3.wgsl.expected.hlsl @@ -1,5 +1,15 @@ SKIP: FAILED -var arg_0 : +var arg_0 : atomic; + +fn atomicMax_a89cc3() { + var res : i32 = atomicMax(&(arg_0), 1); +} + +[[stage(compute)]] +fn compute_main() { + atomicMax_a89cc3(); +} + Failed to generate: error: unknown type in EmitType diff --git a/test/intrinsics/gen/atomicMax/a89cc3.wgsl.expected.spvasm b/test/intrinsics/gen/atomicMax/a89cc3.wgsl.expected.spvasm index ef25b4ffbe..ac851993b0 100644 --- a/test/intrinsics/gen/atomicMax/a89cc3.wgsl.expected.spvasm +++ b/test/intrinsics/gen/atomicMax/a89cc3.wgsl.expected.spvasm @@ -1,5 +1,15 @@ SKIP: FAILED -var arg_0 : +var arg_0 : atomic; + +fn atomicMax_a89cc3() { + var res : i32 = atomicMax(&(arg_0), 1); +} + +[[stage(compute)]] +fn compute_main() { + atomicMax_a89cc3(); +} + Failed to generate: unable to convert type: __atomic__i32 diff --git a/test/intrinsics/gen/atomicMax/a89cc3.wgsl.expected.wgsl b/test/intrinsics/gen/atomicMax/a89cc3.wgsl.expected.wgsl index d42e421a5b..a94ade3e3f 100644 --- a/test/intrinsics/gen/atomicMax/a89cc3.wgsl.expected.wgsl +++ b/test/intrinsics/gen/atomicMax/a89cc3.wgsl.expected.wgsl @@ -1,5 +1,10 @@ -SKIP: FAILED +var arg_0 : atomic; +fn atomicMax_a89cc3() { + var res : i32 = atomicMax(&(arg_0), 1); +} -var arg_0 : -Failed to generate: error: unknown type in EmitType: __atomic__i32 +[[stage(compute)]] +fn compute_main() { + atomicMax_a89cc3(); +} diff --git a/test/intrinsics/gen/atomicMax/beccfc.wgsl.expected.hlsl b/test/intrinsics/gen/atomicMax/beccfc.wgsl.expected.hlsl index 83c0306c0f..d07cc1ad93 100644 --- a/test/intrinsics/gen/atomicMax/beccfc.wgsl.expected.hlsl +++ b/test/intrinsics/gen/atomicMax/beccfc.wgsl.expected.hlsl @@ -1,5 +1,15 @@ SKIP: FAILED -var arg_0 : +var arg_0 : atomic; + +fn atomicMax_beccfc() { + var res : u32 = atomicMax(&(arg_0), 1u); +} + +[[stage(compute)]] +fn compute_main() { + atomicMax_beccfc(); +} + Failed to generate: error: unknown type in EmitType diff --git a/test/intrinsics/gen/atomicMax/beccfc.wgsl.expected.spvasm b/test/intrinsics/gen/atomicMax/beccfc.wgsl.expected.spvasm index 9fdcd875e2..031d7ef1ce 100644 --- a/test/intrinsics/gen/atomicMax/beccfc.wgsl.expected.spvasm +++ b/test/intrinsics/gen/atomicMax/beccfc.wgsl.expected.spvasm @@ -1,5 +1,15 @@ SKIP: FAILED -var arg_0 : +var arg_0 : atomic; + +fn atomicMax_beccfc() { + var res : u32 = atomicMax(&(arg_0), 1u); +} + +[[stage(compute)]] +fn compute_main() { + atomicMax_beccfc(); +} + Failed to generate: unable to convert type: __atomic__u32 diff --git a/test/intrinsics/gen/atomicMax/beccfc.wgsl.expected.wgsl b/test/intrinsics/gen/atomicMax/beccfc.wgsl.expected.wgsl index caa65d286b..148a0d5ec8 100644 --- a/test/intrinsics/gen/atomicMax/beccfc.wgsl.expected.wgsl +++ b/test/intrinsics/gen/atomicMax/beccfc.wgsl.expected.wgsl @@ -1,5 +1,10 @@ -SKIP: FAILED +var arg_0 : atomic; +fn atomicMax_beccfc() { + var res : u32 = atomicMax(&(arg_0), 1u); +} -var arg_0 : -Failed to generate: error: unknown type in EmitType: __atomic__u32 +[[stage(compute)]] +fn compute_main() { + atomicMax_beccfc(); +} diff --git a/test/intrinsics/gen/atomicMin/278235.wgsl.expected.hlsl b/test/intrinsics/gen/atomicMin/278235.wgsl.expected.hlsl index 83c0306c0f..1279197bde 100644 --- a/test/intrinsics/gen/atomicMin/278235.wgsl.expected.hlsl +++ b/test/intrinsics/gen/atomicMin/278235.wgsl.expected.hlsl @@ -1,5 +1,15 @@ SKIP: FAILED -var arg_0 : +var arg_0 : atomic; + +fn atomicMin_278235() { + var res : i32 = atomicMin(&(arg_0), 1); +} + +[[stage(compute)]] +fn compute_main() { + atomicMin_278235(); +} + Failed to generate: error: unknown type in EmitType diff --git a/test/intrinsics/gen/atomicMin/278235.wgsl.expected.spvasm b/test/intrinsics/gen/atomicMin/278235.wgsl.expected.spvasm index ef25b4ffbe..4e939fd60a 100644 --- a/test/intrinsics/gen/atomicMin/278235.wgsl.expected.spvasm +++ b/test/intrinsics/gen/atomicMin/278235.wgsl.expected.spvasm @@ -1,5 +1,15 @@ SKIP: FAILED -var arg_0 : +var arg_0 : atomic; + +fn atomicMin_278235() { + var res : i32 = atomicMin(&(arg_0), 1); +} + +[[stage(compute)]] +fn compute_main() { + atomicMin_278235(); +} + Failed to generate: unable to convert type: __atomic__i32 diff --git a/test/intrinsics/gen/atomicMin/278235.wgsl.expected.wgsl b/test/intrinsics/gen/atomicMin/278235.wgsl.expected.wgsl index d42e421a5b..ff99e71c69 100644 --- a/test/intrinsics/gen/atomicMin/278235.wgsl.expected.wgsl +++ b/test/intrinsics/gen/atomicMin/278235.wgsl.expected.wgsl @@ -1,5 +1,10 @@ -SKIP: FAILED +var arg_0 : atomic; +fn atomicMin_278235() { + var res : i32 = atomicMin(&(arg_0), 1); +} -var arg_0 : -Failed to generate: error: unknown type in EmitType: __atomic__i32 +[[stage(compute)]] +fn compute_main() { + atomicMin_278235(); +} diff --git a/test/intrinsics/gen/atomicMin/69d383.wgsl.expected.hlsl b/test/intrinsics/gen/atomicMin/69d383.wgsl.expected.hlsl index 83c0306c0f..b697f7ffb3 100644 --- a/test/intrinsics/gen/atomicMin/69d383.wgsl.expected.hlsl +++ b/test/intrinsics/gen/atomicMin/69d383.wgsl.expected.hlsl @@ -1,5 +1,15 @@ SKIP: FAILED -var arg_0 : +var arg_0 : atomic; + +fn atomicMin_69d383() { + var res : u32 = atomicMin(&(arg_0), 1u); +} + +[[stage(compute)]] +fn compute_main() { + atomicMin_69d383(); +} + Failed to generate: error: unknown type in EmitType diff --git a/test/intrinsics/gen/atomicMin/69d383.wgsl.expected.spvasm b/test/intrinsics/gen/atomicMin/69d383.wgsl.expected.spvasm index 9fdcd875e2..dfce4dd80b 100644 --- a/test/intrinsics/gen/atomicMin/69d383.wgsl.expected.spvasm +++ b/test/intrinsics/gen/atomicMin/69d383.wgsl.expected.spvasm @@ -1,5 +1,15 @@ SKIP: FAILED -var arg_0 : +var arg_0 : atomic; + +fn atomicMin_69d383() { + var res : u32 = atomicMin(&(arg_0), 1u); +} + +[[stage(compute)]] +fn compute_main() { + atomicMin_69d383(); +} + Failed to generate: unable to convert type: __atomic__u32 diff --git a/test/intrinsics/gen/atomicMin/69d383.wgsl.expected.wgsl b/test/intrinsics/gen/atomicMin/69d383.wgsl.expected.wgsl index caa65d286b..c2190ea80f 100644 --- a/test/intrinsics/gen/atomicMin/69d383.wgsl.expected.wgsl +++ b/test/intrinsics/gen/atomicMin/69d383.wgsl.expected.wgsl @@ -1,5 +1,10 @@ -SKIP: FAILED +var arg_0 : atomic; +fn atomicMin_69d383() { + var res : u32 = atomicMin(&(arg_0), 1u); +} -var arg_0 : -Failed to generate: error: unknown type in EmitType: __atomic__u32 +[[stage(compute)]] +fn compute_main() { + atomicMin_69d383(); +} diff --git a/test/intrinsics/gen/atomicMin/8e38dc.wgsl.expected.msl b/test/intrinsics/gen/atomicMin/8e38dc.wgsl.expected.msl index 6088b5aeb6..dc15ddd6d8 100644 --- a/test/intrinsics/gen/atomicMin/8e38dc.wgsl.expected.msl +++ b/test/intrinsics/gen/atomicMin/8e38dc.wgsl.expected.msl @@ -3,5 +3,23 @@ SKIP: FAILED [[block]] struct SB_RW { - arg_0 : + arg_0 : atomic; +}; + +[[group(0), binding(0)]] var sb_rw : SB_RW; + +fn atomicMin_8e38dc() { + var res : i32 = atomicMin(&(sb_rw.arg_0), 1); +} + +[[stage(fragment)]] +fn fragment_main() { + atomicMin_8e38dc(); +} + +[[stage(compute)]] +fn compute_main() { + atomicMin_8e38dc(); +} + Failed to generate: error: unknown type in EmitType: __atomic__i32 diff --git a/test/intrinsics/gen/atomicMin/8e38dc.wgsl.expected.spvasm b/test/intrinsics/gen/atomicMin/8e38dc.wgsl.expected.spvasm index 17354c31f5..40fc25c731 100644 --- a/test/intrinsics/gen/atomicMin/8e38dc.wgsl.expected.spvasm +++ b/test/intrinsics/gen/atomicMin/8e38dc.wgsl.expected.spvasm @@ -3,5 +3,23 @@ SKIP: FAILED [[block]] struct SB_RW { - arg_0 : + arg_0 : atomic; +}; + +[[group(0), binding(0)]] var sb_rw : SB_RW; + +fn atomicMin_8e38dc() { + var res : i32 = atomicMin(&(sb_rw.arg_0), 1); +} + +[[stage(fragment)]] +fn fragment_main() { + atomicMin_8e38dc(); +} + +[[stage(compute)]] +fn compute_main() { + atomicMin_8e38dc(); +} + Failed to generate: unable to convert type: __atomic__i32 diff --git a/test/intrinsics/gen/atomicMin/8e38dc.wgsl.expected.wgsl b/test/intrinsics/gen/atomicMin/8e38dc.wgsl.expected.wgsl index 6088b5aeb6..8630c15aee 100644 --- a/test/intrinsics/gen/atomicMin/8e38dc.wgsl.expected.wgsl +++ b/test/intrinsics/gen/atomicMin/8e38dc.wgsl.expected.wgsl @@ -1,7 +1,20 @@ -SKIP: FAILED - - [[block]] struct SB_RW { - arg_0 : -Failed to generate: error: unknown type in EmitType: __atomic__i32 + arg_0 : atomic; +}; + +[[group(0), binding(0)]] var sb_rw : SB_RW; + +fn atomicMin_8e38dc() { + var res : i32 = atomicMin(&(sb_rw.arg_0), 1); +} + +[[stage(fragment)]] +fn fragment_main() { + atomicMin_8e38dc(); +} + +[[stage(compute)]] +fn compute_main() { + atomicMin_8e38dc(); +} diff --git a/test/intrinsics/gen/atomicMin/c67a74.wgsl.expected.msl b/test/intrinsics/gen/atomicMin/c67a74.wgsl.expected.msl index 28d463e18d..1b28fe83d8 100644 --- a/test/intrinsics/gen/atomicMin/c67a74.wgsl.expected.msl +++ b/test/intrinsics/gen/atomicMin/c67a74.wgsl.expected.msl @@ -3,5 +3,23 @@ SKIP: FAILED [[block]] struct SB_RW { - arg_0 : + arg_0 : atomic; +}; + +[[group(0), binding(0)]] var sb_rw : SB_RW; + +fn atomicMin_c67a74() { + var res : u32 = atomicMin(&(sb_rw.arg_0), 1u); +} + +[[stage(fragment)]] +fn fragment_main() { + atomicMin_c67a74(); +} + +[[stage(compute)]] +fn compute_main() { + atomicMin_c67a74(); +} + Failed to generate: error: unknown type in EmitType: __atomic__u32 diff --git a/test/intrinsics/gen/atomicMin/c67a74.wgsl.expected.spvasm b/test/intrinsics/gen/atomicMin/c67a74.wgsl.expected.spvasm index 1013691440..cafcb6e14e 100644 --- a/test/intrinsics/gen/atomicMin/c67a74.wgsl.expected.spvasm +++ b/test/intrinsics/gen/atomicMin/c67a74.wgsl.expected.spvasm @@ -3,5 +3,23 @@ SKIP: FAILED [[block]] struct SB_RW { - arg_0 : + arg_0 : atomic; +}; + +[[group(0), binding(0)]] var sb_rw : SB_RW; + +fn atomicMin_c67a74() { + var res : u32 = atomicMin(&(sb_rw.arg_0), 1u); +} + +[[stage(fragment)]] +fn fragment_main() { + atomicMin_c67a74(); +} + +[[stage(compute)]] +fn compute_main() { + atomicMin_c67a74(); +} + Failed to generate: unable to convert type: __atomic__u32 diff --git a/test/intrinsics/gen/atomicMin/c67a74.wgsl.expected.wgsl b/test/intrinsics/gen/atomicMin/c67a74.wgsl.expected.wgsl index 28d463e18d..d2b5c50627 100644 --- a/test/intrinsics/gen/atomicMin/c67a74.wgsl.expected.wgsl +++ b/test/intrinsics/gen/atomicMin/c67a74.wgsl.expected.wgsl @@ -1,7 +1,20 @@ -SKIP: FAILED - - [[block]] struct SB_RW { - arg_0 : -Failed to generate: error: unknown type in EmitType: __atomic__u32 + arg_0 : atomic; +}; + +[[group(0), binding(0)]] var sb_rw : SB_RW; + +fn atomicMin_c67a74() { + var res : u32 = atomicMin(&(sb_rw.arg_0), 1u); +} + +[[stage(fragment)]] +fn fragment_main() { + atomicMin_c67a74(); +} + +[[stage(compute)]] +fn compute_main() { + atomicMin_c67a74(); +} diff --git a/test/intrinsics/gen/atomicOr/5e3d61.wgsl.expected.hlsl b/test/intrinsics/gen/atomicOr/5e3d61.wgsl.expected.hlsl index 83c0306c0f..52aa94ee94 100644 --- a/test/intrinsics/gen/atomicOr/5e3d61.wgsl.expected.hlsl +++ b/test/intrinsics/gen/atomicOr/5e3d61.wgsl.expected.hlsl @@ -1,5 +1,15 @@ SKIP: FAILED -var arg_0 : +var arg_0 : atomic; + +fn atomicOr_5e3d61() { + var res : u32 = atomicOr(&(arg_0), 1u); +} + +[[stage(compute)]] +fn compute_main() { + atomicOr_5e3d61(); +} + Failed to generate: error: unknown type in EmitType diff --git a/test/intrinsics/gen/atomicOr/5e3d61.wgsl.expected.spvasm b/test/intrinsics/gen/atomicOr/5e3d61.wgsl.expected.spvasm index 9fdcd875e2..1a6828ab60 100644 --- a/test/intrinsics/gen/atomicOr/5e3d61.wgsl.expected.spvasm +++ b/test/intrinsics/gen/atomicOr/5e3d61.wgsl.expected.spvasm @@ -1,5 +1,15 @@ SKIP: FAILED -var arg_0 : +var arg_0 : atomic; + +fn atomicOr_5e3d61() { + var res : u32 = atomicOr(&(arg_0), 1u); +} + +[[stage(compute)]] +fn compute_main() { + atomicOr_5e3d61(); +} + Failed to generate: unable to convert type: __atomic__u32 diff --git a/test/intrinsics/gen/atomicOr/5e3d61.wgsl.expected.wgsl b/test/intrinsics/gen/atomicOr/5e3d61.wgsl.expected.wgsl index caa65d286b..14cb642891 100644 --- a/test/intrinsics/gen/atomicOr/5e3d61.wgsl.expected.wgsl +++ b/test/intrinsics/gen/atomicOr/5e3d61.wgsl.expected.wgsl @@ -1,5 +1,10 @@ -SKIP: FAILED +var arg_0 : atomic; +fn atomicOr_5e3d61() { + var res : u32 = atomicOr(&(arg_0), 1u); +} -var arg_0 : -Failed to generate: error: unknown type in EmitType: __atomic__u32 +[[stage(compute)]] +fn compute_main() { + atomicOr_5e3d61(); +} diff --git a/test/intrinsics/gen/atomicOr/5e95d4.wgsl.expected.msl b/test/intrinsics/gen/atomicOr/5e95d4.wgsl.expected.msl index 28d463e18d..e8ae23b0a5 100644 --- a/test/intrinsics/gen/atomicOr/5e95d4.wgsl.expected.msl +++ b/test/intrinsics/gen/atomicOr/5e95d4.wgsl.expected.msl @@ -3,5 +3,23 @@ SKIP: FAILED [[block]] struct SB_RW { - arg_0 : + arg_0 : atomic; +}; + +[[group(0), binding(0)]] var sb_rw : SB_RW; + +fn atomicOr_5e95d4() { + var res : u32 = atomicOr(&(sb_rw.arg_0), 1u); +} + +[[stage(fragment)]] +fn fragment_main() { + atomicOr_5e95d4(); +} + +[[stage(compute)]] +fn compute_main() { + atomicOr_5e95d4(); +} + Failed to generate: error: unknown type in EmitType: __atomic__u32 diff --git a/test/intrinsics/gen/atomicOr/5e95d4.wgsl.expected.spvasm b/test/intrinsics/gen/atomicOr/5e95d4.wgsl.expected.spvasm index 1013691440..c95c957b07 100644 --- a/test/intrinsics/gen/atomicOr/5e95d4.wgsl.expected.spvasm +++ b/test/intrinsics/gen/atomicOr/5e95d4.wgsl.expected.spvasm @@ -3,5 +3,23 @@ SKIP: FAILED [[block]] struct SB_RW { - arg_0 : + arg_0 : atomic; +}; + +[[group(0), binding(0)]] var sb_rw : SB_RW; + +fn atomicOr_5e95d4() { + var res : u32 = atomicOr(&(sb_rw.arg_0), 1u); +} + +[[stage(fragment)]] +fn fragment_main() { + atomicOr_5e95d4(); +} + +[[stage(compute)]] +fn compute_main() { + atomicOr_5e95d4(); +} + Failed to generate: unable to convert type: __atomic__u32 diff --git a/test/intrinsics/gen/atomicOr/5e95d4.wgsl.expected.wgsl b/test/intrinsics/gen/atomicOr/5e95d4.wgsl.expected.wgsl index 28d463e18d..9d389df366 100644 --- a/test/intrinsics/gen/atomicOr/5e95d4.wgsl.expected.wgsl +++ b/test/intrinsics/gen/atomicOr/5e95d4.wgsl.expected.wgsl @@ -1,7 +1,20 @@ -SKIP: FAILED - - [[block]] struct SB_RW { - arg_0 : -Failed to generate: error: unknown type in EmitType: __atomic__u32 + arg_0 : atomic; +}; + +[[group(0), binding(0)]] var sb_rw : SB_RW; + +fn atomicOr_5e95d4() { + var res : u32 = atomicOr(&(sb_rw.arg_0), 1u); +} + +[[stage(fragment)]] +fn fragment_main() { + atomicOr_5e95d4(); +} + +[[stage(compute)]] +fn compute_main() { + atomicOr_5e95d4(); +} diff --git a/test/intrinsics/gen/atomicOr/8d96a0.wgsl.expected.msl b/test/intrinsics/gen/atomicOr/8d96a0.wgsl.expected.msl index 6088b5aeb6..22c839df6a 100644 --- a/test/intrinsics/gen/atomicOr/8d96a0.wgsl.expected.msl +++ b/test/intrinsics/gen/atomicOr/8d96a0.wgsl.expected.msl @@ -3,5 +3,23 @@ SKIP: FAILED [[block]] struct SB_RW { - arg_0 : + arg_0 : atomic; +}; + +[[group(0), binding(0)]] var sb_rw : SB_RW; + +fn atomicOr_8d96a0() { + var res : i32 = atomicOr(&(sb_rw.arg_0), 1); +} + +[[stage(fragment)]] +fn fragment_main() { + atomicOr_8d96a0(); +} + +[[stage(compute)]] +fn compute_main() { + atomicOr_8d96a0(); +} + Failed to generate: error: unknown type in EmitType: __atomic__i32 diff --git a/test/intrinsics/gen/atomicOr/8d96a0.wgsl.expected.spvasm b/test/intrinsics/gen/atomicOr/8d96a0.wgsl.expected.spvasm index 17354c31f5..febe758806 100644 --- a/test/intrinsics/gen/atomicOr/8d96a0.wgsl.expected.spvasm +++ b/test/intrinsics/gen/atomicOr/8d96a0.wgsl.expected.spvasm @@ -3,5 +3,23 @@ SKIP: FAILED [[block]] struct SB_RW { - arg_0 : + arg_0 : atomic; +}; + +[[group(0), binding(0)]] var sb_rw : SB_RW; + +fn atomicOr_8d96a0() { + var res : i32 = atomicOr(&(sb_rw.arg_0), 1); +} + +[[stage(fragment)]] +fn fragment_main() { + atomicOr_8d96a0(); +} + +[[stage(compute)]] +fn compute_main() { + atomicOr_8d96a0(); +} + Failed to generate: unable to convert type: __atomic__i32 diff --git a/test/intrinsics/gen/atomicOr/8d96a0.wgsl.expected.wgsl b/test/intrinsics/gen/atomicOr/8d96a0.wgsl.expected.wgsl index 6088b5aeb6..b44f12fd41 100644 --- a/test/intrinsics/gen/atomicOr/8d96a0.wgsl.expected.wgsl +++ b/test/intrinsics/gen/atomicOr/8d96a0.wgsl.expected.wgsl @@ -1,7 +1,20 @@ -SKIP: FAILED - - [[block]] struct SB_RW { - arg_0 : -Failed to generate: error: unknown type in EmitType: __atomic__i32 + arg_0 : atomic; +}; + +[[group(0), binding(0)]] var sb_rw : SB_RW; + +fn atomicOr_8d96a0() { + var res : i32 = atomicOr(&(sb_rw.arg_0), 1); +} + +[[stage(fragment)]] +fn fragment_main() { + atomicOr_8d96a0(); +} + +[[stage(compute)]] +fn compute_main() { + atomicOr_8d96a0(); +} diff --git a/test/intrinsics/gen/atomicOr/d09248.wgsl.expected.hlsl b/test/intrinsics/gen/atomicOr/d09248.wgsl.expected.hlsl index 83c0306c0f..4ebdc78899 100644 --- a/test/intrinsics/gen/atomicOr/d09248.wgsl.expected.hlsl +++ b/test/intrinsics/gen/atomicOr/d09248.wgsl.expected.hlsl @@ -1,5 +1,15 @@ SKIP: FAILED -var arg_0 : +var arg_0 : atomic; + +fn atomicOr_d09248() { + var res : i32 = atomicOr(&(arg_0), 1); +} + +[[stage(compute)]] +fn compute_main() { + atomicOr_d09248(); +} + Failed to generate: error: unknown type in EmitType diff --git a/test/intrinsics/gen/atomicOr/d09248.wgsl.expected.spvasm b/test/intrinsics/gen/atomicOr/d09248.wgsl.expected.spvasm index ef25b4ffbe..2022c38028 100644 --- a/test/intrinsics/gen/atomicOr/d09248.wgsl.expected.spvasm +++ b/test/intrinsics/gen/atomicOr/d09248.wgsl.expected.spvasm @@ -1,5 +1,15 @@ SKIP: FAILED -var arg_0 : +var arg_0 : atomic; + +fn atomicOr_d09248() { + var res : i32 = atomicOr(&(arg_0), 1); +} + +[[stage(compute)]] +fn compute_main() { + atomicOr_d09248(); +} + Failed to generate: unable to convert type: __atomic__i32 diff --git a/test/intrinsics/gen/atomicOr/d09248.wgsl.expected.wgsl b/test/intrinsics/gen/atomicOr/d09248.wgsl.expected.wgsl index d42e421a5b..55565c6dcd 100644 --- a/test/intrinsics/gen/atomicOr/d09248.wgsl.expected.wgsl +++ b/test/intrinsics/gen/atomicOr/d09248.wgsl.expected.wgsl @@ -1,5 +1,10 @@ -SKIP: FAILED +var arg_0 : atomic; +fn atomicOr_d09248() { + var res : i32 = atomicOr(&(arg_0), 1); +} -var arg_0 : -Failed to generate: error: unknown type in EmitType: __atomic__i32 +[[stage(compute)]] +fn compute_main() { + atomicOr_d09248(); +} diff --git a/test/intrinsics/gen/atomicStore/726882.wgsl.expected.hlsl b/test/intrinsics/gen/atomicStore/726882.wgsl.expected.hlsl index 83c0306c0f..3e2cdaa344 100644 --- a/test/intrinsics/gen/atomicStore/726882.wgsl.expected.hlsl +++ b/test/intrinsics/gen/atomicStore/726882.wgsl.expected.hlsl @@ -1,5 +1,15 @@ SKIP: FAILED -var arg_0 : +var arg_0 : atomic; + +fn atomicStore_726882() { + atomicStore(&(arg_0), 1u); +} + +[[stage(compute)]] +fn compute_main() { + atomicStore_726882(); +} + Failed to generate: error: unknown type in EmitType diff --git a/test/intrinsics/gen/atomicStore/726882.wgsl.expected.spvasm b/test/intrinsics/gen/atomicStore/726882.wgsl.expected.spvasm index 9fdcd875e2..67d3a77bbc 100644 --- a/test/intrinsics/gen/atomicStore/726882.wgsl.expected.spvasm +++ b/test/intrinsics/gen/atomicStore/726882.wgsl.expected.spvasm @@ -1,5 +1,15 @@ SKIP: FAILED -var arg_0 : +var arg_0 : atomic; + +fn atomicStore_726882() { + atomicStore(&(arg_0), 1u); +} + +[[stage(compute)]] +fn compute_main() { + atomicStore_726882(); +} + Failed to generate: unable to convert type: __atomic__u32 diff --git a/test/intrinsics/gen/atomicStore/726882.wgsl.expected.wgsl b/test/intrinsics/gen/atomicStore/726882.wgsl.expected.wgsl index caa65d286b..69c8e4562a 100644 --- a/test/intrinsics/gen/atomicStore/726882.wgsl.expected.wgsl +++ b/test/intrinsics/gen/atomicStore/726882.wgsl.expected.wgsl @@ -1,5 +1,10 @@ -SKIP: FAILED +var arg_0 : atomic; +fn atomicStore_726882() { + atomicStore(&(arg_0), 1u); +} -var arg_0 : -Failed to generate: error: unknown type in EmitType: __atomic__u32 +[[stage(compute)]] +fn compute_main() { + atomicStore_726882(); +} diff --git a/test/intrinsics/gen/atomicStore/8bea94.wgsl.expected.hlsl b/test/intrinsics/gen/atomicStore/8bea94.wgsl.expected.hlsl index 83c0306c0f..40616cc936 100644 --- a/test/intrinsics/gen/atomicStore/8bea94.wgsl.expected.hlsl +++ b/test/intrinsics/gen/atomicStore/8bea94.wgsl.expected.hlsl @@ -1,5 +1,15 @@ SKIP: FAILED -var arg_0 : +var arg_0 : atomic; + +fn atomicStore_8bea94() { + atomicStore(&(arg_0), 1); +} + +[[stage(compute)]] +fn compute_main() { + atomicStore_8bea94(); +} + Failed to generate: error: unknown type in EmitType diff --git a/test/intrinsics/gen/atomicStore/8bea94.wgsl.expected.spvasm b/test/intrinsics/gen/atomicStore/8bea94.wgsl.expected.spvasm index ef25b4ffbe..a97e60e97c 100644 --- a/test/intrinsics/gen/atomicStore/8bea94.wgsl.expected.spvasm +++ b/test/intrinsics/gen/atomicStore/8bea94.wgsl.expected.spvasm @@ -1,5 +1,15 @@ SKIP: FAILED -var arg_0 : +var arg_0 : atomic; + +fn atomicStore_8bea94() { + atomicStore(&(arg_0), 1); +} + +[[stage(compute)]] +fn compute_main() { + atomicStore_8bea94(); +} + Failed to generate: unable to convert type: __atomic__i32 diff --git a/test/intrinsics/gen/atomicStore/8bea94.wgsl.expected.wgsl b/test/intrinsics/gen/atomicStore/8bea94.wgsl.expected.wgsl index d42e421a5b..f0403d0424 100644 --- a/test/intrinsics/gen/atomicStore/8bea94.wgsl.expected.wgsl +++ b/test/intrinsics/gen/atomicStore/8bea94.wgsl.expected.wgsl @@ -1,5 +1,10 @@ -SKIP: FAILED +var arg_0 : atomic; +fn atomicStore_8bea94() { + atomicStore(&(arg_0), 1); +} -var arg_0 : -Failed to generate: error: unknown type in EmitType: __atomic__i32 +[[stage(compute)]] +fn compute_main() { + atomicStore_8bea94(); +} diff --git a/test/intrinsics/gen/atomicStore/cdc29e.wgsl.expected.msl b/test/intrinsics/gen/atomicStore/cdc29e.wgsl.expected.msl index 28d463e18d..cefa61ef76 100644 --- a/test/intrinsics/gen/atomicStore/cdc29e.wgsl.expected.msl +++ b/test/intrinsics/gen/atomicStore/cdc29e.wgsl.expected.msl @@ -3,5 +3,23 @@ SKIP: FAILED [[block]] struct SB_RW { - arg_0 : + arg_0 : atomic; +}; + +[[group(0), binding(0)]] var sb_rw : SB_RW; + +fn atomicStore_cdc29e() { + atomicStore(&(sb_rw.arg_0), 1u); +} + +[[stage(fragment)]] +fn fragment_main() { + atomicStore_cdc29e(); +} + +[[stage(compute)]] +fn compute_main() { + atomicStore_cdc29e(); +} + Failed to generate: error: unknown type in EmitType: __atomic__u32 diff --git a/test/intrinsics/gen/atomicStore/cdc29e.wgsl.expected.spvasm b/test/intrinsics/gen/atomicStore/cdc29e.wgsl.expected.spvasm index 1013691440..2fdd3d29f4 100644 --- a/test/intrinsics/gen/atomicStore/cdc29e.wgsl.expected.spvasm +++ b/test/intrinsics/gen/atomicStore/cdc29e.wgsl.expected.spvasm @@ -3,5 +3,23 @@ SKIP: FAILED [[block]] struct SB_RW { - arg_0 : + arg_0 : atomic; +}; + +[[group(0), binding(0)]] var sb_rw : SB_RW; + +fn atomicStore_cdc29e() { + atomicStore(&(sb_rw.arg_0), 1u); +} + +[[stage(fragment)]] +fn fragment_main() { + atomicStore_cdc29e(); +} + +[[stage(compute)]] +fn compute_main() { + atomicStore_cdc29e(); +} + Failed to generate: unable to convert type: __atomic__u32 diff --git a/test/intrinsics/gen/atomicStore/cdc29e.wgsl.expected.wgsl b/test/intrinsics/gen/atomicStore/cdc29e.wgsl.expected.wgsl index 28d463e18d..966877279b 100644 --- a/test/intrinsics/gen/atomicStore/cdc29e.wgsl.expected.wgsl +++ b/test/intrinsics/gen/atomicStore/cdc29e.wgsl.expected.wgsl @@ -1,7 +1,20 @@ -SKIP: FAILED - - [[block]] struct SB_RW { - arg_0 : -Failed to generate: error: unknown type in EmitType: __atomic__u32 + arg_0 : atomic; +}; + +[[group(0), binding(0)]] var sb_rw : SB_RW; + +fn atomicStore_cdc29e() { + atomicStore(&(sb_rw.arg_0), 1u); +} + +[[stage(fragment)]] +fn fragment_main() { + atomicStore_cdc29e(); +} + +[[stage(compute)]] +fn compute_main() { + atomicStore_cdc29e(); +} diff --git a/test/intrinsics/gen/atomicStore/d1e9a6.wgsl.expected.msl b/test/intrinsics/gen/atomicStore/d1e9a6.wgsl.expected.msl index 6088b5aeb6..98cae7a3e5 100644 --- a/test/intrinsics/gen/atomicStore/d1e9a6.wgsl.expected.msl +++ b/test/intrinsics/gen/atomicStore/d1e9a6.wgsl.expected.msl @@ -3,5 +3,23 @@ SKIP: FAILED [[block]] struct SB_RW { - arg_0 : + arg_0 : atomic; +}; + +[[group(0), binding(0)]] var sb_rw : SB_RW; + +fn atomicStore_d1e9a6() { + atomicStore(&(sb_rw.arg_0), 1); +} + +[[stage(fragment)]] +fn fragment_main() { + atomicStore_d1e9a6(); +} + +[[stage(compute)]] +fn compute_main() { + atomicStore_d1e9a6(); +} + Failed to generate: error: unknown type in EmitType: __atomic__i32 diff --git a/test/intrinsics/gen/atomicStore/d1e9a6.wgsl.expected.spvasm b/test/intrinsics/gen/atomicStore/d1e9a6.wgsl.expected.spvasm index 17354c31f5..21df960d6c 100644 --- a/test/intrinsics/gen/atomicStore/d1e9a6.wgsl.expected.spvasm +++ b/test/intrinsics/gen/atomicStore/d1e9a6.wgsl.expected.spvasm @@ -3,5 +3,23 @@ SKIP: FAILED [[block]] struct SB_RW { - arg_0 : + arg_0 : atomic; +}; + +[[group(0), binding(0)]] var sb_rw : SB_RW; + +fn atomicStore_d1e9a6() { + atomicStore(&(sb_rw.arg_0), 1); +} + +[[stage(fragment)]] +fn fragment_main() { + atomicStore_d1e9a6(); +} + +[[stage(compute)]] +fn compute_main() { + atomicStore_d1e9a6(); +} + Failed to generate: unable to convert type: __atomic__i32 diff --git a/test/intrinsics/gen/atomicStore/d1e9a6.wgsl.expected.wgsl b/test/intrinsics/gen/atomicStore/d1e9a6.wgsl.expected.wgsl index 6088b5aeb6..d7c98994be 100644 --- a/test/intrinsics/gen/atomicStore/d1e9a6.wgsl.expected.wgsl +++ b/test/intrinsics/gen/atomicStore/d1e9a6.wgsl.expected.wgsl @@ -1,7 +1,20 @@ -SKIP: FAILED - - [[block]] struct SB_RW { - arg_0 : -Failed to generate: error: unknown type in EmitType: __atomic__i32 + arg_0 : atomic; +}; + +[[group(0), binding(0)]] var sb_rw : SB_RW; + +fn atomicStore_d1e9a6() { + atomicStore(&(sb_rw.arg_0), 1); +} + +[[stage(fragment)]] +fn fragment_main() { + atomicStore_d1e9a6(); +} + +[[stage(compute)]] +fn compute_main() { + atomicStore_d1e9a6(); +} diff --git a/test/intrinsics/gen/atomicXor/54510e.wgsl.expected.msl b/test/intrinsics/gen/atomicXor/54510e.wgsl.expected.msl index 28d463e18d..9bccb9b35c 100644 --- a/test/intrinsics/gen/atomicXor/54510e.wgsl.expected.msl +++ b/test/intrinsics/gen/atomicXor/54510e.wgsl.expected.msl @@ -3,5 +3,23 @@ SKIP: FAILED [[block]] struct SB_RW { - arg_0 : + arg_0 : atomic; +}; + +[[group(0), binding(0)]] var sb_rw : SB_RW; + +fn atomicXor_54510e() { + var res : u32 = atomicXor(&(sb_rw.arg_0), 1u); +} + +[[stage(fragment)]] +fn fragment_main() { + atomicXor_54510e(); +} + +[[stage(compute)]] +fn compute_main() { + atomicXor_54510e(); +} + Failed to generate: error: unknown type in EmitType: __atomic__u32 diff --git a/test/intrinsics/gen/atomicXor/54510e.wgsl.expected.spvasm b/test/intrinsics/gen/atomicXor/54510e.wgsl.expected.spvasm index 1013691440..7b2d9ec858 100644 --- a/test/intrinsics/gen/atomicXor/54510e.wgsl.expected.spvasm +++ b/test/intrinsics/gen/atomicXor/54510e.wgsl.expected.spvasm @@ -3,5 +3,23 @@ SKIP: FAILED [[block]] struct SB_RW { - arg_0 : + arg_0 : atomic; +}; + +[[group(0), binding(0)]] var sb_rw : SB_RW; + +fn atomicXor_54510e() { + var res : u32 = atomicXor(&(sb_rw.arg_0), 1u); +} + +[[stage(fragment)]] +fn fragment_main() { + atomicXor_54510e(); +} + +[[stage(compute)]] +fn compute_main() { + atomicXor_54510e(); +} + Failed to generate: unable to convert type: __atomic__u32 diff --git a/test/intrinsics/gen/atomicXor/54510e.wgsl.expected.wgsl b/test/intrinsics/gen/atomicXor/54510e.wgsl.expected.wgsl index 28d463e18d..f7be6902aa 100644 --- a/test/intrinsics/gen/atomicXor/54510e.wgsl.expected.wgsl +++ b/test/intrinsics/gen/atomicXor/54510e.wgsl.expected.wgsl @@ -1,7 +1,20 @@ -SKIP: FAILED - - [[block]] struct SB_RW { - arg_0 : -Failed to generate: error: unknown type in EmitType: __atomic__u32 + arg_0 : atomic; +}; + +[[group(0), binding(0)]] var sb_rw : SB_RW; + +fn atomicXor_54510e() { + var res : u32 = atomicXor(&(sb_rw.arg_0), 1u); +} + +[[stage(fragment)]] +fn fragment_main() { + atomicXor_54510e(); +} + +[[stage(compute)]] +fn compute_main() { + atomicXor_54510e(); +} diff --git a/test/intrinsics/gen/atomicXor/75dc95.wgsl.expected.hlsl b/test/intrinsics/gen/atomicXor/75dc95.wgsl.expected.hlsl index 83c0306c0f..83797cfd44 100644 --- a/test/intrinsics/gen/atomicXor/75dc95.wgsl.expected.hlsl +++ b/test/intrinsics/gen/atomicXor/75dc95.wgsl.expected.hlsl @@ -1,5 +1,15 @@ SKIP: FAILED -var arg_0 : +var arg_0 : atomic; + +fn atomicXor_75dc95() { + var res : i32 = atomicXor(&(arg_0), 1); +} + +[[stage(compute)]] +fn compute_main() { + atomicXor_75dc95(); +} + Failed to generate: error: unknown type in EmitType diff --git a/test/intrinsics/gen/atomicXor/75dc95.wgsl.expected.spvasm b/test/intrinsics/gen/atomicXor/75dc95.wgsl.expected.spvasm index ef25b4ffbe..1e57ceefd3 100644 --- a/test/intrinsics/gen/atomicXor/75dc95.wgsl.expected.spvasm +++ b/test/intrinsics/gen/atomicXor/75dc95.wgsl.expected.spvasm @@ -1,5 +1,15 @@ SKIP: FAILED -var arg_0 : +var arg_0 : atomic; + +fn atomicXor_75dc95() { + var res : i32 = atomicXor(&(arg_0), 1); +} + +[[stage(compute)]] +fn compute_main() { + atomicXor_75dc95(); +} + Failed to generate: unable to convert type: __atomic__i32 diff --git a/test/intrinsics/gen/atomicXor/75dc95.wgsl.expected.wgsl b/test/intrinsics/gen/atomicXor/75dc95.wgsl.expected.wgsl index d42e421a5b..854a2d09d0 100644 --- a/test/intrinsics/gen/atomicXor/75dc95.wgsl.expected.wgsl +++ b/test/intrinsics/gen/atomicXor/75dc95.wgsl.expected.wgsl @@ -1,5 +1,10 @@ -SKIP: FAILED +var arg_0 : atomic; +fn atomicXor_75dc95() { + var res : i32 = atomicXor(&(arg_0), 1); +} -var arg_0 : -Failed to generate: error: unknown type in EmitType: __atomic__i32 +[[stage(compute)]] +fn compute_main() { + atomicXor_75dc95(); +} diff --git a/test/intrinsics/gen/atomicXor/c1b78c.wgsl.expected.msl b/test/intrinsics/gen/atomicXor/c1b78c.wgsl.expected.msl index 6088b5aeb6..bd565c88b5 100644 --- a/test/intrinsics/gen/atomicXor/c1b78c.wgsl.expected.msl +++ b/test/intrinsics/gen/atomicXor/c1b78c.wgsl.expected.msl @@ -3,5 +3,23 @@ SKIP: FAILED [[block]] struct SB_RW { - arg_0 : + arg_0 : atomic; +}; + +[[group(0), binding(0)]] var sb_rw : SB_RW; + +fn atomicXor_c1b78c() { + var res : i32 = atomicXor(&(sb_rw.arg_0), 1); +} + +[[stage(fragment)]] +fn fragment_main() { + atomicXor_c1b78c(); +} + +[[stage(compute)]] +fn compute_main() { + atomicXor_c1b78c(); +} + Failed to generate: error: unknown type in EmitType: __atomic__i32 diff --git a/test/intrinsics/gen/atomicXor/c1b78c.wgsl.expected.spvasm b/test/intrinsics/gen/atomicXor/c1b78c.wgsl.expected.spvasm index 17354c31f5..3e68a72363 100644 --- a/test/intrinsics/gen/atomicXor/c1b78c.wgsl.expected.spvasm +++ b/test/intrinsics/gen/atomicXor/c1b78c.wgsl.expected.spvasm @@ -3,5 +3,23 @@ SKIP: FAILED [[block]] struct SB_RW { - arg_0 : + arg_0 : atomic; +}; + +[[group(0), binding(0)]] var sb_rw : SB_RW; + +fn atomicXor_c1b78c() { + var res : i32 = atomicXor(&(sb_rw.arg_0), 1); +} + +[[stage(fragment)]] +fn fragment_main() { + atomicXor_c1b78c(); +} + +[[stage(compute)]] +fn compute_main() { + atomicXor_c1b78c(); +} + Failed to generate: unable to convert type: __atomic__i32 diff --git a/test/intrinsics/gen/atomicXor/c1b78c.wgsl.expected.wgsl b/test/intrinsics/gen/atomicXor/c1b78c.wgsl.expected.wgsl index 6088b5aeb6..4a0baf4b0f 100644 --- a/test/intrinsics/gen/atomicXor/c1b78c.wgsl.expected.wgsl +++ b/test/intrinsics/gen/atomicXor/c1b78c.wgsl.expected.wgsl @@ -1,7 +1,20 @@ -SKIP: FAILED - - [[block]] struct SB_RW { - arg_0 : -Failed to generate: error: unknown type in EmitType: __atomic__i32 + arg_0 : atomic; +}; + +[[group(0), binding(0)]] var sb_rw : SB_RW; + +fn atomicXor_c1b78c() { + var res : i32 = atomicXor(&(sb_rw.arg_0), 1); +} + +[[stage(fragment)]] +fn fragment_main() { + atomicXor_c1b78c(); +} + +[[stage(compute)]] +fn compute_main() { + atomicXor_c1b78c(); +} diff --git a/test/intrinsics/gen/atomicXor/c8e6be.wgsl.expected.hlsl b/test/intrinsics/gen/atomicXor/c8e6be.wgsl.expected.hlsl index 83c0306c0f..423045a429 100644 --- a/test/intrinsics/gen/atomicXor/c8e6be.wgsl.expected.hlsl +++ b/test/intrinsics/gen/atomicXor/c8e6be.wgsl.expected.hlsl @@ -1,5 +1,15 @@ SKIP: FAILED -var arg_0 : +var arg_0 : atomic; + +fn atomicXor_c8e6be() { + var res : u32 = atomicXor(&(arg_0), 1u); +} + +[[stage(compute)]] +fn compute_main() { + atomicXor_c8e6be(); +} + Failed to generate: error: unknown type in EmitType diff --git a/test/intrinsics/gen/atomicXor/c8e6be.wgsl.expected.spvasm b/test/intrinsics/gen/atomicXor/c8e6be.wgsl.expected.spvasm index 9fdcd875e2..d4a0179c00 100644 --- a/test/intrinsics/gen/atomicXor/c8e6be.wgsl.expected.spvasm +++ b/test/intrinsics/gen/atomicXor/c8e6be.wgsl.expected.spvasm @@ -1,5 +1,15 @@ SKIP: FAILED -var arg_0 : +var arg_0 : atomic; + +fn atomicXor_c8e6be() { + var res : u32 = atomicXor(&(arg_0), 1u); +} + +[[stage(compute)]] +fn compute_main() { + atomicXor_c8e6be(); +} + Failed to generate: unable to convert type: __atomic__u32 diff --git a/test/intrinsics/gen/atomicXor/c8e6be.wgsl.expected.wgsl b/test/intrinsics/gen/atomicXor/c8e6be.wgsl.expected.wgsl index caa65d286b..909fa8b214 100644 --- a/test/intrinsics/gen/atomicXor/c8e6be.wgsl.expected.wgsl +++ b/test/intrinsics/gen/atomicXor/c8e6be.wgsl.expected.wgsl @@ -1,5 +1,10 @@ -SKIP: FAILED +var arg_0 : atomic; +fn atomicXor_c8e6be() { + var res : u32 = atomicXor(&(arg_0), 1u); +} -var arg_0 : -Failed to generate: error: unknown type in EmitType: __atomic__u32 +[[stage(compute)]] +fn compute_main() { + atomicXor_c8e6be(); +}