From 0b4e463aee4107b383067424007c6a995f1f9f87 Mon Sep 17 00:00:00 2001 From: Ellie Hermaszewska Date: Tue, 11 Feb 2025 19:07:57 +0800 Subject: 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 --- source/slang/slang-emit-hlsl.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'source/slang/slang-emit-hlsl.cpp') 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()) + { + m_writer->emit("[raypayload] "); + } + } } void HLSLSourceEmitter::_emitPrefixTypeAttr(IRAttr* attr) -- cgit v1.2.3