<feed xmlns='http://www.w3.org/2005/Atom'>
<title>slang.git/tests/language-feature, 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-10-16T18:23:13+00:00</updated>
<entry>
<title>Fix use of variadic generics with [Differentiable]. (#8736)</title>
<updated>2025-10-16T18:23:13+00:00</updated>
<author>
<name>Yong He</name>
<email>yonghe@outlook.com</email>
</author>
<published>2025-10-16T18:23:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=bedc3421c9e1e0837fa69e30396a27a60f0fee53'/>
<id>urn:sha1:bedc3421c9e1e0837fa69e30396a27a60f0fee53</id>
<content type='text'>
There was a bug that causes the compiler failing to treat a `no_diff
TypePack` as a type pack, and thus diagnose an error when resolving the
following call.

The fix is to unwrap any ModifiedType wrappers in `IsTypePack()` check.</content>
</entry>
<entry>
<title>Allow entry points with missing numthreads on CPU targets (#8678)</title>
<updated>2025-10-10T23:01:51+00:00</updated>
<author>
<name>Julius Ikkala</name>
<email>julius.ikkala@gmail.com</email>
</author>
<published>2025-10-10T23:01:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=c99addbf2e8a0210b97dad2827045dad95765d08'/>
<id>urn:sha1:c99addbf2e8a0210b97dad2827045dad95765d08</id>
<content type='text'>
Several tests have compute entry points without a `[numthreads(x,y,z)]`
decoration. Currently, none of these tests run on the CPU target, as
they crash the compiler. I took a look at the SPIR-V emitter, which
falls back to a workgroup size of (1,1,1):


https://github.com/shader-slang/slang/blob/1e0908bd7107dfbdac912b693c3ab9bd6e1dc8b3/source/slang/slang-ir-spirv-legalize.cpp#L1635-L1643

To match this behaviour, this PR implements a fallback solution that
makes `emitCalcGroupExtents()` emit (1,1,1).

This PR is both a question and a suggestion; I'm not sure the approach
here is at all reasonable. Personally, I'd just like to explicitly add
`[numthreads(1,1,1)]` to all such tests, but I don't know if it's
actually legal and supported to not have a `numthreads`. So the
implementation here is a bit conservative.

I ran across these when I went through tests for the upcoming LLVM
target. These were the final blockers to get all autodiff and
language-features tests passing (not counting the ones using things like
wave intrinsics and barriers etc.)</content>
</entry>
<entry>
<title>Fix `specializeRTTIObject` to use non-zero RTTI value to work with `Optional&lt;T&gt;`. (#8677)</title>
<updated>2025-10-10T21:34:56+00:00</updated>
<author>
<name>Yong He</name>
<email>yonghe@outlook.com</email>
</author>
<published>2025-10-10T21:34:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=462ea4e66569efa978e4057ea2d041c69d4a729b'/>
<id>urn:sha1:462ea4e66569efa978e4057ea2d041c69d4a729b</id>
<content type='text'>
Closes #8673.

The issue is that we use the RTTI field of an existential to check if it
is null. We have the logic to help the user to fill in a non-zero value
for the RTTI field when such an object is filled from the host. However,
when there is slang code creating an existential value, we still have
old logic in the compiler that just fills in 0 for the RTTI field,
causing an `Optional&lt;IFoo&gt;.hasValue` to always return false in such
cases.</content>
</entry>
<entry>
<title>Addition of `Load`/`Store` coherent operations (#8395)</title>
<updated>2025-10-10T17:09:24+00:00</updated>
<author>
<name>16-Bit-Dog</name>
<email>67922228+16-Bit-Dog@users.noreply.github.com</email>
</author>
<published>2025-10-10T17:09:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=1e0908bd7107dfbdac912b693c3ab9bd6e1dc8b3'/>
<id>urn:sha1:1e0908bd7107dfbdac912b693c3ab9bd6e1dc8b3</id>
<content type='text'>
Fixes: https://github.com/shader-slang/slang/issues/7634
Duplicate of PR https://github.com/shader-slang/slang/pull/8052

Primary Changes:
* Added `storeCoherent` and `loadCoherent` for coherent load/store via
pointers. This is backed by `IRMemoryScopeAttr` which is an `IRAttr`
attached to `IRLoad` and `IRStore`
* Logic in `source\slang\slang-emit-spirv.cpp` for load/store emitting
has been reworked to be less messy and more maintainable
* Add to `hlsl.meta.slang` coop vector and coop matrix coherent
load/store operations

Secondary Changes:
* Added a missing load/store test for coop matrix:
`tests\cooperative-matrix\load-store-pointer.slang`

---------

Co-authored-by: ArielG-NV &lt;aglasroth@nvidia.com&gt;
Co-authored-by: ArielG-NV &lt;159081215+ArielG-NV@users.noreply.github.com&gt;
Co-authored-by: slangbot &lt;186143334+slangbot@users.noreply.github.com&gt;
Co-authored-by: Nathan V. Morrical &lt;natemorrical@gmail.com&gt;</content>
</entry>
<entry>
<title>Allow 1D SV_DispatchThreadID in CPU targets (#8612)</title>
<updated>2025-10-08T23:13:27+00:00</updated>
<author>
<name>Julius Ikkala</name>
<email>julius.ikkala@gmail.com</email>
</author>
<published>2025-10-08T23:13:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=1e4265edd4ec4c44e3d8f209fca802727076aa46'/>
<id>urn:sha1:1e4265edd4ec4c44e3d8f209fca802727076aa46</id>
<content type='text'>
The varying param legalization pass didn't deal with this 1D form of
SV_DispatchThreadID for CPU targets:

```slang
void computeMain(int i : SV_DispatchThreadID)
```

Instead, it just overrode the type of `i` with a `uint3`, breaking lots
of code that attempted to use `i` for something, like a `switch`
statement for example.

I ran across this when going through `language-feature` tests for the
LLVM target, which will also use this legalization pass. I'm separately
submitting this now because this also fixes the existing CPU target. The
test I enable in this PR is one that was previously generating broken
code on CPU.

(somewhat related issue: #7468)</content>
</entry>
<entry>
<title>Use symbol alias instead of wrapper synthesis to implement link-time types. (#8603)</title>
<updated>2025-10-07T00:21:37+00:00</updated>
<author>
<name>Yong He</name>
<email>yonghe@outlook.com</email>
</author>
<published>2025-10-07T00:21:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=6af3381f47e3c22e1657c0e0064fa466e8bde0f6'/>
<id>urn:sha1:6af3381f47e3c22e1657c0e0064fa466e8bde0f6</id>
<content type='text'>
This change achieves link-time type resolution with a different
mechanism.

For `extern struct Foo : IFoo = FooImpl;`,
instead of synthesizing a wrapper type `Foo` that has a `FooImpl inner`
field and dispatches all interface method calls to `inner.method()`,
this PR completely removes this synthesis step, and instead just lower
such `extern`/`export` types as `IRSymbolAlias` instructions that is
just a reference to the type being wrapped.

Then we extend the linker logic to clone the referenced symbol instead
of the SymbolAlias insts itself during linking.

By doing so, we greatly simply the logic need to support link-time
types, and achieves higher robustness by not having to deal with many
AST synthesis scenarios.

Closes #8554.

---------

Co-authored-by: slangbot &lt;186143334+slangbot@users.noreply.github.com&gt;</content>
</entry>
<entry>
<title>Fix incorrect binding index assignment for StructuredBuffer and ByteAddressBuffer with DescriptorHandle (#8252)</title>
<updated>2025-10-01T21:14:05+00:00</updated>
<author>
<name>Copilot</name>
<email>198982749+Copilot@users.noreply.github.com</email>
</author>
<published>2025-10-01T21:14:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=cd7da79f50f2b8fb9bca797131585ff1b85698f6'/>
<id>urn:sha1:cd7da79f50f2b8fb9bca797131585ff1b85698f6</id>
<content type='text'>
- [x] Fix segmentation fault in wrapConstantBufferElement for
DescriptorHandle types
- [x] Split DescriptorKind.Buffer into ConstantBuffer and StorageBuffer
- [x] Update binding enums with descriptive names (ConstantBuffer_Read,
StorageBuffer_Read, etc.)
- [x] Update resource type mappings for correct binding assignments
- [x] Update template logic to handle ConstantBuffer and StorageBuffer
kinds separately
- [x] Update tests to reflect correct binding assignments
- [x] Split DescriptorKind.TexelBuffer into UniformTexelBuffer and
StorageTexelBuffer
- [x] Update TextureBuffer&lt;T&gt; to use UniformTexelBuffer kind
- [x] Update _Texture extension to determine texel buffer kind based on
access mode
- [x] Update test desc-handle-1.slang to handle new DescriptorKind enum
cases

&lt;!-- START COPILOT CODING AGENT TIPS --&gt;
---

✨ Let Copilot coding agent [set things up for
you](https://github.com/shader-slang/slang/issues/new?title=✨+Set+up+Copilot+instructions&amp;body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&amp;assignees=copilot)
— coding agent works faster and does higher quality work when set up for
your repo.

---------

Co-authored-by: Yong He &lt;yonghe@outlook.com&gt;</content>
</entry>
<entry>
<title>Handle getEquivalentStructuredBuffer(castDynamicResource) in byte address legalization pass. (#8567)</title>
<updated>2025-09-30T21:13:53+00:00</updated>
<author>
<name>Yong He</name>
<email>yonghe@outlook.com</email>
</author>
<published>2025-09-30T21:13:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=b6422e50cb19f7f790f29678ba22f31b0b305511'/>
<id>urn:sha1:b6422e50cb19f7f790f29678ba22f31b0b305511</id>
<content type='text'>
This is crash that be triggered by providing custom
`getDescriptorFromHandle` and use it to return access a
ByteAddressBuffer from a bindless handle.

Closes #8355.</content>
</entry>
<entry>
<title>canonical type equality constraint (#8445)</title>
<updated>2025-09-30T06:22:50+00:00</updated>
<author>
<name>Ronan</name>
<email>ro.cailleau@gmail.com</email>
</author>
<published>2025-09-30T06:22:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=ee5adb87050ae7c0b96056a67dddc5d48174e695'/>
<id>urn:sha1:ee5adb87050ae7c0b96056a67dddc5d48174e695</id>
<content type='text'>
Fixes #8439

When checked, generic type equality constraints types are now in a
canonical order, allowing for a commutative type equality operator.

---------

Co-authored-by: Mukund Keshava &lt;mkeshava@nvidia.com&gt;</content>
</entry>
<entry>
<title>Add SPV_NV_bindless_texture support (#8534)</title>
<updated>2025-09-26T23:07:13+00:00</updated>
<author>
<name>Lujin Wang</name>
<email>143145775+lujinwangnv@users.noreply.github.com</email>
</author>
<published>2025-09-26T23:07:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=99de1a6203f676955f80de8c93c0f56c91d4ca96'/>
<id>urn:sha1:99de1a6203f676955f80de8c93c0f56c91d4ca96</id>
<content type='text'>
Treat DescriptorHandle as uint64_t instead of uint2. Implement
target-specific SPIR-V emission with the bindless texture support.

For OpImageTexelPointer, Image must have a type of OpTypePointer with
Type OpTypeImage. Fix the issue by using [constref] in __subscript.

Add a test coverage for various texture/sampler handle types.

---------

Co-authored-by: slangbot &lt;186143334+slangbot@users.noreply.github.com&gt;</content>
</entry>
</feed>
