@@ -6210,11 +6210,13 @@ void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type)
|
||||
|
||||
#ifndef GLSLANG_WEB
|
||||
if (qualifier.hasXfbOffset() && qualifier.hasXfbBuffer()) {
|
||||
int repeated = intermediate.addXfbBufferOffset(type);
|
||||
if (repeated >= 0)
|
||||
error(loc, "overlapping offsets at", "xfb_offset", "offset %d in buffer %d", repeated, qualifier.layoutXfbBuffer);
|
||||
if (type.isUnsizedArray())
|
||||
if (type.isUnsizedArray()) {
|
||||
error(loc, "unsized array", "xfb_offset", "in buffer %d", qualifier.layoutXfbBuffer);
|
||||
} else {
|
||||
int repeated = intermediate.addXfbBufferOffset(type);
|
||||
if (repeated >= 0)
|
||||
error(loc, "overlapping offsets at", "xfb_offset", "offset %d in buffer %d", repeated, qualifier.layoutXfbBuffer);
|
||||
}
|
||||
|
||||
// "The offset must be a multiple of the size of the first component of the first
|
||||
// qualified variable or block member, or a compile-time error results. Further, if applied to an aggregate
|
||||
|
||||
@@ -1802,7 +1802,7 @@ unsigned int TIntermediate::computeTypeXfbSize(const TType& type, bool& contains
|
||||
return size;
|
||||
}
|
||||
|
||||
int numComponents;
|
||||
int numComponents {0};
|
||||
if (type.isScalar())
|
||||
numComponents = 1;
|
||||
else if (type.isVector())
|
||||
|
||||
Reference in New Issue
Block a user