summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/version.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main/version.c')
-rw-r--r--src/mesa/main/version.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/mesa/main/version.c b/src/mesa/main/version.c
index 270eca722f0..4dea530cd0f 100644
--- a/src/mesa/main/version.c
+++ b/src/mesa/main/version.c
@@ -204,7 +204,7 @@ static GLuint
compute_version(const struct gl_extensions *extensions,
const struct gl_constants *consts, gl_api api)
{
- GLuint major, minor;
+ GLuint major, minor, version;
const GLboolean ver_1_3 = (extensions->ARB_texture_border_clamp &&
extensions->ARB_texture_cube_map &&
@@ -331,7 +331,12 @@ compute_version(const struct gl_extensions *extensions,
minor = 2;
}
- return major * 10 + minor;
+ version = major * 10 + minor;
+
+ if (api == API_OPENGL_CORE && version < 31)
+ return 0;
+
+ return version;
}
static GLuint