Correct textureGather*() extension support:

- add extension behavior and warning message for partial extension support
 - add partial support for gpu_shader5 for textureGather*
 - add interactions between texture rectangle and textureGather*
 - add checks to distinguish between gpu_shader5 and texture_gather extension feature differences


git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24183 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
John Kessenich
2013-11-23 21:10:51 +00:00
parent 5b9f98854c
commit d6bef9186b
11 changed files with 347 additions and 140 deletions

View File

@@ -14,7 +14,9 @@ void main()
outp.x = gl_ClipDistance[1];
ivec2 offsets[4];
uvec4 uv4 = textureGatherOffsets(samp2dr, c2D, offsets, 2);
const ivec2 constOffsets[4] = ivec2[4](ivec2(1,2), ivec2(3,4), ivec2(15,16), ivec2(-2,0));
uvec4 uv4 = textureGatherOffsets(samp2dr, c2D, offsets, 2); // ERROR, offsets not constant
uv4 = textureGatherOffsets(samp2dr, c2D, constOffsets, 2);
vec4 v4 = textureGather(arrayedSampler[0], c2D);
ivec4 iv4 = textureGatherOffset(isamp2DA, vec3(0.1), ivec2(1), 3);
iv4 = textureGatherOffset(isamp2DA, vec3(0.1), ivec2(1), i); // ERROR, last argument not const
@@ -46,8 +48,8 @@ void foo23()
{
const ivec2[3] offsets = ivec2[3](ivec2(1,2), ivec2(3,4), ivec2(15,16));
textureProjGradOffset(u2drs, outp, vec2(0.0), vec2(0.0), ivec2(c2D)); // ERROR, offset not constant
textureProjGradOffset(u2drs, outp, vec2(0.0), vec2(0.0), ivec2(c2D)); // ERROR, offset not constant
textureProjGradOffset(u2drs, outp, vec2(0.0), vec2(0.0), offsets[1]);
textureProjGradOffset(u2drs, outp, vec2(0.0), vec2(0.0), offsets[2]);
textureProjGradOffset(u2drs, outp, vec2(0.0), vec2(0.0), offsets[2]); // ERROR, offset out of range
textureProjGradOffset(u2drs, outp, vec2(0.0), vec2(0.0), ivec2(-10, 20)); // ERROR, offset out of range
}