<feed xmlns='http://www.w3.org/2005/Atom'>
<title>slang.git/tests/glsl-intrinsic/atomic, 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-03-06T22:26:34+00:00</updated>
<entry>
<title>Update SPIRV-Tools and fix new validation errors. (#6511)</title>
<updated>2025-03-06T22:26:34+00:00</updated>
<author>
<name>Yong He</name>
<email>yonghe@outlook.com</email>
</author>
<published>2025-03-06T22:26:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=4485cf3eaf142cfd5f8470e86739acc67d4e12ea'/>
<id>urn:sha1:4485cf3eaf142cfd5f8470e86739acc67d4e12ea</id>
<content type='text'>
* Update SPIRV-Tools and fix new validation errors.

* Implement pointers for glsl target.

* Reworked packStorage/unpackStorage code gen to operate on pointers rather than values.</content>
</entry>
<entry>
<title>Add validation for destination of atomic operations (#6093)</title>
<updated>2025-01-22T17:10:35+00:00</updated>
<author>
<name>Anders Leino</name>
<email>aleino@nvidia.com</email>
</author>
<published>2025-01-22T17:10:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=04353fb7602b7eb6a8b86193510ebe0c670b7724'/>
<id>urn:sha1:04353fb7602b7eb6a8b86193510ebe0c670b7724</id>
<content type='text'>
* Reimplement the GLSL atomic* functions in terms of __intrinsic_op

Many of these functions map directly to atomic IR instructions.
The functions taking atomic_uint are left as they are.

This helps to address #5989, since the destination pointer type validation can then be
written only for the atomic IR instructions.

* Add validation for atomic operations

Diagnose an error if the destination of the atomic operation is not appropriate, where
appropriate means it's either:
- 'groupshared'
- from a device buffer

This closes #5989.

* Add tests for GLSL atomics destination validation

Attempting to use the GLSL atomic functions on destinations that are neither groupshared
nor from a device buffer should fail with the following error:

error 41403: cannot perform atomic operation because destination is neither groupshared
             nor from a device buffer.

* Validate atomic operations after address space specialization

Address space specialization for SPIR-V is not done as part of `linkAndOptimizeIR`, as it
is for e.g. Metal, so opt out and add a separate call for SPIR-V.

* Allow unchecked in/inout parameters for non-SPIRV targets

* Clean up callees left without uses during address space specialziation

* format code

---------

Co-authored-by: slangbot &lt;186143334+slangbot@users.noreply.github.com&gt;
Co-authored-by: Yong He &lt;yonghe@outlook.com&gt;</content>
</entry>
<entry>
<title>Enable exprs for GLSL binding layout qualifiers (#5807)</title>
<updated>2024-12-10T18:12:19+00:00</updated>
<author>
<name>Darren</name>
<email>65404740+fairywreath@users.noreply.github.com</email>
</author>
<published>2024-12-10T18:12:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=523e9f012e42608df1f7dd91f5625f8171b6ca3d'/>
<id>urn:sha1:523e9f012e42608df1f7dd91f5625f8171b6ca3d</id>
<content type='text'>
* Allow glsl set and binding layout qualifiers to be compile time integer exprs

* add new tests

* add comments

* cleanup on asserts

* addressed review comments and cleanup

* fix missing set expr in test

* fixed tests and cleanup

---------

Co-authored-by: Yong He &lt;yonghe@outlook.com&gt;</content>
</entry>
<entry>
<title>Implement glsl atomic's [non image or memory scope] with optional extension(s); resolves #3587 for GLSL &amp; SPIR-V targets (#3755)</title>
<updated>2024-03-13T19:03:16+00:00</updated>
<author>
<name>ArielG-NV</name>
<email>159081215+ArielG-NV@users.noreply.github.com</email>
</author>
<published>2024-03-13T19:03:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=9fd74379c22af14f794d48fdc22e772d47f61ca3'/>
<id>urn:sha1:9fd74379c22af14f794d48fdc22e772d47f61ca3</id>
<content type='text'>
The following commit implements atomic operations &amp; types associated with OpenGL 4.6, GL_EXT_vulkan_glsl_relaxed, GLSL_EXT_shader_atomic_float, GLSL_EXT_shader_atomic_float2, for GLSL &amp; SPIR-V targets.

Fully implements all functions, and built-in type's, resolves https://github.com/shader-slang/slang/issues/3560 for GLSL &amp; SPRI-V targets.

[Atomic extensions for GLSL can be found here](https://github.com/KhronosGroup/GLSL/tree/main)

Notes of worth:

* atomic_uint is well defined in GLSL-&gt;OpenGL, although was removed in GLSL-&gt;VK unless a compiler extension is supported (GL_EXT_vulkan_glsl_relaxed). This support entails transforming all atomic_uint operations and references into a storage buffer. SPIR-V has AtomicCounter+AtomicStorage (atomic_uint parallel) but does not implement these capabilities for SPIR-V-&gt;VK in any scenario. Due to the case we transform atomic_uint ourselves (GLSL_Syntax-&gt;Slang_IR) to accommodate transforming atomic_uint into valid syntax.
* GLSL_EXT_shader_atomic_float2 (all float16_t &amp; some float/double operations) support is minimal and worth watching out for if enabling the tests. </content>
</entry>
</feed>
