[Mesa-dev] [PATCH] st/mesa: only define GLSL 1.4 for compat if driver supports it
Michel Dänzer
michel at daenzer.net
Wed May 16 13:45:29 UTC 2018
On 2018-05-16 03:31 PM, Christian Gmeiner wrote:
> Currently GLSL 1.4 is defined for all gallium drivers even only
> GLSL 1.2 is supported as seen on etnaviv.
>
> Fixes 4560aad780b ("mesa: add GLSLVersionCompat constant")
>
> Signed-off-by: Christian Gmeiner <christian.gmeiner at gmail.com>
> ---
> src/mesa/state_tracker/st_extensions.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c
> index 19ef736e5b..945ca3a16c 100644
> --- a/src/mesa/state_tracker/st_extensions.c
> +++ b/src/mesa/state_tracker/st_extensions.c
> @@ -936,7 +936,11 @@ void st_init_extensions(struct pipe_screen *screen,
>
> /* Figure out GLSL support and set GLSLVersion to it. */
> consts->GLSLVersion = screen->get_param(screen, PIPE_CAP_GLSL_FEATURE_LEVEL);
> - consts->GLSLVersionCompat = 140;
> +
> + if (consts->GLSLVersion >= 140)
> + consts->GLSLVersionCompat = 140;
> + else
> + consts->GLSLVersionCompat = 120;
consts->GLSLVersionCompat = min(consts->GLSLVersion, 140);
?
--
Earthling Michel Dänzer | http://www.amd.com
Libre software enthusiast | Mesa and X developer
More information about the etnaviv
mailing list