summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authorHarsh Aggarwal (NVIDIA) <haaggarwal@nvidia.com>2025-07-01 04:33:42 +0530
committerGitHub <noreply@github.com>2025-06-30 23:03:42 +0000
commit0f098b9d27a859add3d62d2e82b699341d5ce895 (patch)
tree66786d9a676331607403cb4c56bd49bfdc381ff4 /source
parent46d0d97222d34374f45720cbdac1f823e42a4f0d (diff)
Remove redundant [payload] attribute (Fix #7528) (#7555)
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.
Diffstat (limited to 'source')
-rw-r--r--source/slang/core.meta.slang2
-rw-r--r--source/slang/slang-ast-modifier.h10
-rw-r--r--source/slang/slang-emit-hlsl.cpp4
-rw-r--r--source/slang/slang-ir-inst-defs.h1
-rw-r--r--source/slang/slang-ir-insts.h4
-rw-r--r--source/slang/slang-lower-to-ir.cpp4
6 files changed, 0 insertions, 25 deletions
diff --git a/source/slang/core.meta.slang b/source/slang/core.meta.slang
index 2e56c1082..d33086320 100644
--- a/source/slang/core.meta.slang
+++ b/source/slang/core.meta.slang
@@ -4204,8 +4204,6 @@ attribute_syntax [__AlwaysFoldIntoUseSiteAttribute] : AlwaysFoldIntoUseSiteAttri
__attributeTarget(FunctionDeclBase)
attribute_syntax [noinline] : NoInlineAttribute;
-__attributeTarget(StructDecl)
-attribute_syntax [payload] : PayloadAttribute;
/// Mark a declaration as deprecated.
/// @param message The diagnostic message to show when the declaration is used.
diff --git a/source/slang/slang-ast-modifier.h b/source/slang/slang-ast-modifier.h
index 56f9d873a..890a485ec 100644
--- a/source/slang/slang-ast-modifier.h
+++ b/source/slang/slang-ast-modifier.h
@@ -1916,16 +1916,6 @@ class RequireFullQuadsAttribute : public Attribute
FIDDLE(...)
};
-/// A `[payload]` 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.
-///
-FIDDLE()
-class PayloadAttribute : public Attribute
-{
- FIDDLE(...)
-};
/// A `[raypayload]` attribute indicates that a `struct` type will be used as
/// a ray payload for `TraceRay()` calls, and thus also as input/output
diff --git a/source/slang/slang-emit-hlsl.cpp b/source/slang/slang-emit-hlsl.cpp
index b022a2db9..240b5c0cb 100644
--- a/source/slang/slang-emit-hlsl.cpp
+++ b/source/slang/slang-emit-hlsl.cpp
@@ -1692,10 +1692,6 @@ void HLSLSourceEmitter::_emitStageAccessSemantic(
void HLSLSourceEmitter::emitPostKeywordTypeAttributesImpl(IRInst* inst)
{
- if (const auto payloadDecoration = inst->findDecoration<IRPayloadDecoration>())
- {
- m_writer->emit("[payload] ");
- }
// Get the target profile to determine if PAQs are supported
bool enablePAQs = false;
diff --git a/source/slang/slang-ir-inst-defs.h b/source/slang/slang-ir-inst-defs.h
index 3711c3a31..e13a623bc 100644
--- a/source/slang/slang-ir-inst-defs.h
+++ b/source/slang/slang-ir-inst-defs.h
@@ -1019,7 +1019,6 @@ INST_RANGE(BindingQuery, GetRegisterIndex, GetRegisterSpace)
INST(GLSLLocationDecoration, glslLocation, 1, 0)
INST(GLSLOffsetDecoration, glslOffset, 1, 0)
INST(VkStructOffsetDecoration, vkStructOffset, 1, 0)
- INST(PayloadDecoration, payload, 0, 0)
INST(RayPayloadDecoration, raypayload, 0, 0)
/* Mesh Shader outputs */
diff --git a/source/slang/slang-ir-insts.h b/source/slang/slang-ir-insts.h
index 049772cb9..14480083d 100644
--- a/source/slang/slang-ir-insts.h
+++ b/source/slang/slang-ir-insts.h
@@ -1646,10 +1646,6 @@ struct IRStageWriteAccessDecoration : public IRStageAccessDecoration
IR_LEAF_ISA(StageWriteAccessDecoration)
};
-struct IRPayloadDecoration : public IRDecoration
-{
- IR_LEAF_ISA(PayloadDecoration)
-};
struct IRRayPayloadDecoration : public IRDecoration
{
diff --git a/source/slang/slang-lower-to-ir.cpp b/source/slang/slang-lower-to-ir.cpp
index 8e13a3dc5..42a71764c 100644
--- a/source/slang/slang-lower-to-ir.cpp
+++ b/source/slang/slang-lower-to-ir.cpp
@@ -9628,10 +9628,6 @@ struct DeclLoweringVisitor : DeclVisitor<DeclLoweringVisitor, LoweredValInfo>
addNameHint(context, irAggType, decl);
addLinkageDecoration(context, irAggType, decl);
- if (const auto payloadAttribute = decl->findModifier<PayloadAttribute>())
- {
- subBuilder->addDecoration(irAggType, kIROp_PayloadDecoration);
- }
if (const auto rayPayloadAttribute = decl->findModifier<RayPayloadAttribute>())
{