[Mesa-dev] [PATCH 10/12] mesa: return version 0 if the computed core profile version is too low
Marek Olšák
maraeo at gmail.com
Sun Aug 3 08:18:33 PDT 2014
From: Marek Olšák <marek.olsak at amd.com>
---
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 d9124c3..d0eac42 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
--
1.9.1
More information about the mesa-dev
mailing list