Commit b5b08462 by John Kessenich Committed by GitHub

Merge pull request #1124 from xorgy/check-inner-implicit-atomic-uint

GLSL: Check for implicit inner dimension in array of atomic_uint.
parents 60209951 437911af
implicitInnerAtomicUint.frag
ERROR: 0:2: '[]' : only outermost dimension of an array of arrays can be implicitly sized
ERROR: 0:2: 'atomic_uint' : array must be explicitly sized
ERROR: 2 compilation errors. No code generated.
Shader version: 460
ERROR: node is still EOpNull!
0:? Linker Objects
0:? 'c' (layout( binding=0 offset=0) uniform 1-element array of implicitly-sized array of atomic_uint)
Linked fragment stage:
ERROR: Linking fragment stage: Missing entry point: Each stage requires one entry point
Shader version: 460
ERROR: node is still EOpNull!
0:? Linker Objects
0:? 'c' (layout( binding=0 offset=0) uniform 1-element array of implicitly-sized array of atomic_uint)
#version 460
layout(binding = 0) uniform atomic_uint c[1][];
\ No newline at end of file
......@@ -4863,7 +4863,7 @@ void TParseContext::fixOffset(const TSourceLoc& loc, TSymbol& symbol)
// Check for overlap
int numOffsets = 4;
if (symbol.getType().isArray()) {
if (symbol.getType().isExplicitlySizedArray())
if (symbol.getType().isExplicitlySizedArray() && ! symbol.getType().getArraySizes()->isInnerImplicit())
numOffsets *= symbol.getType().getCumulativeArraySize();
else {
// "It is a compile-time error to declare an unsized array of atomic_uint."
......
......@@ -159,6 +159,7 @@ INSTANTIATE_TEST_CASE_P(
"460.vert",
"dce.frag",
"atomic_uint.frag",
"implicitInnerAtomicUint.frag",
"aggOps.frag",
"always-discard.frag",
"always-discard2.frag",
......
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