summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/context.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2010-09-21 18:13:02 -0600
committerBrian Paul <[email protected]>2010-09-21 18:13:04 -0600
commite7087175f8a04f777403366fb34b58edd00f4d60 (patch)
treea6720bb374844ccd8c7eb790f33e0ebda6cdc324 /src/mesa/main/context.c
parent3642ca2f66efa8e078062f566b8f9975928d9f44 (diff)
mesa: don't advertise bogus GL_ARB_shading_language_120 extension
Instead of using the invalid GL_ARB_shading_language_120 extension to determine the GLSL version, use a new ctx->Const.GLSLVersion field. Updated the intel and r600 drivers, but untested. See fd.o bug 29910 NOTE: This is a candidate for the 7.9 branch (but let's wait and see if there's any regressions).
Diffstat (limited to 'src/mesa/main/context.c')
-rw-r--r--src/mesa/main/context.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index b1f800f4c21..3bddf2570ec 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -597,6 +597,21 @@ _mesa_init_constants(GLcontext *ctx)
ctx->Const.MaxVarying = MAX_VARYING;
#endif
+ /* Shading language version */
+ if (ctx->API == API_OPENGL) {
+#if FEATURE_ARB_shading_language_120
+ ctx->Const.GLSLVersion = 120;
+#else
+ ctx->Const.GLSLVersion = 110;
+#endif
+ }
+ else if (ctx->API == API_OPENGLES2) {
+ ctx->Const.GLSLVersion = 100;
+ }
+ else if (ctx->API == API_OPENGLES) {
+ ctx->Const.GLSLVersion = 0; /* GLSL not supported */
+ }
+
/* GL_ARB_framebuffer_object */
ctx->Const.MaxSamples = 0;