mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 07:28:11 +02:00
mesa: return version 0 if the computed core profile version is too low
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
This commit is contained in:
parent
7207830047
commit
f1f5366629
1 changed files with 7 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue