Commit ac516024 by John Kessenich

Fix #1065: don't validate Vulkan binding numbers.

To handle sparse assignments, don't check maxCombinedTextureImageUnits.
parent 715c353a
...@@ -58,3 +58,6 @@ out ban1 { // ERROR, only outer dimension ...@@ -58,3 +58,6 @@ out ban1 { // ERROR, only outer dimension
out ban2 { out ban2 {
float f; float f;
} bai2[arraySize][2]; } bai2[arraySize][2];
layout(binding = 3000) uniform sampler2D s3000;
layout(binding = 3001) uniform b3001 { int a; };
...@@ -4614,7 +4614,7 @@ void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type) ...@@ -4614,7 +4614,7 @@ void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type)
} else } else
lastBinding += type.getCumulativeArraySize(); lastBinding += type.getCumulativeArraySize();
} }
if (lastBinding >= resources.maxCombinedTextureImageUnits) if (spvVersion.vulkan == 0 && lastBinding >= resources.maxCombinedTextureImageUnits)
error(loc, "sampler binding not less than gl_MaxCombinedTextureImageUnits", "binding", type.isArray() ? "(using array)" : ""); error(loc, "sampler binding not less than gl_MaxCombinedTextureImageUnits", "binding", type.isArray() ? "(using array)" : "");
} }
if (type.getBasicType() == EbtAtomicUint) { if (type.getBasicType() == EbtAtomicUint) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment