glsl/builtins: Fix textureGrad() for Array samplers.
authorKenneth Graunke <kenneth@whitecape.org>
Fri, 1 Jun 2012 09:56:50 +0000 (02:56 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Tue, 5 Jun 2012 21:41:33 +0000 (14:41 -0700)
commit25edfbfccfb8af9eecd949c3fc4f2680c5b963b6
tree687964475c5f630075b620ea455c00a16b66f591
parent2c4f6ceeb466cb15df34670aaacbcbdd4aba5fd6
glsl/builtins: Fix textureGrad() for Array samplers.

We were incorrectly assuming that the coordinate's dimensionality is
equal to the gradient's dimensionality.  For array types, the coordinate
has one more component.

Fixes 12 subcases of oglconform's glsl-bif-tex-grad test.

NOTE: This is a candidate for stable release branches.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
src/glsl/builtins/tools/texture_builtins.py