[Mesa-dev] [PATCH 3/6] st/mesa: add option to enable GLSL 1.40

Dave Airlie airlied at gmail.com
Wed Dec 5 22:24:31 PST 2012


From: Dave Airlie <airlied at redhat.com>

Allow GLSL 1.40 to be enabled if the driver advertises it.

Signed-off-by: Dave Airlie <airlied at redhat.com>
---
 src/mesa/state_tracker/st_extensions.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c
index 0c61795..ccb1f36 100644
--- a/src/mesa/state_tracker/st_extensions.c
+++ b/src/mesa/state_tracker/st_extensions.c
@@ -553,7 +553,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 >= 130) {
+   if (glsl_feature_level >= 140) {
+      ctx->Const.GLSLVersion = 140;
+   } else if (glsl_feature_level >= 130) {
       ctx->Const.GLSLVersion = 130;
    } else {
       ctx->Const.GLSLVersion = 120;
-- 
1.8.0.1



More information about the mesa-dev mailing list