GLSL: Disallow unsized arrays of atomic_uint.
This tracks Khronos-private specification bug 15945.
This commit is contained in:
@@ -2,8 +2,8 @@
|
|||||||
ERROR: 0:4: 'redeclaration' : all redeclarations must use the same depth layout on gl_FragDepth
|
ERROR: 0:4: 'redeclaration' : all redeclarations must use the same depth layout on gl_FragDepth
|
||||||
ERROR: 0:11: 'layout qualifier' : can only apply depth layout to gl_FragDepth
|
ERROR: 0:11: 'layout qualifier' : can only apply depth layout to gl_FragDepth
|
||||||
ERROR: 0:12: 'gl_FragDepth' : cannot redeclare after use
|
ERROR: 0:12: 'gl_FragDepth' : cannot redeclare after use
|
||||||
WARNING: 0:14: 'atomic_uint' : implicitly sized atomic_uint array treated as having one element for tracking the default offset
|
ERROR: 0:14: 'atomic_uint' : array must be explicitly sized
|
||||||
ERROR: 3 compilation errors. No code generated.
|
ERROR: 4 compilation errors. No code generated.
|
||||||
|
|
||||||
|
|
||||||
Shader version: 420
|
Shader version: 420
|
||||||
|
|||||||
@@ -4794,12 +4794,8 @@ void TParseContext::fixOffset(const TSourceLoc& loc, TSymbol& symbol)
|
|||||||
if (symbol.getType().isExplicitlySizedArray())
|
if (symbol.getType().isExplicitlySizedArray())
|
||||||
numOffsets *= symbol.getType().getCumulativeArraySize();
|
numOffsets *= symbol.getType().getCumulativeArraySize();
|
||||||
else {
|
else {
|
||||||
// TODO: functionality: implicitly-sized atomic_uint arrays.
|
// "It is a compile-time error to declare an unsized array of atomic_uint."
|
||||||
// We don't know the full size until later. This might
|
error(loc, "array must be explicitly sized", "atomic_uint", "");
|
||||||
// be a specification problem, will report to Khronos. For the
|
|
||||||
// cases that is not true, the rest of the checking would need
|
|
||||||
// to be done at link time instead of compile time.
|
|
||||||
warn(loc, "implicitly sized atomic_uint array treated as having one element for tracking the default offset", "atomic_uint", "");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
int repeated = intermediate.addUsedOffsets(qualifier.layoutBinding, offset, numOffsets);
|
int repeated = intermediate.addUsedOffsets(qualifier.layoutBinding, offset, numOffsets);
|
||||||
|
|||||||
Reference in New Issue
Block a user