<feed xmlns='http://www.w3.org/2005/Atom'>
<title>slang.git/source/slang/slang-ir-collect-global-uniforms.cpp, 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-10T12:01:36+00:00</updated>
<entry>
<title>CUDA: Fix compiler crash with unsized array field - nonuniformres-as-… (#8380)</title>
<updated>2025-09-10T12:01:36+00:00</updated>
<author>
<name>Harsh Aggarwal (NVIDIA)</name>
<email>haaggarwal@nvidia.com</email>
</author>
<published>2025-09-10T12:01:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=3d0f5ee55788dca324641ae9268ee37dc4d7d9d5'/>
<id>urn:sha1:3d0f5ee55788dca324641ae9268ee37dc4d7d9d5</id>
<content type='text'>
…function-parameter.slang #8315

Root Cause:
CUDA compilation crashed with `assert failure:
!seenFinalUnsizedArrayField` because unsized arrays like
`RWStructuredBuffer&lt;uint&gt; globalBuffer[]` were not the final field in
generated parameter structs, violating the layout constraint in
slang-ir-layout.cpp.

Fix:
Extended `collectGlobalUniformParameters` to automatically reorder
struct fields for CUDA targets - regular fields first, unsized arrays
last. Other targets preserve original order.

Impact:
- Enables CUDA support for nonuniform resource indexing as function
parameters
- Zero impact on existing GLSL/HLSL/SPIRV targets
- Automatic handling - no manual parameter reordering required

Files: slang-emit.cpp, slang-ir-collect-global-uniforms.cpp/.h, test
file

---------

Co-authored-by: slangbot &lt;ellieh+slangbot@nvidia.com&gt;
Co-authored-by: slangbot &lt;186143334+slangbot@users.noreply.github.com&gt;
Co-authored-by: Ellie Hermaszewska &lt;ellieh@nvidia.com&gt;</content>
</entry>
<entry>
<title>Fix crash when using GLSL global uniforms and varying inputs/ouputs together (#6651)</title>
<updated>2025-04-05T01:02:16+00:00</updated>
<author>
<name>Darren Wihandi</name>
<email>65404740+fairywreath@users.noreply.github.com</email>
</author>
<published>2025-04-05T01:02:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=680fb0b4e9cbb65d46677183a3f68630be1f6179'/>
<id>urn:sha1:680fb0b4e9cbb65d46677183a3f68630be1f6179</id>
<content type='text'>
* Fix incorrect assert on mixed global uniform and varyings

* add test

* remove unnecessary include

* fix incorrect logic

* fix comment grammar

* address review comments and improve test

* minimize diff

* fix more issues for cuda build

* remove unnecessary line for diff</content>
</entry>
<entry>
<title>Implement specialization constant support in numthreads / local_size (#5963)</title>
<updated>2025-01-14T18:32:29+00:00</updated>
<author>
<name>Julius Ikkala</name>
<email>julius.ikkala@gmail.com</email>
</author>
<published>2025-01-14T18:32:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=cbdc7e1219e472fd74f7f559d7e417f233e7df39'/>
<id>urn:sha1:cbdc7e1219e472fd74f7f559d7e417f233e7df39</id>
<content type='text'>
* Allow using specialization constants in numthreads attribute

* Add support for GLSL local_size_x_id syntax

* Fix overeager specialization constant parsing

* Add diagnostics for specialization constant numthreads

* Remove unused variable

* Fix local_size_x_id not finding existing specialization constant

* Allow materializeGetWorkGroupSize to reference specialization constants

* Use SpvOpExecutionModeId for modes that require it

* Cleanup specialization constant numthreads code

* Add tests for specialization constant work group sizes

* Fix implicit Slang::Int -&gt; int32_t cast

* Fix querying thread group size in reflection API

---------

Co-authored-by: Yong He &lt;yonghe@outlook.com&gt;</content>
</entry>
<entry>
<title>Add datalayout for constant buffers. (#5608)</title>
<updated>2024-11-21T22:07:23+00:00</updated>
<author>
<name>Yong He</name>
<email>yonghe@outlook.com</email>
</author>
<published>2024-11-21T22:07:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=fdf061e278720ec066a1fac8f1f35a22e817bf2d'/>
<id>urn:sha1:fdf061e278720ec066a1fac8f1f35a22e817bf2d</id>
<content type='text'>
* Add datalayout for constant buffers.

* Fixes.

* Fix test.

* Fix glsl codegen.

* Update spirv-specific doc.

* Fix test.

* Fix binding in the presense of specialization constants.

* address comments.

* Add a test for constant buffer layout.</content>
</entry>
<entry>
<title>Move switch statement bodies to their own lines (#5493)</title>
<updated>2024-11-05T17:47:26+00:00</updated>
<author>
<name>Ellie Hermaszewska</name>
<email>ellieh@nvidia.com</email>
</author>
<published>2024-11-05T17:47:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=b118451e301d734e3e783b3acdf871f3f6ea851c'/>
<id>urn:sha1:b118451e301d734e3e783b3acdf871f3f6ea851c</id>
<content type='text'>
* Move switch statement bodies to their own lines

* format

---------

Co-authored-by: Yong He &lt;yonghe@outlook.com&gt;</content>
</entry>
<entry>
<title>format</title>
<updated>2024-10-29T06:49:26+00:00</updated>
<author>
<name>Ellie Hermaszewska</name>
<email>ellieh@nvidia.com</email>
</author>
<published>2024-10-29T06:49:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=f65d756bff8d4c5cbc15bd0322a2ae8e6b896a21'/>
<id>urn:sha1:f65d756bff8d4c5cbc15bd0322a2ae8e6b896a21</id>
<content type='text'>
* format

* Minor test fixes

* enable checking cpp format in ci</content>
</entry>
<entry>
<title>Support recomputing phi params in bwd prop func. (#2841)</title>
<updated>2023-04-26T01:32:45+00:00</updated>
<author>
<name>Yong He</name>
<email>yonghe@outlook.com</email>
</author>
<published>2023-04-26T01:32:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=1717c6c507043a5cc960c2344dd556524804ce59'/>
<id>urn:sha1:1717c6c507043a5cc960c2344dd556524804ce59</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Remove `SharedIRBuilder`. (#2657)</title>
<updated>2023-02-17T00:44:04+00:00</updated>
<author>
<name>Yong He</name>
<email>yonghe@outlook.com</email>
</author>
<published>2023-02-17T00:44:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=245466d89cfe54b78da486f06d470bc6daaf4625'/>
<id>urn:sha1:245466d89cfe54b78da486f06d470bc6daaf4625</id>
<content type='text'>
Co-authored-by: Yong He &lt;yhe@nvidia.com&gt;</content>
</entry>
<entry>
<title>Overhaul global inst deduplication and cpp/cuda backend. (#2654)</title>
<updated>2023-02-16T21:55:32+00:00</updated>
<author>
<name>Yong He</name>
<email>yonghe@outlook.com</email>
</author>
<published>2023-02-16T21:55:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=4c4826d47eeef4675daae4ae53ff76f4d5ebd84a'/>
<id>urn:sha1:4c4826d47eeef4675daae4ae53ff76f4d5ebd84a</id>
<content type='text'>
* Overhaul global inst deduplication and cpp/cuda backend.

* Update IR documentation.

---------

Co-authored-by: Yong He &lt;yhe@nvidia.com&gt;</content>
</entry>
<entry>
<title>Added NativeStringType (#2252)</title>
<updated>2022-05-27T21:28:05+00:00</updated>
<author>
<name>jsmall-nvidia</name>
<email>jsmall@nvidia.com</email>
</author>
<published>2022-05-27T21:28:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=2d3392f22c894957d17dd13486e0565c4ecea89c'/>
<id>urn:sha1:2d3392f22c894957d17dd13486e0565c4ecea89c</id>
<content type='text'>
* #include an absolute path didn't work - because paths were taken to always be relative.

* Use TerminatedUnownedStringSlice for literals in output C++.

* Remove Escape/Unescape functions used in slang-token-reader.cpp
Add target type of 'host-cpp' etc to map to the target types.

* Fix some corner cases around string encoding.

* Added unit test for string escaping.
Fixed some assorted escaping bugs.

* Updated test output.

* Added decode test.

* Stop using hex output, to get around 'greedy' aspect. Use octal instead.</content>
</entry>
</feed>
