<feed xmlns='http://www.w3.org/2005/Atom'>
<title>slang.git/source/slang/slang-emit-wgsl.h, 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-04-21T18:46:23+00:00</updated>
<entry>
<title>Add `vk::offset` to specify member offsets for push constants (#6797)</title>
<updated>2025-04-21T18:46:23+00:00</updated>
<author>
<name>Darren Wihandi</name>
<email>65404740+fairywreath@users.noreply.github.com</email>
</author>
<published>2025-04-21T18:46:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=62baf92a524a5b57eb465100a5e47c489c049f15'/>
<id>urn:sha1:62baf92a524a5b57eb465100a5e47c489c049f15</id>
<content type='text'>
* Add struct member offset qualifier for SPIRV

* Implement for GLSL target and add tests

* clean up

* fix formatting

* fix typo

* renamed GLSLStructOffset to VkStructOffset and added emit-spirv-via-glsl test case</content>
</entry>
<entry>
<title>Add WaveGetLane* support for Metal and WGSL (#6371)</title>
<updated>2025-02-28T18:11:26+00:00</updated>
<author>
<name>Darren Wihandi</name>
<email>65404740+fairywreath@users.noreply.github.com</email>
</author>
<published>2025-02-28T18:11:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=66984eb856454d0a372e3b30643823af18612067'/>
<id>urn:sha1:66984eb856454d0a372e3b30643823af18612067</id>
<content type='text'>
* support WaveGetLane* for WGSL and Metal

* update test and glsl support

* address review comments and fix metal test

* add missing pragma guard

* update test

* Revert "update test"

This reverts commit f2b97e91c29de154190710580c343bd0764aedbb.

* update failing glsl metal test and added new test

* make hlsl and glsl outputs similar

* update test

* disable tests for Metal and cleanup

* comment fix

* add expected failures

* correct expected failures list

* remove expected failure

* add tests to expected failure

---------

Co-authored-by: Yong He &lt;yonghe@outlook.com&gt;</content>
</entry>
<entry>
<title>Add support for WGSL subgroup operations (#6213)</title>
<updated>2025-02-02T20:27:11+00:00</updated>
<author>
<name>Darren Wihandi</name>
<email>65404740+fairywreath@users.noreply.github.com</email>
</author>
<published>2025-02-02T20:27:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=0a6828572aa4cc1f0f99993e77c321799eb88cca'/>
<id>urn:sha1:0a6828572aa4cc1f0f99993e77c321799eb88cca</id>
<content type='text'>
* initial work

* more work

* more work on glsl intrinsics

* add subgroup broadcast for glsl

* wip add wgsl extension tracking

* enable tests, enable extensions and added some todos

* format and warning fixes

* fix wgsl extension tracker

---------

Co-authored-by: Yong He &lt;yonghe@outlook.com&gt;</content>
</entry>
<entry>
<title>Add bgra8 format (#6163)</title>
<updated>2025-01-24T21:13:16+00:00</updated>
<author>
<name>Darren Wihandi</name>
<email>65404740+fairywreath@users.noreply.github.com</email>
</author>
<published>2025-01-24T21:13:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=0dd9076db2154d787f6e06b713721e877b746b83'/>
<id>urn:sha1:0dd9076db2154d787f6e06b713721e877b746b83</id>
<content type='text'>
* add brga8 format

* add tests

* minor fixes

* cleanup

* maybe fix broken quad control test

* add missing xslang flag on test

---------

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>
<entry>
<title>Implement bitcast for 64-bit date type (#5895)</title>
<updated>2024-12-18T01:06:30+00:00</updated>
<author>
<name>kaizhangNV</name>
<email>149626564+kaizhangNV@users.noreply.github.com</email>
</author>
<published>2024-12-18T01:06:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=6f57e47a9e1675b011f023277b47cfc768d30da8'/>
<id>urn:sha1:6f57e47a9e1675b011f023277b47cfc768d30da8</id>
<content type='text'>
Close #5470

* implement bitcast for 64-bit date type
* Move 'ensurePrelude' to base class to remove duplication
* Assert on 'double' type for Metal target, as Metal doesn't have 'double' support</content>
</entry>
<entry>
<title>Support specialization constant on WGSL and Metal. (#5780)</title>
<updated>2024-12-06T08:55:35+00:00</updated>
<author>
<name>Yong He</name>
<email>yonghe@outlook.com</email>
</author>
<published>2024-12-06T08:55:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=8ce7c6f6958f9f5ed750ef1a823b9e9ed8c042d8'/>
<id>urn:sha1:8ce7c6f6958f9f5ed750ef1a823b9e9ed8c042d8</id>
<content type='text'>
</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>Legalize the Entry-point for WGSL (#5498)</title>
<updated>2024-11-06T00:31:47+00:00</updated>
<author>
<name>Jay Kwak</name>
<email>82421531+jkwak-work@users.noreply.github.com</email>
</author>
<published>2024-11-06T00:31:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=79056cd7e0ba261a007e21a98a6f49cb0b032e25'/>
<id>urn:sha1:79056cd7e0ba261a007e21a98a6f49cb0b032e25</id>
<content type='text'>
* Legalize the Entry-point for WGSL

The return type of the entry-point needs to be legalized when targeting
WGSL.
This commit flattens the nested-structs of the return type and the input
parameters of the entry-point.

Most of code is copied from the legalization code for Metal. The
following functions are exactly same to the implementation for Metal or
almost same.
- flattenInputParameters() : 136 lines
- reportUnsupportedSystemAttribute() : 7 lines
- ensureResultStructHasUserSemantic() : 46 lines
- struct MapStructToFlatStruct : 176 lines
- flattenNestedStructs() : 95 lines
- maybeFlattenNestedStructs() : 42 lines
- _replaceAllReturnInst() : 19 lines
- _returnNonOverlappingAttributeIndex() : 16 lines
- _replaceAttributeOfLayout() : 23 lines
- tryConvertValue() : 41 lines
- legalizeSystemValueParameters() : 11 lines

They need to be refactored to reduce the duplication later.

The test case, `tests/compute/assoctype-lookup.slang`, had a bug that
the compute shader was trying to use the varying input/output with the
user defined semantics.

This commit removes the user defined semantics, because the compute
shaders cannot use the user defined semantics.

---------

Co-authored-by: slangbot &lt;186143334+slangbot@users.noreply.github.com&gt;</content>
</entry>
<entry>
<title>Fix issue of infinity float literal (#5489)</title>
<updated>2024-11-05T19:40:08+00:00</updated>
<author>
<name>kaizhangNV</name>
<email>149626564+kaizhangNV@users.noreply.github.com</email>
</author>
<published>2024-11-05T19:40:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=0336a3a8db7f50dcbb21b11a94fb1e4f31d946eb'/>
<id>urn:sha1:0336a3a8db7f50dcbb21b11a94fb1e4f31d946eb</id>
<content type='text'>
* Fix issue of infinity float literal

* add parameters for the test

* Correct the way to construct inf and nan

In WGSL, expression of "1.0/0.0" is not allowed, it will report compile error,
so to construct infinity or nan, we have to assign the float literal to a variable
and then use it to bypass the compile error.

By doing so, we add getInfinity and getNan functions to the builtin
prelude to wgsl.

---------

Co-authored-by: Yong He &lt;yonghe@outlook.com&gt;</content>
</entry>
</feed>
