diff options
| author | Harsh Aggarwal (NVIDIA) <haaggarwal@nvidia.com> | 2025-04-07 13:26:11 +0530 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-07 07:56:11 +0000 |
| commit | ce87ab925d06a784eec194081e00a1b4c9b94d0c (patch) | |
| tree | 086e60c0205e00e0f0e1c31761434f5e9bf5fbcb /source/slang/slang-ast-modifier.h | |
| parent | 1b82501dd0c74347cda4a2c7fe5a84fd610bb485 (diff) | |
Support for Payload Access Qualifiers (#3448) (#6595)
* 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 >= 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 <186143334+slangbot@users.noreply.github.com>
Co-authored-by: Ellie Hermaszewska <ellieh@nvidia.com>
Diffstat (limited to 'source/slang/slang-ast-modifier.h')
| -rw-r--r-- | source/slang/slang-ast-modifier.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/source/slang/slang-ast-modifier.h b/source/slang/slang-ast-modifier.h index 5f9ccb5bb..86c1b556c 100644 --- a/source/slang/slang-ast-modifier.h +++ b/source/slang/slang-ast-modifier.h @@ -1698,6 +1698,16 @@ class PayloadAttribute : public Attribute SLANG_AST_CLASS(PayloadAttribute) }; +/// A `[raypayload]` attribute indicates that a `struct` type will be used as +/// a ray payload for `TraceRay()` calls, and thus also as input/output +/// for shaders in the ray tracing pipeline that might be invoked for +/// such a ray. +/// +class RayPayloadAttribute : public Attribute +{ + SLANG_AST_CLASS(RayPayloadAttribute) +}; + /// A `[deprecated("message")]` attribute indicates the target is /// deprecated. /// A compiler warning including the message will be raised if the |
