summaryrefslogtreecommitdiff
path: root/source/slang/slang-emit-hlsl.cpp
diff options
context:
space:
mode:
authorEllie Hermaszewska <ellieh@nvidia.com>2025-02-11 19:07:57 +0800
committerGitHub <noreply@github.com>2025-02-11 19:07:57 +0800
commit0b4e463aee4107b383067424007c6a995f1f9f87 (patch)
treee78fc7287a07643b890c0d981bd5ef95520dcf93 /source/slang/slang-emit-hlsl.cpp
parent0bc18d233966fc80cf2c482922d0b773d58394ca (diff)
Add raypayload decoration to ray payload structs (#6164)
* Add raypayload decoration to ray payload structs Closes https://github.com/shader-slang/slang/issues/6104 * Disable PAQs when compiling with DXC See https://github.com/shader-slang/slang/issues/3448
Diffstat (limited to 'source/slang/slang-emit-hlsl.cpp')
-rw-r--r--source/slang/slang-emit-hlsl.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/source/slang/slang-emit-hlsl.cpp b/source/slang/slang-emit-hlsl.cpp
index ff4514d69..1cb9b769f 100644
--- a/source/slang/slang-emit-hlsl.cpp
+++ b/source/slang/slang-emit-hlsl.cpp
@@ -1669,6 +1669,15 @@ void HLSLSourceEmitter::emitPostKeywordTypeAttributesImpl(IRInst* inst)
{
m_writer->emit("[payload] ");
}
+ // This can be re-enabled when we add PAQs: https://github.com/shader-slang/slang/issues/3448
+ const bool enablePAQs = false;
+ if (enablePAQs)
+ {
+ if (const auto payloadDecoration = inst->findDecoration<IRRayPayloadDecoration>())
+ {
+ m_writer->emit("[raypayload] ");
+ }
+ }
}
void HLSLSourceEmitter::_emitPrefixTypeAttr(IRAttr* attr)