Mesa (master): mesa: return version 0 if the computed core profile version is too low
Marek Olšák
mareko at kemper.freedesktop.org
Mon Aug 11 19:59:27 UTC 2014
Module: Mesa
Branch: master
Commit: f1f53666290fb1718fff439145f6e337c9efbb90
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=f1f53666290fb1718fff439145f6e337c9efbb90
Author: Marek Olšák <marek.olsak at amd.com>
Date: Sun Aug 3 05:35:10 2014 +0200
mesa: return version 0 if the computed core profile version is too low
Reviewed-by: Ilia Mirkin <imirkin at alum.mit.edu>
---
src/mesa/main/version.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/mesa/main/version.c b/src/mesa/main/version.c
index 270eca7..4dea530 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
More information about the mesa-commit
mailing list