<feed xmlns='http://www.w3.org/2005/Atom'>
<title>slang.git/tests/language-feature/constants, 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-07-02T04:22:42+00:00</updated>
<entry>
<title>Fix for emitting ArrayStride decoration for arrays of opaque types (#7568)</title>
<updated>2025-07-02T04:22:42+00:00</updated>
<author>
<name>Jerran Schmidt</name>
<email>jerrans@nvidia.com</email>
</author>
<published>2025-07-02T04:22:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=7ffb9f53e41c409a51c41318442067cc6c7e4f48'/>
<id>urn:sha1:7ffb9f53e41c409a51c41318442067cc6c7e4f48</id>
<content type='text'>
* WIP opaque type decoration fix

* Clearer intent

* Formatting

* Added test for fix</content>
</entry>
<entry>
<title>Enforce rule that `export`/`extern` (non cpp) must be `const` (#7113)</title>
<updated>2025-05-16T17:44:44+00:00</updated>
<author>
<name>ArielG-NV</name>
<email>159081215+ArielG-NV@users.noreply.github.com</email>
</author>
<published>2025-05-16T17:44:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=0651ffb6489282f0f902ec5f630821a7b9d848bb'/>
<id>urn:sha1:0651ffb6489282f0f902ec5f630821a7b9d848bb</id>
<content type='text'>
* Enforce rule that `export`/`extern` (non cpp) must be `const`

fixes: #5570

Problem:
1. we allow non-const-link-time-var to be linked to a const-link-time-var.
2. problem is that: module use site has const var, so, we emit OpStore %Ptr %Const in IR, this is expected, this is good. We fail because we in reality have a OpStore %Ptr %Var (fails since we need a OpLoad in-between) in IR since the module with our link-time-variable-value is a regular variable.
3. We loose the float_litteral talked about inside the github issue since, we technically don't use our variable "VAL" (we never OpLoad from it), so spirv-opt removes the float_litteral, this is a byproduct of the actual issue.

Solution:
* `export`/`extern` variables must always be `const`. This excludes `__extern_cpp` since `cpp` does not exhibit this issue and works differently.

* format code

* changel logic and tests to only ensure `static const` with `export`/`extern`

* changing the rules: only reqirement is that if we have const we must have static

* remove a spirrious change made

* fix merge

---------

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>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>Fix crash during emitCast of attributed type, allow MaxIters to take linktime const. (#5791)</title>
<updated>2024-12-09T12:47:53+00:00</updated>
<author>
<name>Yong He</name>
<email>yonghe@outlook.com</email>
</author>
<published>2024-12-09T12:47:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=051ae8acec0a641bcaf86e7eeff35eff29e8922d'/>
<id>urn:sha1:051ae8acec0a641bcaf86e7eeff35eff29e8922d</id>
<content type='text'>
* Fix crash during emitCast of attributed type.

* Allow [MaxIters] to take link time constants.

---------

Co-authored-by: Ellie Hermaszewska &lt;ellieh@nvidia.com&gt;</content>
</entry>
<entry>
<title>Refresh of disabled WGPU tests (#5614)</title>
<updated>2024-11-21T07:37:28+00:00</updated>
<author>
<name>Anders Leino</name>
<email>aleino@nvidia.com</email>
</author>
<published>2024-11-21T07:37:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=93f5d13fc90c518ef2829dc16c28f0403e230337'/>
<id>urn:sha1:93f5d13fc90c518ef2829dc16c28f0403e230337</id>
<content type='text'>
Some tests are now passing and are enabled.
Other tests are still failing, but are given comments categorizing the failures.

Tests in the 'Not supported in WGSL' category are also removed from the expected failures
list. (Though they are still kept disabled for WebGPU, of course.)

This closes #5519.</content>
</entry>
<entry>
<title>Various WGSL fixes. (#5490)</title>
<updated>2024-11-05T01:37:50+00:00</updated>
<author>
<name>Yong He</name>
<email>yonghe@outlook.com</email>
</author>
<published>2024-11-05T01:37:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=7c2ff54758d26b73074fd14143ecd843ba685e0d'/>
<id>urn:sha1:7c2ff54758d26b73074fd14143ecd843ba685e0d</id>
<content type='text'>
* [WGSL] make sure switch has a default label.

* Various WGSL fixes.

* Update rhi submodule commit

* format code

* Remove unnecessary DISABLE_TEST directive on not applicable test.

* Matrix comp mul + `select`.

* Legalize binary ops for wgsl.

---------

Co-authored-by: slangbot &lt;186143334+slangbot@users.noreply.github.com&gt;</content>
</entry>
<entry>
<title>Enable WebGPU tests in CI (#5239)</title>
<updated>2024-10-15T16:11:53+00:00</updated>
<author>
<name>Anders Leino</name>
<email>aleino@nvidia.com</email>
</author>
<published>2024-10-15T16:11:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=9e3b0367cfd63f21a0519b61b6fd13e94dac1c51'/>
<id>urn:sha1:9e3b0367cfd63f21a0519b61b6fd13e94dac1c51</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Support constant folding for static array access. (#5248)</title>
<updated>2024-10-10T00:15:20+00:00</updated>
<author>
<name>Yong He</name>
<email>yonghe@outlook.com</email>
</author>
<published>2024-10-10T00:15:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=75481ea3b0654eeb727cabc718258984e7753e02'/>
<id>urn:sha1:75481ea3b0654eeb727cabc718258984e7753e02</id>
<content type='text'>
* Support constant folding for static array access.

* Fix test.</content>
</entry>
<entry>
<title>Fix IR lowering for generic interface types. (#4761)</title>
<updated>2024-07-31T17:03:39+00:00</updated>
<author>
<name>Yong He</name>
<email>yonghe@outlook.com</email>
</author>
<published>2024-07-31T17:03:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=134f8ccc930a8da28808c2e288344c21c67a577e'/>
<id>urn:sha1:134f8ccc930a8da28808c2e288344c21c67a577e</id>
<content type='text'>
* Fix IR lowering for generic interface types.

* Fix.

* Fix.</content>
</entry>
<entry>
<title>enable more metal tests (#4326)</title>
<updated>2024-06-10T20:28:36+00:00</updated>
<author>
<name>skallweitNV</name>
<email>64953474+skallweitNV@users.noreply.github.com</email>
</author>
<published>2024-06-10T20:28:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=712ce653d4c3d7284dd71389f31540d0da7f144e'/>
<id>urn:sha1:712ce653d4c3d7284dd71389f31540d0da7f144e</id>
<content type='text'>
</content>
</entry>
</feed>
