GLSL: Increase supported sizes of XBF strides and offsets.

This commit is contained in:
John Kessenich 2018-11-15 15:07:28 -07:00
parent 579ccece45
commit f4ba9522ec
4 changed files with 30 additions and 26 deletions

View file

@ -4936,11 +4936,13 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi
} else if (id == "xfb_stride") {
// "The resulting stride (implicit or explicit), when divided by 4, must be less than or equal to the
// implementation-dependent constant gl_MaxTransformFeedbackInterleavedComponents."
if (value > 4 * resources.maxTransformFeedbackInterleavedComponents)
error(loc, "1/4 stride is too large:", id.c_str(), "gl_MaxTransformFeedbackInterleavedComponents is %d", resources.maxTransformFeedbackInterleavedComponents);
else if (value >= (int)TQualifier::layoutXfbStrideEnd)
if (value > 4 * resources.maxTransformFeedbackInterleavedComponents) {
error(loc, "1/4 stride is too large:", id.c_str(), "gl_MaxTransformFeedbackInterleavedComponents is %d",
resources.maxTransformFeedbackInterleavedComponents);
}
if (value >= (int)TQualifier::layoutXfbStrideEnd)
error(loc, "stride is too large:", id.c_str(), "internal max is %d", TQualifier::layoutXfbStrideEnd-1);
if (value < (int)TQualifier::layoutXfbStrideEnd)
else
publicType.qualifier.layoutXfbStride = value;
return;
}