summaryrefslogtreecommitdiffstats
path: root/source/slang/parameter-binding.cpp
diff options
context:
space:
mode:
authorTim Foley <tfoleyNV@users.noreply.github.com>2017-07-14 11:31:23 -0700
committerGitHub <noreply@github.com>2017-07-14 11:31:23 -0700
commitd9366db8993c566fbb0af780c13db438dbf74022 (patch)
tree7f8302ad4eb9558e1260ad8aed048f1292092489 /source/slang/parameter-binding.cpp
parent47e94a14a174ce501883c85b7c742c10b785b4f5 (diff)
parent2bf87743ffe73f041036ae62c8bf53f09215ca53 (diff)
Merge pull request #89 from tfoleyNV/glpervertex-location-fix
Don't use "auto locations" mode in glslang
Diffstat (limited to 'source/slang/parameter-binding.cpp')
-rw-r--r--source/slang/parameter-binding.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/source/slang/parameter-binding.cpp b/source/slang/parameter-binding.cpp
index 0683c7f8c..01727fb36 100644
--- a/source/slang/parameter-binding.cpp
+++ b/source/slang/parameter-binding.cpp
@@ -101,7 +101,7 @@ struct ParameterBindingInfo
enum
{
- kLayoutResourceKindCount = SLANG_PARAMETER_CATEGORY_MIXED,
+ kLayoutResourceKindCount = SLANG_PARAMETER_CATEGORY_COUNT,
};
// Information on a single parameter
@@ -290,6 +290,11 @@ getTypeLayoutForGlobalShaderParameter_GLSL(
// any more. As such we also inspect the type
// of the variable.
+ // We want to check for a constant-buffer type with a `push_constant` layout
+ // qualifier before we move on to anything else.
+ if (varDecl->HasModifier<GLSLPushConstantLayoutModifier>() && type->As<ConstantBufferType>())
+ return CreateTypeLayout(type, rules->getPushConstantBufferRules());
+
// TODO(tfoley): We have multiple variations of
// the `uniform` modifier right now, and that
// needs to get fixed...