From d3ed08ec3073c3cb9ac24fa3670784dd6e97a164 Mon Sep 17 00:00:00 2001 From: Yong He Date: Wed, 24 Apr 2024 16:23:35 -0700 Subject: Parameter layout and reflection for Metal bindings. (#4022) --- source/slang/slang-parameter-binding.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/slang/slang-parameter-binding.cpp') 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) { // 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; -- cgit v1.2.3