mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 22:49:13 +02:00
Fix inverted version checks in check_extra.
Previously, if an attribute was enabled by either a specific GL version or an extension, the check would require -both- to be enabled. This bug was not discovered earlier because version checks are currently only ever used on their own. Signed-off-by: Kristian Høgsberg <krh@bitplanet.net> Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
parent
de0b76cab2
commit
9b0ba68b44
1 changed files with 12 additions and 6 deletions
|
|
@ -1661,16 +1661,22 @@ check_extra(GLcontext *ctx, const char *func, const struct value_desc *d)
|
|||
for (e = d->extra; *e != EXTRA_END; e++)
|
||||
switch (*e) {
|
||||
case EXTRA_VERSION_30:
|
||||
if (version < 30)
|
||||
return GL_FALSE;
|
||||
if (version >= 30) {
|
||||
total++;
|
||||
enabled++;
|
||||
}
|
||||
break;
|
||||
case EXTRA_VERSION_31:
|
||||
if (version < 31)
|
||||
return GL_FALSE;
|
||||
if (version >= 31) {
|
||||
total++;
|
||||
enabled++;
|
||||
}
|
||||
break;
|
||||
case EXTRA_VERSION_32:
|
||||
if (version < 32)
|
||||
return GL_FALSE;
|
||||
if (version >= 32) {
|
||||
total++;
|
||||
enabled++;
|
||||
}
|
||||
break;
|
||||
case EXTRA_NEW_BUFFERS:
|
||||
if (ctx->NewState & _NEW_BUFFERS)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue