diff options
| author | Yong He <yonghe@outlook.com> | 2024-12-18 15:34:52 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-18 15:34:52 -0800 |
| commit | abeb3758f35a48c2012dd3c39d704409c679a652 (patch) | |
| tree | c26e8e0c88ab0b1d60c78a4b764b8a891bb37cf2 /source/slang/slang-parameter-binding.cpp | |
| parent | 0f5a2ce2ecf79fba79a9d20c9e3bcd4c31ee45bb (diff) | |
Support explicit `[vk::location(n)]` binding on metal/wgsl. (#5907)
Diffstat (limited to 'source/slang/slang-parameter-binding.cpp')
| -rw-r--r-- | source/slang/slang-parameter-binding.cpp | 3 |
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>()) { |
