summaryrefslogtreecommitdiff
path: root/source/slang/slang-ast-modifier.h
diff options
context:
space:
mode:
authorAlexey Panteleev <alpanteleev@nvidia.com>2022-04-13 14:24:58 -0700
committerGitHub <noreply@github.com>2022-04-13 14:24:58 -0700
commit5ffd3048df2d7faf30ca8192c117d73e908212cd (patch)
tree98f4cc81a394c4274b511f4edee6a4ae90ea4680 /source/slang/slang-ast-modifier.h
parentc949d5005ede13840d086214d6fe64f2b0fefed5 (diff)
Callable shader fix and explicit payload locations for GLSL (#2185)
* Fixed the callable shader payload type for GLSL. * Added location parameters to the __vulkanRayPayload and __vulkanCallablePayload attributes. The default value is -1 which means use the old auto-assignment logic. * Fixed the vkray/callable-caller test.
Diffstat (limited to 'source/slang/slang-ast-modifier.h')
-rw-r--r--source/slang/slang-ast-modifier.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/source/slang/slang-ast-modifier.h b/source/slang/slang-ast-modifier.h
index 9a450cc31..6a142454d 100644
--- a/source/slang/slang-ast-modifier.h
+++ b/source/slang/slang-ast-modifier.h
@@ -761,23 +761,27 @@ class EntryPointAttribute : public Attribute
Stage stage;
};
-// A `[__vulkanRayPayload]` attribute, which is used in the
+// A `[__vulkanRayPayload(location)]` attribute, which is used in the
// standard library implementation to indicate that a variable
// actually represents the input/output interface for a Vulkan
// ray tracing shader to pass per-ray payload information.
class VulkanRayPayloadAttribute : public Attribute
{
SLANG_AST_CLASS(VulkanRayPayloadAttribute)
+
+ int location;
};
-// A `[__vulkanCallablePayload]` attribute, which is used in the
+// A `[__vulkanCallablePayload(location)]` attribute, which is used in the
// standard library implementation to indicate that a variable
// actually represents the input/output interface for a Vulkan
// ray tracing shader to pass payload information to/from a callee.
class VulkanCallablePayloadAttribute : public Attribute
{
SLANG_AST_CLASS(VulkanCallablePayloadAttribute)
+
+ int location;
};