mirror of
https://github.com/KhronosGroup/glslang
synced 2024-11-09 12:00:05 +00:00
TextureOffset not support sampler2DArrayShadow sampler until 430.
Signed-off-by: ZhiqianXia <xzq0528@outlook.com>
This commit is contained in:
parent
a7f846a86c
commit
41992e432c
@ -0,0 +1,4 @@
|
||||
textureoffset_sampler2darrayshadow.vert
|
||||
ERROR: 0:9: 'sampler' : TextureOffset not support the sampler2DArrayShadow : version <= 420
|
||||
ERROR: 0:9: '' : compilation terminated
|
||||
ERROR: 2 compilation errors. No code generated
|
11
Test/textureoffset_sampler2darrayshadow.vert
Normal file
11
Test/textureoffset_sampler2darrayshadow.vert
Normal file
@ -0,0 +1,11 @@
|
||||
#version 300 es
|
||||
precision mediump float;
|
||||
in highp vec4 dEQP_Position;
|
||||
|
||||
uniform mediump sampler2DArrayShadow s;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = vec4(textureOffset(s, vec4(0), ivec2(0)));
|
||||
gl_Position = dEQP_Position;
|
||||
}
|
@ -115,6 +115,7 @@ struct TSampler { // misnomer now; includes images, textures without sampler,
|
||||
#endif
|
||||
|
||||
bool is1D() const { return dim == Esd1D; }
|
||||
bool is2D() const { return dim == Esd2D; }
|
||||
bool isBuffer() const { return dim == EsdBuffer; }
|
||||
bool isRect() const { return dim == EsdRect; }
|
||||
bool isSubpass() const { return dim == EsdSubpass; }
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user