<feed xmlns='http://www.w3.org/2005/Atom'>
<title>slang.git/source/slang/slang-ir-wgsl-legalize.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-10-10T01:30:24+00:00</updated>
<entry>
<title>Defer `IRCastStorageToLogicalDeref` in lowerBufferElementType pass. (#8668)</title>
<updated>2025-10-10T01:30:24+00:00</updated>
<author>
<name>Yong He</name>
<email>yonghe@outlook.com</email>
</author>
<published>2025-10-10T01:30:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=e420f2f980813559b186a6a6bcd5540f74310d02'/>
<id>urn:sha1:e420f2f980813559b186a6a6bcd5540f74310d02</id>
<content type='text'>
Fix a regression on metal test.

In `lowerBufferElementTypeToStorageType` pass, not only we want to defer
an argument that is `CastStorageToLogical` to the callee, but also apply
the same defer logic to `CastStorageToLogicalDeref` as well.

Because `CastStorageToLogicalDeref` will appear as argumnet if
`lowerBufferElementTypeToStorageType` is run before we apply the
`in-&gt;borrow` transformation pass, which is the case for metal parameter
block legalization.</content>
</entry>
<entry>
<title>Fix matrix division by scalar for Metal and WGSL targets (#6752)</title>
<updated>2025-04-14T20:48:17+00:00</updated>
<author>
<name>Darren Wihandi</name>
<email>65404740+fairywreath@users.noreply.github.com</email>
</author>
<published>2025-04-14T20:48:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=705d00ab8528e0d7c14f68b7d0e15fb57280c16e'/>
<id>urn:sha1:705d00ab8528e0d7c14f68b7d0e15fb57280c16e</id>
<content type='text'>
* Fix matrix division by scalar for Metal and WGSL targets

* Add tests

* Minor fix

* Fix compilation error

* Convert to multiplication for WGSL

* Minor cleanup

---------

Co-authored-by: Yong He &lt;yonghe@outlook.com&gt;</content>
</entry>
<entry>
<title>Reuse code for Metal and WGSL entry point legalization (#6063)</title>
<updated>2025-01-15T23:50:56+00:00</updated>
<author>
<name>Darren Wihandi</name>
<email>65404740+fairywreath@users.noreply.github.com</email>
</author>
<published>2025-01-15T23:50:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=9b977e59cf786bbb000b3b868b126c2b9a17d3f3'/>
<id>urn:sha1:9b977e59cf786bbb000b3b868b126c2b9a17d3f3</id>
<content type='text'>
* Refactor to reuse common for metal and wgsl entry point legalization

* refactor system val work item

* refactor simplify user names

* clean up fix semantic field of struct

* improve code layout

* split wgsl/metal to seperate classes and cleanup

* remove extra includes

* remove dead code comments

* minor cleanup

* squash merge from master and resolve conflict

* apply metal spec const thread count changes

* Revert "apply metal spec const thread count changes"

This reverts commit c42d707fd25ee0328598650d3235cd2322810ccc.

* Revert "squash merge from master and resolve conflict"

This reverts commit 06db88ef7001bdfe93fb23af35af0d026b255dee.

* Merge remote-tracking branch 'origin/master'

* apply metal spec const thread count changes

* Revert "apply metal spec const thread count changes"

This reverts commit 3b9e6f53cee2e6076ac2b7a0d015a1ed2cbbd627.

* Revert "Merge remote-tracking branch 'origin/master'"

This reverts commit 99869d573a46dadeb24445405f5a1e37a8e03d0d.

* apply metal spec const thread count changes

---------

Co-authored-by: Yong He &lt;yonghe@outlook.com&gt;</content>
</entry>
<entry>
<title>WGSL: Convert signed vector shift amounts to unsigned (#6023)</title>
<updated>2025-01-10T19:05:05+00:00</updated>
<author>
<name>Anders Leino</name>
<email>aleino@nvidia.com</email>
</author>
<published>2025-01-10T19:05:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=803e0c9f9a9dc4b01e29ebbf3b37a5bba782ac83'/>
<id>urn:sha1:803e0c9f9a9dc4b01e29ebbf3b37a5bba782ac83</id>
<content type='text'>
* WGSL: Fixes for signed shift amounts

- Handle the case of vector shift amounts
 - Closes #5985
- Move handling of scalar case from emit to legalization
- Add tests for bitshifts.

* Move the binary operator legalization function to a common place

* Metal: Legalize binary operations

Closes #6029.

* Fix Metal filecheck test

The int shift amounts are now converted to unsigned.

* format code

---------

Co-authored-by: slangbot &lt;186143334+slangbot@users.noreply.github.com&gt;
Co-authored-by: Yong He &lt;yonghe@outlook.com&gt;</content>
</entry>
<entry>
<title>Lower varying parameters as pointers instead of SSA values. (#5919)</title>
<updated>2025-01-08T06:26:31+00:00</updated>
<author>
<name>Yong He</name>
<email>yonghe@outlook.com</email>
</author>
<published>2025-01-08T06:26:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=c43f6fa55aca23365c86c6ec1737d42be74d9d3e'/>
<id>urn:sha1:c43f6fa55aca23365c86c6ec1737d42be74d9d3e</id>
<content type='text'>
* Add executable test on matrix-typed vertex input.
* Fix emit logic of matrix layout qualifier.
* Pass fragment shader varying input by constref to allow EvaluateAttributeAtCentroid etc. to be implemented correctly.</content>
</entry>
<entry>
<title>Add base vertex and base instance system values (#5918)</title>
<updated>2024-12-20T06:00:20+00:00</updated>
<author>
<name>Darren Wihandi</name>
<email>65404740+fairywreath@users.noreply.github.com</email>
</author>
<published>2024-12-20T06:00:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=a00db74d1afa717dd90dfcf3170c63d0d1c0d3d7'/>
<id>urn:sha1:a00db74d1afa717dd90dfcf3170c63d0d1c0d3d7</id>
<content type='text'>
* Add base vertex and base instance system values

* Fixed incorrect stage in tests</content>
</entry>
<entry>
<title>WGSL: Fix issue where global calls are generated (#5768)</title>
<updated>2024-12-12T18:09:18+00:00</updated>
<author>
<name>Anders Leino</name>
<email>aleino@nvidia.com</email>
</author>
<published>2024-12-12T18:09:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=9c82ed36946941eb1df3186f00903593aab556c3'/>
<id>urn:sha1:9c82ed36946941eb1df3186f00903593aab556c3</id>
<content type='text'>
* Split out SPIR-V -specific legalization of global functions

This is a refactoring and should not affect generated code.

* Move global inst inlining code into separate function

This is a refactoring and should not affect generated code.

* Take SPIR-V -specific parts out of GlobalInstInliningContext

This is a refactoring and should not affect generated code.

* Move 'inlineGlobalValues' to generic inlining context

This is a refactoring and should not affect generated code.

* Move 'setInsertBeforeOutsideASM' to generic inlining context

This is a refactoring and should not affect generated code.

* Move generic inlining context into own file

This is a refactoring and should not affect generated code.

* Run global inlining for WGSL as well

* Make the 'getOutsideASM' function generic as well

* Enable language-feature/constants/static-const-in-generic-interface.slang for WebGPU

* Clarify when it's safe to remove and deallocate an IRInst

* Remove globals if they're left unused after inlining

This closes #5607.

* Handle IRGlobalValueRef in C-like emitter

* format code

---------

Co-authored-by: slangbot &lt;186143334+slangbot@users.noreply.github.com&gt;</content>
</entry>
<entry>
<title>wgsl: signedness mismatch fixes (#5692)</title>
<updated>2024-11-28T09:27:22+00:00</updated>
<author>
<name>Anders Leino</name>
<email>aleino@nvidia.com</email>
</author>
<published>2024-11-28T09:27:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=6e52cc811835b82bf9140189ef1f3a8561baf327'/>
<id>urn:sha1:6e52cc811835b82bf9140189ef1f3a8561baf327</id>
<content type='text'>
* Enable tests/language-feature/enums/strongly-typed-id.slang

* Fix operator signedness mismatch issue

This helps to address issue #5606.

* wgsl: Insert casts for integer type return values

This closes #5606.

* format code

---------

Co-authored-by: slangbot &lt;186143334+slangbot@users.noreply.github.com&gt;</content>
</entry>
<entry>
<title>Support interpolation modifiers for WGSL (#5641)</title>
<updated>2024-11-25T14:05:13+00:00</updated>
<author>
<name>Anders Leino</name>
<email>aleino@nvidia.com</email>
</author>
<published>2024-11-25T14:05:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=d282701ba76e9883d2b7be39ee614fe3bb4f5165'/>
<id>urn:sha1:d282701ba76e9883d2b7be39ee614fe3bb4f5165</id>
<content type='text'>
* wgsl: Support interpolation modifiers

* Move struct key decorations to flattened structs.
** This includes interpolation mode decorations, which must be in the flattened struct.
* Emit interpolation attribute.
* Enable tests/render/nointerpolation.hlsl for WGSL, as a result.

This closes #5625.

* Add new expected output for 'nointerpolation' test</content>
</entry>
<entry>
<title>Fix issue where inter-stage parameters without semantics don't get location attributes (#5670)</title>
<updated>2024-11-25T13:40:47+00:00</updated>
<author>
<name>Anders Leino</name>
<email>aleino@nvidia.com</email>
</author>
<published>2024-11-25T13:40:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=044b52c3195edf3282a0b530a21ad54b87135cd9'/>
<id>urn:sha1:044b52c3195edf3282a0b530a21ad54b87135cd9</id>
<content type='text'>
* wgsl: Make sure each shader input field has a semantic

This closes #5633.

* Add test for inter-stage variables without semantics

This verifies the fix of the second issue identified in
https://github.com/shader-slang/slang/issues/5633

* format code

---------

Co-authored-by: slangbot &lt;186143334+slangbot@users.noreply.github.com&gt;</content>
</entry>
</feed>
