diff options
| author | ArielG-NV <159081215+ArielG-NV@users.noreply.github.com> | 2024-07-19 02:05:33 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-18 23:05:33 -0700 |
| commit | a00d603519d395d41b2f68c5874e8a708335a31a (patch) | |
| tree | 114e3da71d3d95034e944edb0ffd1510f192418d /tests/hlsl-intrinsic | |
| parent | 59dd133f1c52fb0a7a388f4a8f42234f4556a28a (diff) | |
Metal: `Interlocked` (atomic) member function support for buffers (#4655)
* Metal: `Interlocked` (atomic) member function support for buffers
fixes: #4654
fixes: #4481
1. Add `Interlocked` (atomic) member function support for buffers to Metal
2. Fix `__getEquivalentStructuredBuffer` so it works with CPP/Metal targets
* add `CompareStore` support
* legalize RWByteAddressBuffer to fully replace StructuredBuffer
* destroy replaced byte-addr buffer
* cleanup as per review and add comment to explain why certain code exists
* fix flow of byte-address-buffer replacement
* toggle on option to translate byteAddrBuffer to StructuredBuffer
* cleanup unused buffers
* add treatGetEquivalentStructuredBufferAsGetThis flag to treat getEquivStructuredBuffer as a byteAddressBuffer
* comment to explain `treatGetEquivalentStructuredBufferAsGetThis`
---------
Co-authored-by: Yong He <yonghe@outlook.com>
Diffstat (limited to 'tests/hlsl-intrinsic')
| -rw-r--r-- | tests/hlsl-intrinsic/byte-address-buffer-atomics.slang | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/hlsl-intrinsic/byte-address-buffer-atomics.slang b/tests/hlsl-intrinsic/byte-address-buffer-atomics.slang index f133bb372..f621cc621 100644 --- a/tests/hlsl-intrinsic/byte-address-buffer-atomics.slang +++ b/tests/hlsl-intrinsic/byte-address-buffer-atomics.slang @@ -1,6 +1,10 @@ //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK): -dx12 -use-dxil -output-using-type //TEST(compute, vulkan):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cuda -output-using-type +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK): -metal -output-using-type +//TEST:SIMPLE(filecheck=METALLIB): -target metallib -entry computeMain -stage compute + +// METALLIB: computeMain //TEST_INPUT:ubuffer(data=[0 0 0 0 0 0 0 0 0 0 0 0], stride=4):out,name outputBuffer RWStructuredBuffer<int> outputBuffer; |
