<feed xmlns='http://www.w3.org/2005/Atom'>
<title>slang.git/source/slang/slang-ir-validate.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-03T04:48:11+00:00</updated>
<entry>
<title>Rename some symbols related to pointers types (#8592)</title>
<updated>2025-10-03T04:48:11+00:00</updated>
<author>
<name>Theresa Foley</name>
<email>10618364+tangent-vector@users.noreply.github.com</email>
</author>
<published>2025-10-03T04:48:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=cc8f6a241edb47c43c5698ee33abed4fe57d4566'/>
<id>urn:sha1:cc8f6a241edb47c43c5698ee33abed4fe57d4566</id>
<content type='text'>
Note that while this change touched a large numer of files, there are no
changes to functionality being made here. The only things being done are
renaming various symbols and, in a few cases, updating or adding
comments for consistency with the new names.

The core of the naming changes are:

* Most things named to refer to `OutType` (e.g., `IROutType`,
`IRBuilder::getOutType()`, etc.) have been consistently renamed to refer
to `OutParamType`, to emphasize that the relevant AST/IR node types are
only intended for use to represent `out` parameters.

* The same change as described above for `OutType` is also made for
`RefType`, which becomes `RefParamType` in most cases. One mess that
this exposes is the way that the `ExplicitRef&lt;T&gt;` type in the core
module currently lowers to `IRRefParamType`. This change sticks to the
rule of not making functional changes, so that mess is left as-is for
now.

* Names referring to `InOutType` have been changed to instead refer to
`BorrowInOutType`. The intention with this naming change is to emphasize
that the Slang rules for `inout` are semantically those of a borrow (or
at least our interpretation of what a borrow means).

* Names referring to `ConstRefType` have been changed to instead refer
to `BorrowInType`. This change starts work on clarifying that the
existing `__constref` modifier was never intended to be a read-only
analogue of `__ref`, and instead is the input-only analogue of `inout`.

* The `ParameterDirection` enum type has been changed to
`ParamPassingMode`, to reflect the fact that the concept of "direction"
fails to capture what is actually being encoded, particularly once we
have modes beyond simple `in`/`out`/`inout`.

While this change does not alter behavior in any case (the user-exposed
Slang language is unchanged), it is intended to set up subsequence
changes that will work to make the handling of these types in the
compiler more nuanced and correct. Breaking this part of the change out
separately is primarily motivated by a desire to minimize the effort for
reviewers.

---------

Co-authored-by: slangbot &lt;186143334+slangbot@users.noreply.github.com&gt;</content>
</entry>
<entry>
<title>Relax the inst definition order rule (#8588)</title>
<updated>2025-10-02T22:24:46+00:00</updated>
<author>
<name>kaizhangNV</name>
<email>149626564+kaizhangNV@users.noreply.github.com</email>
</author>
<published>2025-10-02T22:24:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=0c778339d7e3c39f600af2cc049f13f661d3434b'/>
<id>urn:sha1:0c778339d7e3c39f600af2cc049f13f661d3434b</id>
<content type='text'>
Close #8572.

The root cause of the issue is that in `_replaceInstUsesWith` call,
if the use of the inst is a generic parameter, and the inst is the data
type of that generic parameter, we could end up of moving the data type
before the generic parameter. This will break the layout of generic
parameters, where all the generic parameters should be laid consecutively
at the beginning of the first block of the generic.

Therefore, we don't make that relocation for such case.</content>
</entry>
<entry>
<title>Diagnose on structured buffers containing resources (#8222)</title>
<updated>2025-09-03T20:05:26+00:00</updated>
<author>
<name>Ellie Hermaszewska</name>
<email>ellieh@nvidia.com</email>
</author>
<published>2025-09-03T20:05:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=a766d27447aa0fcf69334c0467d9b1124892e180'/>
<id>urn:sha1:a766d27447aa0fcf69334c0467d9b1124892e180</id>
<content type='text'>
closes https://github.com/shader-slang/slang/issues/3313</content>
</entry>
<entry>
<title>Lower int/uint/bool matrices to arrays for SPIRV (#7687)</title>
<updated>2025-07-18T16:38:00+00:00</updated>
<author>
<name>venkataram-nv</name>
<email>vedavamadath@nvidia.com</email>
</author>
<published>2025-07-18T16:38:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=48b6e2432ea28c06d04931fccd633e31eed6d995'/>
<id>urn:sha1:48b6e2432ea28c06d04931fccd633e31eed6d995</id>
<content type='text'>
* Add tests for expected behaviour

* Allow matrix types in logical or/and

* Legalize int/bool matrix types and construction with makeMatrix

* Legalize uint matrices and operations

* Limit testing to only SPIRV

* Better tests for int and bool

* Add test for uint

* Remove GLSL tests

* Remove old test for diagnosing int matrices

* Emit SPIRV directly in tests

* format code

* Address PR comments

* Improve testing

* Address PR comments

* format code

* Add tests for matrix intrinsic operations

* Move matrix lowering to dedicated legalization pass

* Fix compiler warning

* Remove signal again

* Reorder matrix and vector legalization

* Fix formatting

* Add shift and comparison tests

---------

Co-authored-by: slangbot &lt;186143334+slangbot@users.noreply.github.com&gt;</content>
</entry>
<entry>
<title>extend fiddle to allow custom lua splices in more places (#7559)</title>
<updated>2025-07-01T19:03:41+00:00</updated>
<author>
<name>Ellie Hermaszewska</name>
<email>ellieh@nvidia.com</email>
</author>
<published>2025-07-01T19:03:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=5120c1cd072548654c9ce79fa85426a5e48736c4'/>
<id>urn:sha1:5120c1cd072548654c9ce79fa85426a5e48736c4</id>
<content type='text'>
* Add fkYAML submodule

* Generate slang-ir-inst-defs.h from slang-ir-inst-defs.yaml

* generate ir-inst-defs.h

* neaten things

* neaten inst def parser

* add rapidyaml submodule

* remove fkyaml

* remove fkyaml submodule

* remove use of ir-inst-defs.h

* format and warnings

* fix wasm build

* tidy

* remove rapidyaml

* Extend fiddle to allow custom splices in more places

* Use lua to describe ir insts

* fix

* neaten

* neaten

* neaten

* spelling

* neaten

* comment comment out assert

* merge</content>
</entry>
<entry>
<title>Fix intermittent debug failures with Debug build (#7369)</title>
<updated>2025-06-12T05:33:16+00:00</updated>
<author>
<name>Jay Kwak</name>
<email>82421531+jkwak-work@users.noreply.github.com</email>
</author>
<published>2025-06-12T05:33:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=7dad68f869502e5c0ab32c12cbf8db866e020713'/>
<id>urn:sha1:7dad68f869502e5c0ab32c12cbf8db866e020713</id>
<content type='text'>
This PR replaces enable/disable style C function calls with C++ RAII style code.

In debug build, when an assertion failed in between enable and disable functions, an exception is thrown and the disable function is not called. RAII style code is safer for an exception</content>
</entry>
<entry>
<title>Error out on invalid vector sizes (#7076)</title>
<updated>2025-05-14T07:01:47+00:00</updated>
<author>
<name>Darren Wihandi</name>
<email>65404740+fairywreath@users.noreply.github.com</email>
</author>
<published>2025-05-14T07:01:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=eb5648b41d0718648477cbcf941fb3c6edf6dfc7'/>
<id>urn:sha1:eb5648b41d0718648477cbcf941fb3c6edf6dfc7</id>
<content type='text'>
* Error out on invalid vector sizes

* Remove unnecessary include

* Fix incorrect assert

* Add test</content>
</entry>
<entry>
<title>Add debug information for slang inling (#6621)</title>
<updated>2025-05-10T20:59:37+00:00</updated>
<author>
<name>Mukund Keshava</name>
<email>mkeshava@nvidia.com</email>
</author>
<published>2025-05-10T20:59:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=083eecee3f56b90c7011895f53aaafa9db15856e'/>
<id>urn:sha1:083eecee3f56b90c7011895f53aaafa9db15856e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add validation for destination of atomic operations (#6093)</title>
<updated>2025-01-22T17:10:35+00:00</updated>
<author>
<name>Anders Leino</name>
<email>aleino@nvidia.com</email>
</author>
<published>2025-01-22T17:10:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=04353fb7602b7eb6a8b86193510ebe0c670b7724'/>
<id>urn:sha1:04353fb7602b7eb6a8b86193510ebe0c670b7724</id>
<content type='text'>
* Reimplement the GLSL atomic* functions in terms of __intrinsic_op

Many of these functions map directly to atomic IR instructions.
The functions taking atomic_uint are left as they are.

This helps to address #5989, since the destination pointer type validation can then be
written only for the atomic IR instructions.

* Add validation for atomic operations

Diagnose an error if the destination of the atomic operation is not appropriate, where
appropriate means it's either:
- 'groupshared'
- from a device buffer

This closes #5989.

* Add tests for GLSL atomics destination validation

Attempting to use the GLSL atomic functions on destinations that are neither groupshared
nor from a device buffer should fail with the following error:

error 41403: cannot perform atomic operation because destination is neither groupshared
             nor from a device buffer.

* Validate atomic operations after address space specialization

Address space specialization for SPIR-V is not done as part of `linkAndOptimizeIR`, as it
is for e.g. Metal, so opt out and add a separate call for SPIR-V.

* Allow unchecked in/inout parameters for non-SPIRV targets

* Clean up callees left without uses during address space specialziation

* 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>Move switch statement bodies to their own lines (#5493)</title>
<updated>2024-11-05T17:47:26+00:00</updated>
<author>
<name>Ellie Hermaszewska</name>
<email>ellieh@nvidia.com</email>
</author>
<published>2024-11-05T17:47:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=b118451e301d734e3e783b3acdf871f3f6ea851c'/>
<id>urn:sha1:b118451e301d734e3e783b3acdf871f3f6ea851c</id>
<content type='text'>
* Move switch statement bodies to their own lines

* format

---------

Co-authored-by: Yong He &lt;yonghe@outlook.com&gt;</content>
</entry>
</feed>
