summaryrefslogtreecommitdiff
path: root/source/slang/slang-lower-to-ir.cpp
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-lower-to-ir.cpp
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-lower-to-ir.cpp')
-rw-r--r--source/slang/slang-lower-to-ir.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/slang/slang-lower-to-ir.cpp b/source/slang/slang-lower-to-ir.cpp
index 6cdf20af4..842a1ce5f 100644
--- a/source/slang/slang-lower-to-ir.cpp
+++ b/source/slang/slang-lower-to-ir.cpp
@@ -1876,13 +1876,13 @@ void addVarDecorations(
{
builder->addInterpolationModeDecoration(inst, IRInterpolationMode::Centroid);
}
- else if(as<VulkanRayPayloadAttribute>(mod))
+ else if(auto rayPayloadAttr = as<VulkanRayPayloadAttribute>(mod))
{
- builder->addSimpleDecoration<IRVulkanRayPayloadDecoration>(inst);
+ builder->addVulkanRayPayloadDecoration(inst, rayPayloadAttr->location);
}
- else if(as<VulkanCallablePayloadAttribute>(mod))
+ else if(auto callablePayloadAttr = as<VulkanCallablePayloadAttribute>(mod))
{
- builder->addSimpleDecoration<IRVulkanCallablePayloadDecoration>(inst);
+ builder->addVulkanCallablePayloadDecoration(inst, callablePayloadAttr->location);
}
else if(as<VulkanHitAttributesAttribute>(mod))
{