summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_extensions.c
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2013-10-22 09:06:37 +0100
committerDave Airlie <[email protected]>2013-11-25 13:03:02 +1000
commit72cae2a599881e926b8709f4dfa2cc3591ea7a02 (patch)
treec8160039c71a8e6bd971289ab1a50a931a5fe4fa /src/mesa/state_tracker/st_extensions.c
parent3c9f0096c75315ea73d44ec17bc90c4d4c0d8f77 (diff)
st/mesa: respect higher GLSL levels. (v2)
Limit the max glsl version level to what the state tracker supports. Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker/st_extensions.c')
-rw-r--r--src/mesa/state_tracker/st_extensions.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c
index e8d0902d96f..cd10a0c9dea 100644
--- a/src/mesa/state_tracker/st_extensions.c
+++ b/src/mesa/state_tracker/st_extensions.c
@@ -594,13 +594,9 @@ void st_init_extensions(struct st_context *st)
/* Figure out GLSL support. */
glsl_feature_level = screen->get_param(screen, PIPE_CAP_GLSL_FEATURE_LEVEL);
- if (glsl_feature_level >= 140) {
- ctx->Const.GLSLVersion = 140;
- } else if (glsl_feature_level >= 130) {
- ctx->Const.GLSLVersion = 130;
- } else {
- ctx->Const.GLSLVersion = 120;
- }
+ ctx->Const.GLSLVersion = glsl_feature_level;
+ if (glsl_feature_level >= 330)
+ ctx->Const.GLSLVersion = 330;
_mesa_override_glsl_version(st->ctx);