diff options
| author | Yong He <yonghe@outlook.com> | 2022-02-28 18:09:27 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-02-28 18:09:27 -0800 |
| commit | e6c9625e0f0d5d9703451fd2ebb8b206d210009c (patch) | |
| tree | ad2c46f5e9a5f7a6e67cacf5b7227d726f392088 /source/slang/slang-parameter-binding.cpp | |
| parent | c31577953d5041c82375c22d847c2eba06106c58 (diff) | |
Use GLSL scalar layout for constant buffers. (#2147)
Diffstat (limited to 'source/slang/slang-parameter-binding.cpp')
| -rw-r--r-- | source/slang/slang-parameter-binding.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/source/slang/slang-parameter-binding.cpp b/source/slang/slang-parameter-binding.cpp index abbc010f8..7fbc59dc7 100644 --- a/source/slang/slang-parameter-binding.cpp +++ b/source/slang/slang-parameter-binding.cpp @@ -678,7 +678,7 @@ RefPtr<TypeLayout> getTypeLayoutForGlobalShaderParameter( // An "ordinary" global variable is implicitly a uniform // shader parameter. return createTypeLayout( - layoutContext.with(rules->getConstantBufferRules()), + layoutContext.with(rules->getConstantBufferRules(context->getTargetRequest())), type); } @@ -2080,7 +2080,8 @@ static RefPtr<TypeLayout> computeEntryPointParameterTypeLayout( // constant buffer (e.g., the `$Params` constant buffer seen in fxc/dxc output). // return createTypeLayout( - context->layoutContext.with(context->getRulesFamily()->getConstantBufferRules()), + context->layoutContext.with( + context->getRulesFamily()->getConstantBufferRules(context->getTargetRequest())), paramType); } else @@ -2431,7 +2432,9 @@ static ParameterBindingAndKindInfo maybeAllocateConstantBufferBinding( UInt space = context->shared->defaultSpace; auto usedRangeSet = findUsedRangeSetForSpace(context, space); - auto layoutInfo = context->getRulesFamily()->getConstantBufferRules()->GetObjectLayout( + auto layoutInfo = context->getRulesFamily() + ->getConstantBufferRules(context->getTargetRequest()) + ->GetObjectLayout( ShaderParameterKind::ConstantBuffer); ParameterBindingAndKindInfo info; |
