diff options
author | Kenneth Graunke <[email protected]> | 2010-08-30 12:22:39 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2010-08-30 12:29:22 -0700 |
commit | 9b0ba68b4489557c48efa088c3884120dabc68fb (patch) | |
tree | ef4f938320fe089827f02dab08b526fdc3344376 | |
parent | de0b76cab22caa9fc7260f80acb8f151ccced6c5 (diff) |
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 <[email protected]>
Signed-off-by: Kenneth Graunke <[email protected]>
-rw-r--r-- | src/mesa/main/get.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c index 632dadd1a5d..a3cb5ec168f 100644 --- a/src/mesa/main/get.c +++ b/src/mesa/main/get.c @@ -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) |