<feed xmlns='http://www.w3.org/2005/Atom'>
<title>slang.git/source/slang/slang-emit-hlsl.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-18T01:37:45+00:00</updated>
<entry>
<title>Optionally disable entry point param cbuffer transform</title>
<updated>2025-10-18T01:37:45+00:00</updated>
<author>
<name>yum</name>
<email>yum.food.vr@gmail.com</email>
</author>
<published>2025-10-11T20:34:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=482914e1b42dd44f4696b48c834136631672cebe'/>
<id>urn:sha1:482914e1b42dd44f4696b48c834136631672cebe</id>
<content type='text'>
</content>
</entry>
<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>Remove redundant [payload] attribute (Fix #7528) (#7555)</title>
<updated>2025-06-30T23:03:42+00:00</updated>
<author>
<name>Harsh Aggarwal (NVIDIA)</name>
<email>haaggarwal@nvidia.com</email>
</author>
<published>2025-06-30T23:03:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=0f098b9d27a859add3d62d2e82b699341d5ce895'/>
<id>urn:sha1:0f098b9d27a859add3d62d2e82b699341d5ce895</id>
<content type='text'>
Removes the PayloadAttribute class and related infrastructure that was made redundant by PR #6595, which added ray payload access qualifiers (PAQs) per the DXR spec. The new [raypayload] attribute with access qualifiers provides the same functionality.

Changes:
- Remove PayloadAttribute class from slang-ast-modifier.h
- Remove [payload] attribute syntax from core.meta.slang
- Remove PayloadDecoration IR instruction and related processing
- Remove HLSL emission of [payload] attribute
- Remove IR lowering support for old PayloadAttribute

The new [raypayload] attribute with PAQ support remains unchanged.</content>
</entry>
<entry>
<title>Allow checking capabilities in specific stages (#7375)</title>
<updated>2025-06-10T16:44:08+00:00</updated>
<author>
<name>jarcherNV</name>
<email>jarcher@nvidia.com</email>
</author>
<published>2025-06-10T16:44:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=3fa382505271834514d47612efee8e51a06204c5'/>
<id>urn:sha1:3fa382505271834514d47612efee8e51a06204c5</id>
<content type='text'>
This allows checking capabilities in any stage, needed specifically for
the hlsl_2018 capability which is defined for sm_5_1 and above. Stage
specific capabilities such as cs_5_1 would not find this in any stage
other than compute, so we need to restrict the check to only desired
stages.</content>
</entry>
<entry>
<title>Support the new CoopVec builtins (#7108)</title>
<updated>2025-05-15T02:57:47+00:00</updated>
<author>
<name>Jay Kwak</name>
<email>82421531+jkwak-work@users.noreply.github.com</email>
</author>
<published>2025-05-15T02:57:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=b4d3d3017640581c21b52a12413d3f074ab1c5c1'/>
<id>urn:sha1:b4d3d3017640581c21b52a12413d3f074ab1c5c1</id>
<content type='text'>
**NOTE: This is a breaking change for users who were using POC variant of DXC.
In order to keep the compatibility, the users will have to use -capability hlsl_coopvec_poc to their command line.

This PR adds a new capability "hlsl_coopvec_poc".

When it is used, the HLSL for CoopVec will be emitted for the POC variant of DXC.
When it is not used, the HLSL for CoopVec will be emitted for the DXC that officially supports the cooperative vector.</content>
</entry>
<entry>
<title>Add a new capability hlsl_2018 that avoid using select/and/or (#7003)</title>
<updated>2025-05-06T00:27:00+00:00</updated>
<author>
<name>Jay Kwak</name>
<email>82421531+jkwak-work@users.noreply.github.com</email>
</author>
<published>2025-05-06T00:27:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=6907ea5c8f83712f40fbc7713de4f4bb656c6c35'/>
<id>urn:sha1:6907ea5c8f83712f40fbc7713de4f4bb656c6c35</id>
<content type='text'>
Co-authored-by: Yong He &lt;yonghe@outlook.com&gt;</content>
</entry>
<entry>
<title>Support for Payload Access Qualifiers (#3448) (#6595)</title>
<updated>2025-04-07T07:56:11+00:00</updated>
<author>
<name>Harsh Aggarwal (NVIDIA)</name>
<email>haaggarwal@nvidia.com</email>
</author>
<published>2025-04-07T07:56:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=ce87ab925d06a784eec194081e00a1b4c9b94d0c'/>
<id>urn:sha1:ce87ab925d06a784eec194081e00a1b4c9b94d0c</id>
<content type='text'>
* Add support for Ray Payload Access Qualifiers (PAQs) (#3448)

- Added [raypayload] attribute for struct declarations
- Implemented field validation requiring read/write access qualifiers
- Added diagnostic error for missing qualifiers
- Enabled PAQs in DXC compiler and HLSL emission
- Added new test demonstrating PAQ syntax
- Implemented proper handling of ray payload attributes in IR generation

* format code

* Cleanup: Remove unused vars

* Add check to enablePAQ only for profile &gt;= lib_6_7

* Review Fix - Add PAQ support for DX Raytracing

add enablePAQ flag to DownstreamCompileOpitons, improve PAQ handling
update raypayload-attribute-paq.slang to ensure hlsl and dxil is
validated

* Add diagnostic test for missing paq for lib_6_7

Compile using `-disable-payload-qualifiers` aka lib_6_6 profile
raypayload-attribute-no-struct.slang and
raypayload-attribute.slang

---------

Co-authored-by: slangbot &lt;186143334+slangbot@users.noreply.github.com&gt;
Co-authored-by: Ellie Hermaszewska &lt;ellieh@nvidia.com&gt;</content>
</entry>
<entry>
<title>Add mesh shader output topology checks (#6592)</title>
<updated>2025-03-13T10:28:03+00:00</updated>
<author>
<name>Darren Wihandi</name>
<email>65404740+fairywreath@users.noreply.github.com</email>
</author>
<published>2025-03-13T10:28:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=395302d2404e3429f3cdfa406e89fa76bc0d444b'/>
<id>urn:sha1:395302d2404e3429f3cdfa406e89fa76bc0d444b</id>
<content type='text'>
* initial wip

* more wip

* add test

* add unexpected for invalid target

* fixups and improve error message

* fixups and improve error message

* remove incorrect comment

---------

Co-authored-by: Ellie Hermaszewska &lt;ellieh@nvidia.com&gt;</content>
</entry>
<entry>
<title>Add Slang-specific intrinsics for integer pack/unpack (#6459)</title>
<updated>2025-02-28T21:23:29+00:00</updated>
<author>
<name>Darren Wihandi</name>
<email>65404740+fairywreath@users.noreply.github.com</email>
</author>
<published>2025-02-28T21:23:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=efbfa7832afff7e6285713086259abda2456ed55'/>
<id>urn:sha1:efbfa7832afff7e6285713086259abda2456ed55</id>
<content type='text'>
* update hlsl meta

* update test

* use slang syntax in meta file

* improve meta file

* fix pack clamp u8

* remove builtin packed types, use typealias instead

* fix wgsl pack clamp

* fix formatting

---------

Co-authored-by: Yong He &lt;yonghe@outlook.com&gt;</content>
</entry>
<entry>
<title>HLSL: Add 'f' suffix to float literals in code generation (#6381)</title>
<updated>2025-02-20T08:42:15+00:00</updated>
<author>
<name>Mukund Keshava</name>
<email>mkeshava@nvidia.com</email>
</author>
<published>2025-02-20T08:42:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=9580e311e0cefb0f8e11afc316783a67201654eb'/>
<id>urn:sha1:9580e311e0cefb0f8e11afc316783a67201654eb</id>
<content type='text'>
* HLSL: Add 'f' suffix to float literals in code generation

Fixes #6078

1) Previously, Slang would emit HLSL float literals without a suffix (e.g.,"1.5"),
which caused DXC to interpret them as 64-bit doubles by default unless
the -HV 202x flag was used. This could cause validation errors when these literals
were used with intrinsics that only accept 32-bit floats (like ddx, ddy).

This change modifies the HLSL emitter to explicitly add 'f' suffix to
32-bit float literals, ensuring they are correctly typed regardless of DXC's version or flags.
For example:
- "1.5" becomes "1.5f"
- "(0.0 / 0.0)" becomes "(0.0f / 0.0f)" for NaN
- "float4(1.0, 2.0, 3.0, 4.0)" becomes "float4(1.0f, 2.0f, 3.0f, 4.0f)"

2) Added a test case to verify the behavior with various float literal scenarios
including basic literals, intrinsic calls, and vector construction.

3) Remove some tests that were marked as known failures

* Add dxil test as suggested by jkwak-work</content>
</entry>
</feed>
