Mesa (master): st/mesa: add option to enable GLSL 1.40

Dave Airlie airlied at kemper.freedesktop.org
Sat Dec 8 03:39:09 UTC 2012


Module: Mesa
Branch: master
Commit: 22439f24a2403aaf8428a80da23fc95fc16454fa
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=22439f24a2403aaf8428a80da23fc95fc16454fa

Author: Dave Airlie <airlied at redhat.com>
Date:   Thu Dec  6 16:13:15 2012 +1000

st/mesa: add option to enable GLSL 1.40

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 |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

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




More information about the mesa-commit mailing list