index outside gl_SampleMask range, compiler need report error. (#3556)
This commit is contained in:
parent
593dbafd0d
commit
68df223056
4 changed files with 68 additions and 0 deletions
|
|
@ -598,6 +598,10 @@ TIntermTyped* TParseContext::handleBracketDereference(const TSourceLoc& loc, TIn
|
|||
indexValue >= resources.maxCullDistances) {
|
||||
error(loc, "gl_CullDistance", "[", "array index out of range '%d'", indexValue);
|
||||
}
|
||||
else if (base->getQualifier().builtIn == EbvSampleMask &&
|
||||
indexValue >= (resources.maxSamples + 31) / 32) {
|
||||
error(loc, "gl_SampleMask", "[", "array index out of range '%d'", indexValue);
|
||||
}
|
||||
// For 2D per-view builtin arrays, update the inner dimension size in parent type
|
||||
if (base->getQualifier().isPerView() && base->getQualifier().builtIn != EbvNone) {
|
||||
TIntermBinary* binaryNode = base->getAsBinaryNode();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue