Merge pull request #2609 from ZhiqianXia/Feature2

TextureOffset not support sampler2DArrayShadow sampler until 430.
This commit is contained in:
Greg Fischer 2021-04-19 12:03:05 -06:00 committed by GitHub
commit 60ce877de0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 86 additions and 0 deletions

View file

@ -2191,6 +2191,16 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan
"[gl_MinProgramTexelOffset, gl_MaxProgramTexelOffset]");
}
}
if (callNode.getOp() == EOpTextureOffset) {
TSampler s = arg0->getType().getSampler();
if (s.is2D() && s.isArrayed() && s.isShadow()) {
if (isEsProfile())
error(loc, "TextureOffset does not support sampler2DArrayShadow : ", "sampler", "ES Profile");
else if (version <= 420)
error(loc, "TextureOffset does not support sampler2DArrayShadow : ", "sampler", "version <= 420");
}
}
}
break;