[Mesa-dev] [PATCH] glsl/builtins: Fix {texture1D, texture2D, shadow1D}ArrayLod availibility.

Kenneth Graunke kenneth at whitecape.org
Thu Sep 12 12:13:24 PDT 2013


On 09/12/2013 11:29 AM, Paul Berry wrote:
> 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.
> ---
>  src/glsl/builtin_functions.cpp | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)

Yeah, I hadn't been thinking about geometry shaders when considering the
deprecated functions.  The lod_exists_in_stage() was also a late addition.

I like this.

Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>


More information about the mesa-dev mailing list