glsl: Add GLSL 1.40 textureSize() implementations for sampler2DRect.
authorEric Anholt <eric@anholt.net>
Mon, 12 Mar 2012 21:07:39 +0000 (14:07 -0700)
committerEric Anholt <eric@anholt.net>
Thu, 15 Mar 2012 23:24:50 +0000 (16:24 -0700)
commitc0795742a38e0aab59309c1ec71d980e493237e2
tree021d3bc799b2d09a0dd9fbae86bb1a8527c80e2c
parente06ab8c3632b748ffb59e1a82e7c966010a675e2
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 <kenneth@whitecape.org>
src/glsl/builtins/profiles/140.frag
src/glsl/builtins/profiles/140.vert
src/glsl/builtins/tools/texture_builtins.py