[Mesa-dev] [PATCH] st/mesa: respect higher GLSL levels. (v2)
Dave Airlie
airlied at gmail.com
Tue Oct 22 10:06:37 CEST 2013
From: Dave Airlie <airlied at redhat.com>
Limit the max glsl version level to what the state tracker supports.
Signed-off-by: Dave Airlie <airlied at redhat.com>
---
src/mesa/state_tracker/st_extensions.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c
index 97dd732..e9e6af6 100644
--- a/src/mesa/state_tracker/st_extensions.c
+++ b/src/mesa/state_tracker/st_extensions.c
@@ -591,13 +591,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);
--
1.8.3.1
More information about the mesa-dev
mailing list