From f1f53666290fb1718fff439145f6e337c9efbb90 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Sun, 3 Aug 2014 05:35:10 +0200 Subject: [PATCH] mesa: return version 0 if the computed core profile version is too low Reviewed-by: Ilia Mirkin --- 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 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 -- 2.30.2