GLSL/Vulkan: Warn about arrays of arrays of resources that need bindings.
Initial way of addressing #1362.
This commit is contained in:
parent
b4cb70fcd9
commit
46e07313f9
@ -1,4 +1,6 @@
|
|||||||
spv.AofA.frag
|
spv.AofA.frag
|
||||||
|
WARNING: 0:6: '[][]' : Generating SPIR-V array-of-arrays, but Vulkan only supports single array level for this resource
|
||||||
|
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 80006
|
// Generated by (magic number): 80006
|
||||||
// Id's are bound by 104
|
// Id's are bound by 104
|
||||||
|
|||||||
@ -4791,6 +4791,14 @@ void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// some things can't have arrays of arrays
|
||||||
|
if (type.isArrayOfArrays()) {
|
||||||
|
if (spvVersion.vulkan > 0) {
|
||||||
|
if (type.isOpaque() || (type.getQualifier().isUniformOrBuffer() && type.getBasicType() == EbtBlock))
|
||||||
|
warn(loc, "Generating SPIR-V array-of-arrays, but Vulkan only supports single array level for this resource", "[][]", "");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// "The offset qualifier can only be used on block members of blocks..."
|
// "The offset qualifier can only be used on block members of blocks..."
|
||||||
if (qualifier.hasOffset()) {
|
if (qualifier.hasOffset()) {
|
||||||
if (type.getBasicType() == EbtBlock)
|
if (type.getBasicType() == EbtBlock)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user