summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2014-08-03 05:35:10 +0200
committerMarek Olšák <[email protected]>2014-08-11 21:53:57 +0200
commitf1f53666290fb1718fff439145f6e337c9efbb90 (patch)
tree072c44551db86d660df8c230a213ab78417a00f3
parent7207830047964aff16324cb5617ab40d12f32e3e (diff)
mesa: return version 0 if the computed core profile version is too low
Reviewed-by: Ilia Mirkin <[email protected]>
-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