TextureOffset not support sampler2DArrayShadow sampler until 430.

Signed-off-by: ZhiqianXia <xzq0528@outlook.com>
This commit is contained in:
ZhiqianXia 2021-04-15 21:38:35 +08:00
parent a7f846a86c
commit 41992e432c
4 changed files with 26 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;