<feed xmlns='http://www.w3.org/2005/Atom'>
<title>slang.git/tests/metal/atomic-texture-texture3d.slang, branch master</title>
<subtitle>Making it easier to work with shaders</subtitle>
<id>https://git.yummers.dev/slang.git/atom?h=master</id>
<link rel='self' href='https://git.yummers.dev/slang.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/'/>
<updated>2025-09-30T18:21:27+00:00</updated>
<entry>
<title>Enable metal tests (#8446)</title>
<updated>2025-09-30T18:21:27+00:00</updated>
<author>
<name>James Helferty (NVIDIA)</name>
<email>jhelferty@nvidia.com</email>
</author>
<published>2025-09-30T18:21:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=8086adc90b69f3199767c0617e2c429ce6b27f67'/>
<id>urn:sha1:8086adc90b69f3199767c0617e2c429ce6b27f67</id>
<content type='text'>
Enables all tests/metal/ tests that can be easily enabled.

These tests were not originally designed as render tests; they are
generally being enabled for pipecleaning purposes, and will not be
rigorously testing the corresponding funcitonality.

Where they cannot be enabled as render tests, and a metallib test wasn't
already enabled, a metallib test was enabled instead (where possible).

Fixes #7892</content>
</entry>
<entry>
<title>Metal: `Interlocked` (atomic) member function support for buffers (#4655)</title>
<updated>2024-07-19T06:05:33+00:00</updated>
<author>
<name>ArielG-NV</name>
<email>159081215+ArielG-NV@users.noreply.github.com</email>
</author>
<published>2024-07-19T06:05:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=a00d603519d395d41b2f68c5874e8a708335a31a'/>
<id>urn:sha1:a00d603519d395d41b2f68c5874e8a708335a31a</id>
<content type='text'>
* 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 &lt;yonghe@outlook.com&gt;</content>
</entry>
<entry>
<title>Implement non member function atomic texture support (#4544)</title>
<updated>2024-07-10T20:25:51+00:00</updated>
<author>
<name>ArielG-NV</name>
<email>159081215+ArielG-NV@users.noreply.github.com</email>
</author>
<published>2024-07-10T20:25:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=ff9437e6c926c1e7c6a0ebe66592b46dbb3fb36b'/>
<id>urn:sha1:ff9437e6c926c1e7c6a0ebe66592b46dbb3fb36b</id>
<content type='text'>
* Implement non member function atomic texture support texture_buffer and texture1d

Fixes: #4538
Related to: #4291, fixes `tests/compute/atomics-buffer.slang`

Texture objects cannot use `__getMetalAtomicRef` to cast objects into atomic value type. [Texture objects mandate use of member functions](https://developer.apple.com/metal/Metal-Shading-Language-Specification.pdf#Texture%20Functions). The implementation is as follows:
* We can detect texture object usage through checking for an `IRImageSubscript` Operation. `__isTextureAccess()` was added to evaluate if we have an `IRImageSubscript` operation at compile time (before `static_assert`). `__isTextureAccess()` only checks if we are targeting Metal.
* We have all parameter data needed to call a texture atomic function embedded inside `IRImageSubscript`. `__extractTextureFromTextureAccess()` and `__extractCoordFromTextureAccess()` was added to extract this data for use with Metal atomics.

Note:
* Metal documentation has various incorrect details (function names)
* Since we currently hardcode metal versions for compiling, the Metal compiler version was changed to target `Metal 3.1` (`slang-gcc-compiler-util.cpp`)
* textures do not permit atomic float operations

* add fallthrough attribute + fix bug with 'exchange instead of xor' + fix warning bug

* incorrect function name fix

* missing filecheck

* disable atomics-buffer.slang compute test since GFX issue causing it to fail

* Array support for metal interlockedAtomic and proper verification of texture with interlockedAtomic functions

* Array support for metal interlockedAtomic
* proper verification of texture with interlockedAtomic functions
note: had to seperate many functions to allow forceInlining to run

* missing getOperand(0)

* push atomic fix for metal

* fix atomic syntax for metal and hlsl emitting extra brackets (breaks tests)

* test changes and meta changes

1. max is 8 rw textures with metal because Metal has this limit. Split up tests to not hit this limit
2. added back `[0]`...,`T` to test since this legalizes metal atomic intrinsic

* macro'ify some of the atomic code

1. addresses review
2. makes code easier to modify in the future (rather than sifting through 1000 lines we can just look at ~10-30

* fix test 'check'

* missing float support due to macro

* add functions macro generates, `InternalAtomicOperationInfo`

---------

Co-authored-by: Yong He &lt;yonghe@outlook.com&gt;</content>
</entry>
</feed>
