[Mesa-dev] [PATCH] [rfc] mesa: don't allow GLSL 1.30 without GL3.

Dave Airlie airlied at gmail.com
Tue Jan 10 03:52:57 PST 2012


From: Dave Airlie <airlied at redhat.com>

Things can get confused if you expose one without the other which can happen
if you are missing one or two of the extensions (like say float textures).

Signed-off-by: Dave Airlie <airlied at redhat.com>
---
 src/mesa/main/version.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/mesa/main/version.c b/src/mesa/main/version.c
index 49cdc30..57c8340 100644
--- a/src/mesa/main/version.c
+++ b/src/mesa/main/version.c
@@ -223,6 +223,9 @@ compute_version(struct gl_context *ctx)
    ctx->VersionMajor = major;
    ctx->VersionMinor = minor;
 
+   if (ctx->VersionMajor == 2 && ctx->Const.GLSLVersion >= 130)
+      ctx->Const.GLSLVersion = 120;
+
    override_version(ctx, &ctx->VersionMajor, &ctx->VersionMinor);
 
    ctx->VersionString = (char *) malloc(max);
-- 
1.7.7.3



More information about the mesa-dev mailing list