---
 src/gallium/include/pipe/p_defines.h   |    3 ++-
 src/mesa/state_tracker/st_extensions.c |    5 +++++
 2 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/src/gallium/include/pipe/p_defines.h 
b/src/gallium/include/pipe/p_defines.h
index 3e55d22..e51132a 100644
--- a/src/gallium/include/pipe/p_defines.h
+++ b/src/gallium/include/pipe/p_defines.h
@@ -475,7 +475,8 @@ enum pipe_cap {
    PIPE_CAP_MIN_TEXEL_OFFSET = 50,
    PIPE_CAP_MAX_TEXEL_OFFSET = 51,
    PIPE_CAP_CONDITIONAL_RENDER = 52,
-   PIPE_CAP_TEXTURE_BARRIER = 53
+   PIPE_CAP_TEXTURE_BARRIER = 53,
+   PIPE_CAP_SM4 = 54 /* Shader Model 4.0 (roughly equivalent to GLSL 1.3) */
 };
 
 /* Shader caps not specific to any single stage */
diff --git a/src/mesa/state_tracker/st_extensions.c 
b/src/mesa/state_tracker/st_extensions.c
index 544f0b6..96a1059 100644
--- a/src/mesa/state_tracker/st_extensions.c
+++ b/src/mesa/state_tracker/st_extensions.c
@@ -245,6 +245,11 @@ void st_init_extensions(struct st_context *st)
    int i;
 
    ctx->Const.GLSLVersion = 120;
+
+   if (screen->get_param(screen, PIPE_CAP_SM4)) {
+      ctx->Const.GLSLVersion = 130;
+   }
+
    _mesa_override_glsl_version(st->ctx);
 
    /*
-- 
1.7.5.4

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to