diff options
| author | Yong He <yonghe@outlook.com> | 2024-04-24 16:23:35 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-24 16:23:35 -0700 |
| commit | d3ed08ec3073c3cb9ac24fa3670784dd6e97a164 (patch) | |
| tree | 8589874c7dd2c1698a5dcbe22d7a2bd74fa29abf /source/slang/slang-parameter-binding.cpp | |
| parent | fc4c242442510fb97c3cfbf04d7582ebbc3bb0ed (diff) | |
Parameter layout and reflection for Metal bindings. (#4022)
Diffstat (limited to 'source/slang/slang-parameter-binding.cpp')
| -rw-r--r-- | source/slang/slang-parameter-binding.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/slang/slang-parameter-binding.cpp b/source/slang/slang-parameter-binding.cpp index f702efb94..56c85e9cb 100644 --- a/source/slang/slang-parameter-binding.cpp +++ b/source/slang/slang-parameter-binding.cpp @@ -973,7 +973,7 @@ static void addExplicitParameterBindings_HLSL( RefPtr<VarLayout> varLayout) { // We only want to apply D3D `register` modifiers when compiling for - // D3D targets. + // D3D and Metal targets. // // TODO: Nominally, the `register` keyword allows for a shader // profile to be specified, so that a given binding only @@ -989,7 +989,7 @@ static void addExplicitParameterBindings_HLSL( // // For now we do the filtering on target in a very direct fashion: // - if(!isD3DTarget(context->getTargetRequest())) + if(!isD3DTarget(context->getTargetRequest()) && !isMetalTarget(context->getTargetRequest())) return; auto typeLayout = varLayout->typeLayout; |
