<feed xmlns='http://www.w3.org/2005/Atom'>
<title>slang.git/tests/wgsl, 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-16T10:42:57+00:00</updated>
<entry>
<title>Fix WGSL bitshift test typo (#8720)</title>
<updated>2025-10-16T10:42:57+00:00</updated>
<author>
<name>Julius Ikkala</name>
<email>julius.ikkala@gmail.com</email>
</author>
<published>2025-10-16T10:42:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=7e35123bae1cd3b032fdffcafd600aa78394bf2d'/>
<id>urn:sha1:7e35123bae1cd3b032fdffcafd600aa78394bf2d</id>
<content type='text'>
Random drive-by test fix, this was reading past the end of the buffer
but usually succeeded because the expected result is 0.</content>
</entry>
<entry>
<title>8503 wgsl depth texture (#8645)</title>
<updated>2025-10-10T16:39:13+00:00</updated>
<author>
<name>Sami Kiminki (NVIDIA)</name>
<email>235843927+skiminki-nv@users.noreply.github.com</email>
</author>
<published>2025-10-10T16:39:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=5c672cef1f6ac6b5cd6cd71bd47489b7b7331adb'/>
<id>urn:sha1:5c672cef1f6ac6b5cd6cd71bd47489b7b7331adb</id>
<content type='text'>
Add built-in type aliases for DepthTexture* and unify Sampler*Shadow
    
Add the following type aliases:
- DepthTexture1D, DepthTexture1DArray
- DepthTexture2D, DepthTexture2DArray
- DepthTexture2DMS, DepthTexture2DMSArray
- DepthTexture3D
- DepthTextureCube, DepthTextureCubeArray
    
These match with the type aliases for non-depth textures.
    
Also, unify the Sampler*Shadow type aliases with DepthTexture*
ones. This adds the following:
    
- Sampler2DMSShadow
- Sampler2DMSArrayShadow
    
and removes the Sampler3DArrayShadow type alias. As a side-effect, the
descriptions of Sampler*ArrayShadow type aliases are fixed
("texture-sampler for shadow" ==&gt; "texture-sampler array for shadow").

Update the slang tests to use the newly introduced type aliases instead
of
the custom type aliases that use _Texture&lt;&gt; directly.

Add DepthTexture testing in
hlsl-intrinsic/texture/texture-intrinsics. Do this by extracting the
test logic of computeMain() in a separate function and parametrize it
for non-depth/depth texture types. This adds basic coverage for the
following types:

- DepthTexture1D
- DepthTexture2D
- DepthTexture3D
- DepthTextureCube
- DepthTexture1DArray
- DepthTexture2DArray
- DepthTextureCubeArray

Issue #6166
Issue #8503</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>Remove the semantic decoration from the original entry struct (#8146)</title>
<updated>2025-08-13T15:37:22+00:00</updated>
<author>
<name>Jay Kwak</name>
<email>82421531+jkwak-work@users.noreply.github.com</email>
</author>
<published>2025-08-13T15:37:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=d7e2bac2df176af4cd3955e6df02e2ddcbc059d8'/>
<id>urn:sha1:d7e2bac2df176af4cd3955e6df02e2ddcbc059d8</id>
<content type='text'>
When we legalize the entry point param, there are cases where we need to
reconstruct a struct for the parameter and the original struct wouldn't
be used. But if the user tries to use the origianl struct as a type for
a function parameter, we will end up using both the original struct and
the synthesized struct at the same time.

On Metal and WGSL, it causes an error when an identical semtaic is used
on more than one variable.

This commit removes the semantics from the original struct after cloning
the type.

Fixes https://github.com/shader-slang/slang/issues/8141
Related to https://github.com/shader-slang/slang/issues/7693

---------

Co-authored-by: ArielG-NV &lt;159081215+ArielG-NV@users.noreply.github.com&gt;</content>
</entry>
<entry>
<title>Lowering unsupported matrix types for GLSL/WGSL/Metal targets (#7936)</title>
<updated>2025-07-30T16:27:38+00:00</updated>
<author>
<name>venkataram-nv</name>
<email>vedavamadath@nvidia.com</email>
</author>
<published>2025-07-30T16:27:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=92ee2927d0012dd454dff7bb53b900f5240073d5'/>
<id>urn:sha1:92ee2927d0012dd454dff7bb53b900f5240073d5</id>
<content type='text'>
* Add emit cases for WGSL and GLSL

* Fix compilation warnings

Modify short cutting test to reflect change in emit logic

Lower matrix for metal as well

Add emit matrix logic for metal

Fix compiler warning

Brace initializer for lowered matrices

Fix compiler warnings

* Tests for metal

* Fix mult, any, and determinant

* Fix matrix-matrix multiplication

* Fix mat mul to be element-wise

* Fix compiler warning

* Move makeMatrix to legalization

* Move unary and binary arithmetic operator lowering to legalization

* Remove emit logic and move final comparison operators to legalization

* Handle vector/matrix negation for WGSL

* Restore older SPIR-V emit logic

* Address PR comments

* Revert to zero minus for negation

* format code

---------

Co-authored-by: slangbot &lt;186143334+slangbot@users.noreply.github.com&gt;</content>
</entry>
<entry>
<title>Fix int16_t/uint16_t support for WGSL target (#7692)</title>
<updated>2025-07-11T03:22:59+00:00</updated>
<author>
<name>Copilot</name>
<email>198982749+Copilot@users.noreply.github.com</email>
</author>
<published>2025-07-11T03:22:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=d0f342c9263a0e47947ac3be9fa4d9f665831e63'/>
<id>urn:sha1:d0f342c9263a0e47947ac3be9fa4d9f665831e63</id>
<content type='text'>
* Initial plan

* Implement int16_t/uint16_t support for WGSL target

Co-authored-by: csyonghe &lt;2652293+csyonghe@users.noreply.github.com&gt;

* Change int16_t/uint16_t to emit proper diagnostics instead of auto-promoting

Co-authored-by: csyonghe &lt;2652293+csyonghe@users.noreply.github.com&gt;

* Implement diagnoseOnce to prevent duplicate diagnostics

Co-authored-by: csyonghe &lt;2652293+csyonghe@users.noreply.github.com&gt;

* Optimize diagnoseOnce to use HashSet::add() return value

Co-authored-by: csyonghe &lt;2652293+csyonghe@users.noreply.github.com&gt;

* Apply code formatting to slang-emit-c-like.h

Co-authored-by: csyonghe &lt;2652293+csyonghe@users.noreply.github.com&gt;

* Fix diagnoseOnce to use all parameters instead of first parameter only

Co-authored-by: csyonghe &lt;2652293+csyonghe@users.noreply.github.com&gt;

---------

Co-authored-by: copilot-swe-agent[bot] &lt;198982749+Copilot@users.noreply.github.com&gt;
Co-authored-by: csyonghe &lt;2652293+csyonghe@users.noreply.github.com&gt;</content>
</entry>
<entry>
<title>Fix crash when using wrong type for inout parameter with WGSL target (#7588)</title>
<updated>2025-07-02T21:50:55+00:00</updated>
<author>
<name>Copilot</name>
<email>198982749+Copilot@users.noreply.github.com</email>
</author>
<published>2025-07-02T21:50:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=05ff8850c8c3d3049c1f429672750f8904d4b808'/>
<id>urn:sha1:05ff8850c8c3d3049c1f429672750f8904d4b808</id>
<content type='text'>
* Initial plan

* Fix crash in WGSL L-value cast lowering with type mismatches

Co-authored-by: csyonghe &lt;2652293+csyonghe@users.noreply.github.com&gt;

* Apply formatting to fix

Co-authored-by: csyonghe &lt;2652293+csyonghe@users.noreply.github.com&gt;

* Update test to verify successful compilation instead of error checking

Co-authored-by: csyonghe &lt;2652293+csyonghe@users.noreply.github.com&gt;

---------

Co-authored-by: copilot-swe-agent[bot] &lt;198982749+Copilot@users.noreply.github.com&gt;
Co-authored-by: csyonghe &lt;2652293+csyonghe@users.noreply.github.com&gt;
Co-authored-by: Yong He &lt;yonghe@outlook.com&gt;</content>
</entry>
<entry>
<title>Fix generation of wgsl case arms (#7374)</title>
<updated>2025-06-25T07:35:12+00:00</updated>
<author>
<name>Swoorup Joshi</name>
<email>swoorupj@gmail.com</email>
</author>
<published>2025-06-25T07:35:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=7e8c85e85440c1fea42236a8ef8286e1ce1638ce'/>
<id>urn:sha1:7e8c85e85440c1fea42236a8ef8286e1ce1638ce</id>
<content type='text'>
* Fix generation of wgsl case arms

* Added test case to test generation of switch case

---------

Co-authored-by: Harsh Aggarwal (NVIDIA) &lt;haaggarwal@nvidia.com&gt;</content>
</entry>
<entry>
<title>Emit SPIRV NonReadable decoration for WTexture* (#6922)</title>
<updated>2025-04-27T20:31:34+00:00</updated>
<author>
<name>Darren Wihandi</name>
<email>65404740+fairywreath@users.noreply.github.com</email>
</author>
<published>2025-04-27T20:31:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=8f6c6e333c06ae1c3b9f00396563c14a2ae09b4d'/>
<id>urn:sha1:8f6c6e333c06ae1c3b9f00396563c14a2ae09b4d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>update slang-rhi (#6587)</title>
<updated>2025-04-24T08:23:06+00:00</updated>
<author>
<name>Simon Kallweit</name>
<email>64953474+skallweitNV@users.noreply.github.com</email>
</author>
<published>2025-04-24T08:23:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=ae1a5e40880808252c68eb51e44051b32a34d399'/>
<id>urn:sha1:ae1a5e40880808252c68eb51e44051b32a34d399</id>
<content type='text'>
* update slang-rhi submodule

* slang-rhi API changes

* disable agility sdk

* fix texture creation

* update formats in tests

* Extent3D rename

* use 1 mip level for 1D textures for Metal

* fix texture upload

* update to latest slang-rhi

* update slang-rhi

* format code

* update slang-rhi

* do not run texture-intrinsics test on metal

* update slang-rhi

* deal with failing tests

* fix more tests

* update slang-rhi

---------

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