[Mesa-dev] [PATCH] st/mesa: avoid exposing EXT_texture_integer for pre-GLSL 1.30

Marek Olšák maraeo at gmail.com
Sun Nov 30 05:00:47 PST 2014


Reviewed-by: Marek Olšák <marek.olsak at amd.com>

Marek

On Sun, Nov 30, 2014 at 4:15 AM, Ilia Mirkin <imirkin at alum.mit.edu> wrote:
> For drivers building up to GL(ES)3, only expose the actual extension if
> the API will let it be used (e.g. via overrides/debug flags that enable
> higher versions).
>
> Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
> ---
>
> Technically this can also be used with EXT_gpu_shader4 and NV_gpu_shader4,
> neither of which mesa supports or has any plans to. [Hm, curious how this will
> play along with MESA_glsl130 or whatever.]
>
>  src/mesa/state_tracker/st_extensions.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c
> index bdfab8b..20a6845 100644
> --- a/src/mesa/state_tracker/st_extensions.c
> +++ b/src/mesa/state_tracker/st_extensions.c
> @@ -696,6 +696,9 @@ void st_init_extensions(struct pipe_screen *screen,
>
>           extensions->EXT_shader_integer_mix = GL_TRUE;
>        }
> +
> +      /* Integer textures make no sense before GLSL 1.30 */
> +      extensions->EXT_texture_integer = GL_FALSE;
>     }
>
>     consts->UniformBooleanTrue = consts->NativeIntegers ? ~0 : fui(1.0f);
> --
> 2.0.4
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list