glsl/builtins: Fix {texture1D,texture2D,shadow1D}ArrayLod availibility.
authorPaul Berry <stereotype441@gmail.com>
Thu, 12 Sep 2013 16:11:37 +0000 (09:11 -0700)
committerPaul Berry <stereotype441@gmail.com>
Fri, 13 Sep 2013 21:59:06 +0000 (14:59 -0700)
commit71ffac691b8423d823a4637a0542ccb4005cc996
tree0b7e14ac608ca0f263c9c71365f33bbacb24102d
parent4b3c0a797f89830fd5ba0943b061abf4fc38337e
glsl/builtins: Fix {texture1D,texture2D,shadow1D}ArrayLod availibility.

These functions are defined in EXT_texture_array, which makes no
mention of what shader types they should be allowed in.  At the time
EXT_texture_array was introduced, functions ending in "Lod" were
available only in vertex shaders, however this restriction was lifted
in later spec versions and extensions.

We already have the function lod_exists_in_stage() for figuring out
whether functions ending in "Lod" should be available, so just re-use
that.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/glsl/builtin_functions.cpp