diff options
author | Christian Gmeiner <[email protected]> | 2018-05-16 16:02:54 +0200 |
---|---|---|
committer | Christian Gmeiner <[email protected]> | 2018-05-18 10:46:24 +0200 |
commit | 2eb3f794d90a2a1df7cd933ddeda5a61e671b6f4 (patch) | |
tree | 43618c97fdc20b7d3f7bbb0e5b8e977813cb1ec0 /src | |
parent | 48e28ab961f54466c033b087931ee17d502821db (diff) |
st/mesa: only define GLSL 1.4 for compat if driver supports it
Currently GLSL 1.4 is defined for all gallium drivers even only
GLSL 1.2 is supported as seen on etnaviv.
v1 -> v2:
- use _min(..) as suggested by Lucas Stach and Michel Dänzer
Fixes: 4560aad780b ("mesa: add GLSLVersionCompat constant")
Signed-off-by: Christian Gmeiner <[email protected]>
Reviewed-by: Lucas Stach <[email protected]>
Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/state_tracker/st_extensions.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c index 19ef736e5b0..2d56a880273 100644 --- a/src/mesa/state_tracker/st_extensions.c +++ b/src/mesa/state_tracker/st_extensions.c @@ -936,7 +936,7 @@ 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; + consts->GLSLVersionCompat = _min(consts->GLSLVersion, 140); _mesa_override_glsl_version(consts); |