<feed xmlns='http://www.w3.org/2005/Atom'>
<title>slang.git/docs, 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>Use loadModuleFromSourceString in specialization example snippet (#8616)</title>
<updated>2025-10-07T00:29:05+00:00</updated>
<author>
<name>aidanfnv</name>
<email>aidanf@nvidia.com</email>
</author>
<published>2025-10-07T00:29:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=9f9d28c1f496132dc71b80252b0eeddfa28cc8bc'/>
<id>urn:sha1:9f9d28c1f496132dc71b80252b0eeddfa28cc8bc</id>
<content type='text'>
Fixes #8221

This modifies the code snippet used to demonstrate link-time
specialization to use the public `loadModuleFromSourceString` API
instead of the internal `UnownedRawBlob::create`.
It also corrects a couple variable names in the snippet as well.</content>
</entry>
<entry>
<title>Minor Documentation Update to Remove Outdated Section (#8606)</title>
<updated>2025-10-07T00:25:43+00:00</updated>
<author>
<name>Xiang Hong</name>
<email>hx.hongxiang@gmail.com</email>
</author>
<published>2025-10-07T00:25:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=e23b5fa997c9032ee21d58da8c7023fc16795286'/>
<id>urn:sha1:e23b5fa997c9032ee21d58da8c7023fc16795286</id>
<content type='text'>
As mentioned in #8316 , there is a small duplicated and outdated section
in WGSL-Specific Functionalities documentation about specialization
constants support,
remove the outdated duplicated one
&lt;img width="893" height="146" alt="image"
src="https://github.com/user-attachments/assets/abcd7521-645b-4bd6-b926-ce2d978775bd"
/&gt;
as there is a new section in the page
&lt;img width="851" height="319" alt="image"
src="https://github.com/user-attachments/assets/f52e5230-812b-4b29-88f4-bfff890f37ed"
/&gt;

---------

Co-authored-by: Yong He &lt;yonghe@outlook.com&gt;</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>Enhance buffer load specialization pass to specialize past field extracts. (#8547)</title>
<updated>2025-10-01T02:08:23+00:00</updated>
<author>
<name>Yong He</name>
<email>yonghe@outlook.com</email>
</author>
<published>2025-10-01T02:08:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=e4611e2e30a3e5969d402f5ed7e72706a0e3b024'/>
<id>urn:sha1:e4611e2e30a3e5969d402f5ed7e72706a0e3b024</id>
<content type='text'>
This allows us to specialize functions whose argument is a sub element
of a constant buffer, instead of being only applicable to entire buffer
element. Closes #8421.

This change also implements a proper heuristic to determine when to
specialize the calls and defer the buffer loads.

This PR addresses a pathological case exposed in
`slangpy\slangpy\benchmarks\test_benchmark_tensor.py`, which used to
take 27ms to finish, and now takes 1.25ms.


For example, given:
```
struct Bottom
{
    float bigArray[1024];

    [mutating]
    void setVal(int index, float value) { bigArray[index] = value; }
}

struct Root
{
    Bottom top[2];
    [mutating]
    void setTopVal(int x, int y, float value)
    {
        top[x].setVal(y, value);
    }
}

RWStructuredBuffer&lt;Root&gt; sb;

[shader("compute")]
[numthreads(1, 1, 1)]
void compute_main(uint3 tid: SV_DispatchThreadID)
{
    sb[0].setTopVal(1, 2, 100.0f);
}
```

We are now able to specialize the call to `setTopVal` into:
```
void compute_main(uint3 tid: SV_DispatchThreadID)
{
    setTopVal_specialized(0, 1, 2, 100.0f);
}

void setTopVal_specialized(int sbIdx, int x, int y, float value)
{
      Bottom_setVal_specialized(sbIdx, x, y, value);
}

void Bottom_setVal_specialized(int sbIdx, int x, int y, float value)
{
     sb[sbIdx].top[x].bigArray[y] = value;
}
```

And get rid of all unnecessary loads. Achieving this requires a
combination of function call specialization and buffer-load-defer pass.
The buffer-load-defer pass has been completely rewritten to be more
correct and avoid introducing redundant loads.

This PR also adds tests to make sure pointers, bindless handles, and
loads from structured buffer or constant buffers works as expected.</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>
<entry>
<title>Enhance SPIRV-Headers update instructions</title>
<updated>2025-09-23T20:27:47+00:00</updated>
<author>
<name>Jay Kwak</name>
<email>82421531+jkwak-work@users.noreply.github.com</email>
</author>
<published>2025-09-23T20:27:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=796ea80a0309002f7a4c959416b4b2cf67bf4a27'/>
<id>urn:sha1:796ea80a0309002f7a4c959416b4b2cf67bf4a27</id>
<content type='text'>
Added instructions to retrieve the hash value of spirv-headers.</content>
</entry>
<entry>
<title>Revise SPIRV-Headers update instructions in documentation (#8488)</title>
<updated>2025-09-20T00:21:24+00:00</updated>
<author>
<name>Jay Kwak</name>
<email>82421531+jkwak-work@users.noreply.github.com</email>
</author>
<published>2025-09-20T00:21:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=4d8ff3488f79c86eb7ef0d563045add2c0008138'/>
<id>urn:sha1:4d8ff3488f79c86eb7ef0d563045add2c0008138</id>
<content type='text'>
It turned out that SPIRV-Headers update has to be done after building
SPIRV-Tools

Co-authored-by: Gangzheng Tong &lt;tonggangzheng@gmail.com&gt;</content>
</entry>
<entry>
<title>Update SPIRV-{Tools,Headers} (#8415)</title>
<updated>2025-09-10T02:34:44+00:00</updated>
<author>
<name>Jay Kwak</name>
<email>82421531+jkwak-work@users.noreply.github.com</email>
</author>
<published>2025-09-10T02:34:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=7026dec790ab0c239c58ebf72b17633e9e8765c3'/>
<id>urn:sha1:7026dec790ab0c239c58ebf72b17633e9e8765c3</id>
<content type='text'>
This updates SPIRV submodules.
Unfortunately we cannot use the latest because one of PRs in SPIRV-Tools
causes VVL errors on our slang-tests. The issue is tracked in
- https://github.com/KhronosGroup/SPIRV-Tools/issues/6316
- https://github.com/shader-slang/slang/issues/8414

This PR also updates/simplifies the document of updating SPIRV process.</content>
</entry>
<entry>
<title>Relax restriction on using link-time types for shader parameters. (#8387)</title>
<updated>2025-09-06T05:37:34+00:00</updated>
<author>
<name>Yong He</name>
<email>yonghe@outlook.com</email>
</author>
<published>2025-09-06T05:37:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=bc6b82666fa4deda932c36cea93ee2059e0992b2'/>
<id>urn:sha1:bc6b82666fa4deda932c36cea93ee2059e0992b2</id>
<content type='text'>
This change relaxes a previous restriction on link-time types and
constants, so that we now allow them to be used to define shader
parameters.

Doing so will result in a parameter layout that is incomplete prior to
linking. The PR added a test to call the reflection API on a fully
linked program and ensure that we can report correct binding info.</content>
</entry>
</feed>
