summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2024-12-18 15:34:52 -0800
committerGitHub <noreply@github.com>2024-12-18 15:34:52 -0800
commitabeb3758f35a48c2012dd3c39d704409c679a652 (patch)
treec26e8e0c88ab0b1d60c78a4b764b8a891bb37cf2 /source
parent0f5a2ce2ecf79fba79a9d20c9e3bcd4c31ee45bb (diff)
Support explicit `[vk::location(n)]` binding on metal/wgsl. (#5907)
Diffstat (limited to 'source')
-rw-r--r--source/slang/slang-parameter-binding.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/slang/slang-parameter-binding.cpp b/source/slang/slang-parameter-binding.cpp
index 33fa24f11..825e0f4af 100644
--- a/source/slang/slang-parameter-binding.cpp
+++ b/source/slang/slang-parameter-binding.cpp
@@ -1909,7 +1909,8 @@ static RefPtr<TypeLayout> processEntryPointVaryingParameterDecl(
// `location`s in declaration order coincidentally matches
// the `SV_Target` order.
//
- if (isKhronosTarget(context->getTargetRequest()))
+ if (isKhronosTarget(context->getTargetRequest()) ||
+ isMetalTarget(context->getTargetRequest()) || isWGPUTarget(context->getTargetRequest()))
{
if (auto locationAttr = decl->findModifier<GLSLLocationAttribute>())
{