<feed xmlns='http://www.w3.org/2005/Atom'>
<title>slang.git/docs/user-guide/03-convenience-features.md, 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-06-04T20:07:11+00:00</updated>
<entry>
<title>Add legalization for 0-sized arrays. (#7327)</title>
<updated>2025-06-04T20:07:11+00:00</updated>
<author>
<name>Yong He</name>
<email>yonghe@outlook.com</email>
</author>
<published>2025-06-04T20:07:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=2d7106640addf0ac88e0a5462117cd90b13a5e73'/>
<id>urn:sha1:2d7106640addf0ac88e0a5462117cd90b13a5e73</id>
<content type='text'>
* Add legalization for 0-sized arrays.

* Allow 0-sized arrays in the front-end.

* More tests.

* Add `Conditional&lt;T, hasValue&gt;` type to core module.

* Update toc.

* Fix wording.

* Update test.</content>
</entry>
<entry>
<title>fix doc's website table &amp; grammer (#7268)</title>
<updated>2025-05-29T01:33:49+00:00</updated>
<author>
<name>ArielG-NV</name>
<email>159081215+ArielG-NV@users.noreply.github.com</email>
</author>
<published>2025-05-29T01:33:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=45d794f57d453a5564a7360400c5bfc04bf12b31'/>
<id>urn:sha1:45d794f57d453a5564a7360400c5bfc04bf12b31</id>
<content type='text'>
github pages reqire new-line to render table correctly.
Grammer problem.</content>
</entry>
<entry>
<title>Change default descriptor binding to be VkMutable (#7224)</title>
<updated>2025-05-28T01:31:25+00:00</updated>
<author>
<name>ArielG-NV</name>
<email>159081215+ArielG-NV@users.noreply.github.com</email>
</author>
<published>2025-05-28T01:31:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=c9e9efaaf064dc0a3d3a538506f5f0f47de9b674'/>
<id>urn:sha1:c9e9efaaf064dc0a3d3a538506f5f0f47de9b674</id>
<content type='text'>
* change default descriptor binding to be VkMutable</content>
</entry>
<entry>
<title>Implement throw &amp; catch statements (#6916)</title>
<updated>2025-05-23T19:27:37+00:00</updated>
<author>
<name>Julius Ikkala</name>
<email>julius.ikkala@gmail.com</email>
</author>
<published>2025-05-23T19:27:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=57c3f938221c427b78da7087f8a832ba4a271a7c'/>
<id>urn:sha1:57c3f938221c427b78da7087f8a832ba4a271a7c</id>
<content type='text'>
* Implement throw statement

It already existed in the IR, so only parsing, checking and lowering was
missing.

* Initial catch implementation

Likely very broken.

* Error out when catch() isn't last in scope

* Prevent accessing variables from scope preceding catch

As those may actually not be available at that point.

* Add IError and use it in Result type lowering

* Add diagnostic tests

* Allow caught throws in non-throw functions

* Fix catch propagating between functions &amp; SPIR-V merge issue

* Add test for non-trivial error types

* Fix MSVC build

* Fix invalid value type from Result lowering

* Also lower error handling in templates

* Lower result types only after specialization

* Attempt to disambiguate error enums by witness table

* Revert matching by witness, types should be distinct too

* Don't assert valueField when getting Result's error value

It may not exist if the function returns void, but getting the error
value is still legitimate.

* Update tests for new error numbers &amp; get rid of expected.txt

* Change catch lowering to resemble breaking a loop

... To make SPIR-V happy.

* Fix dead catch blocks and invalid cached dominator tree

* More SPIR-V adjustment

* Lower catch as two nested loops

* Add defer interaction test and revert broken defer changes

* Fix enum type when throwing literals

* Cleanup and bikeshedding

* Document error handling mechanism

* Fix table of contents

* Use boolean tag in Result&lt;T, E&gt;

* Use anyValue storage for Result&lt;T,E&gt;

* Remove IError

* Fix formatting

* Eradicate success values from docs and tests

* Use parseModernParamDecl for catch parameter

* Implement do-catch syntax

* Implement catch-all

* Fix formatting

* Fix marshalling native calls that throw

---------

Co-authored-by: Yong He &lt;yonghe@outlook.com&gt;</content>
</entry>
<entry>
<title>adjust docs as per review (#7168)</title>
<updated>2025-05-22T20:40:40+00:00</updated>
<author>
<name>ArielG-NV</name>
<email>159081215+ArielG-NV@users.noreply.github.com</email>
</author>
<published>2025-05-22T20:40:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=1ad34781514a0b22ff48374b6de7ac1d3976f313'/>
<id>urn:sha1:1ad34781514a0b22ff48374b6de7ac1d3976f313</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fix correct bindings for bindless resource model [SPIRV and GLSL] (#7131)</title>
<updated>2025-05-16T18:57:17+00:00</updated>
<author>
<name>ArielG-NV</name>
<email>159081215+ArielG-NV@users.noreply.github.com</email>
</author>
<published>2025-05-16T18:57:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=0244c96d637f47fa264d441a82d3dca78889373b'/>
<id>urn:sha1:0244c96d637f47fa264d441a82d3dca78889373b</id>
<content type='text'>
Fix correct bindings for bindless resource model [spirv and glsl]

fixes: #6952

Problem:
* Currently all bindless objects are placed in the same set (fine) and same binding (incorrect behavior for vulkan). This is incorrect since as per [spec](https://registry.khronos.org/vulkan/specs/latest/man/html/VkDescriptorType.html), only 1 resource type may be written to each index inside a set (these rules are loosened with VK_EXT_mutable_descriptor_type)
* This means currently generated bindings do not work in practice if we (for example) use `Sampler2D.Handle` and `Texture1D.Handle` in a shader since we would place 2 incompatible objects in the same binding-index and set.

Solution:
* `__getDynamicResourceHeap` was modified to allow bindings to chosen dynamically for a descriptor
* use `IOpaqueDescriptor` to check compile-time information of resource types so that we can identify different resources
* Using this information of `IOpaqueDescriptor`, we modify `defaultGetDescriptorFromHandle` to provide a binding model (1 resource per binding-index) which produces legal spirv/glsl.
* To support `VK_EXT_mutable_descriptor_type` the function `defaultGetDescriptorFromHandle` has a set of options (`BindlessDescriptorOptions`) for a user to pick-from to support their binding model. Capabilities are not used here for flexibility purposes (specifically old shaders mixed with modern vulkan extensions).

Other changes:
* Added `TexelBuffer` DescriptorKind to aid in generating correct bindings

* format code

* Add to docs bindless changes, make AccelerationStructure use its handle directly, adjust tests accordingly

---------

Co-authored-by: slangbot &lt;186143334+slangbot@users.noreply.github.com&gt;</content>
</entry>
<entry>
<title>Add `IOpaqueDescriptor::descriptorAccess`. (#6967)</title>
<updated>2025-04-30T23:38:57+00:00</updated>
<author>
<name>Yong He</name>
<email>yonghe@outlook.com</email>
</author>
<published>2025-04-30T23:38:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=a8d7bb9f781fd77080f07bfaab54fbbcf3a3686d'/>
<id>urn:sha1:a8d7bb9f781fd77080f07bfaab54fbbcf3a3686d</id>
<content type='text'>
* Add `IOpaqueHandle::descriptorAccess`.

* Update doc.

* fix.</content>
</entry>
<entry>
<title>Fix user-guide typos (#6789)</title>
<updated>2025-04-11T22:34:07+00:00</updated>
<author>
<name>Gangzheng Tong</name>
<email>gtong@nvidia.com</email>
</author>
<published>2025-04-11T22:34:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=8e6af6259bd1dd47d81c36f0562ff362ca5d42c3'/>
<id>urn:sha1:8e6af6259bd1dd47d81c36f0562ff362ca5d42c3</id>
<content type='text'>
* Fix user-guide typos

Use LLM to scan each of the markdown files to fix typos.
Try not to change anything but the typos in this CL.

* typo not caught by LLM

* add output of ./build_toc.ps1</content>
</entry>
<entry>
<title>Fix inaccurate documentation in member function mutability. (#6065)</title>
<updated>2025-01-14T16:27:32+00:00</updated>
<author>
<name>Entropy Lost</name>
<email>rouli.freeman@gmail.com</email>
</author>
<published>2025-01-14T16:27:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=11575d21934caef511147b279c7495df3efa0ba3'/>
<id>urn:sha1:11575d21934caef511147b279c7495df3efa0ba3</id>
<content type='text'>
* Fix inaccurate documentation in member function mutability.

* Change throw to result in for specificity.

---------

Co-authored-by: Yong He &lt;yonghe@outlook.com&gt;</content>
</entry>
<entry>
<title>Initial implementation of SP#015 `DescriptorHandle&lt;T&gt;`. (#6028)</title>
<updated>2025-01-10T18:57:04+00:00</updated>
<author>
<name>Yong He</name>
<email>yonghe@outlook.com</email>
</author>
<published>2025-01-10T18:57:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=5290c580632cfb56847b863a32dc020a21d1c93e'/>
<id>urn:sha1:5290c580632cfb56847b863a32dc020a21d1c93e</id>
<content type='text'>
* Initial implementation of `ResourcePtr&lt;T&gt;`.

* Update docs

* Fix build error.

* Add more discussion.

* Update documentation.

* Update TOC.

* Fix.

* Fix.

* Add test case for custom `getResourceFromBindlessHandle`.

* Add namehint to generated descriptor heap param.

* Fix.

* Fix.

* format code

* Rename to `DescriptorHandle`, and add `T.Handle` alias.

* Fix compiler error.

* Fix.

* Fix build.

* Renames.

* Fix documentation.

* Documentation fix.

---------

Co-authored-by: slangbot &lt;186143334+slangbot@users.noreply.github.com&gt;</content>
</entry>
</feed>
