diff options
author | Eric Anholt <[email protected]> | 2012-03-12 14:07:39 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2012-03-15 16:24:50 -0700 |
commit | c0795742a38e0aab59309c1ec71d980e493237e2 (patch) | |
tree | 021d3bc799b2d09a0dd9fbae86bb1a8527c80e2c /src/glsl/builtins/profiles/140.vert | |
parent | e06ab8c3632b748ffb59e1a82e7c966010a675e2 (diff) |
glsl: Add GLSL 1.40 textureSize() implementations for sampler2DRect.
By setting lod to 0 in the builtin function implementation, we avoid
needing to update all the visitors to ignore LOD in this case, when
the hardware drivers actually want to ask for LOD 0 for rectangular
textures.
Fixes piglit spec/GLSL-1.40/textureSize-*Rect.
v2: Change style of looking for substrings.
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/glsl/builtins/profiles/140.vert')
-rw-r--r-- | src/glsl/builtins/profiles/140.vert | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/glsl/builtins/profiles/140.vert b/src/glsl/builtins/profiles/140.vert index 0fad767bdbd..bfef4ed1a41 100644 --- a/src/glsl/builtins/profiles/140.vert +++ b/src/glsl/builtins/profiles/140.vert @@ -499,6 +499,11 @@ ivec3 textureSize(usampler2DArray sampler, int lod); ivec2 textureSize(sampler1DArrayShadow sampler, int lod); ivec3 textureSize(sampler2DArrayShadow sampler, int lod); +ivec2 textureSize(sampler2DRect sampler); +ivec2 textureSize(isampler2DRect sampler); +ivec2 textureSize(usampler2DRect sampler); +ivec2 textureSize(sampler2DRectShadow sampler); + /* texture */ vec4 texture( sampler1D sampler, float P); ivec4 texture(isampler1D sampler, float P); |