diff options
author | Eric Anholt <[email protected]> | 2012-07-26 14:43:56 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2012-08-07 11:47:19 -0700 |
commit | 9c1b41879aab2ff7386c547a2ccce7686c018cf5 (patch) | |
tree | 934b03d503f257d3979d6ebe9ad36cee2953bb25 /src/mesa/state_tracker/st_manager.c | |
parent | 3aaeb3e5e76b7b468e2eb2a26f30d68d19d3c854 (diff) |
mesa: Replace VersionMajor/VersionMinor with a Version field.
As we get into supporting GL 3.x core, we come across more and more features
of the API that depend on the version number as opposed to just the extension
list. This will let us more sanely do version checks than "(VersionMajor == 3
&& VersionMinor >= 2) || VersionMajor >= 4".
v2: Fix a bad <= 30 check.
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker/st_manager.c')
-rw-r--r-- | src/mesa/state_tracker/st_manager.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/mesa/state_tracker/st_manager.c b/src/mesa/state_tracker/st_manager.c index 875e0c44ac1..5142eb2dddd 100644 --- a/src/mesa/state_tracker/st_manager.c +++ b/src/mesa/state_tracker/st_manager.c @@ -652,8 +652,7 @@ st_api_create_context(struct st_api *stapi, struct st_manager *smapi, * yet enforce the added restrictions of a forward-looking context, so * fail that too. */ - if (st->ctx->VersionMajor * 10 + st->ctx->VersionMinor < - attribs->major * 10 + attribs->minor + if (st->ctx->Version < attribs->major * 10 + attribs->minor || (attribs->flags & ~ST_CONTEXT_FLAG_DEBUG) != 0) { *error = ST_CONTEXT_ERROR_BAD_VERSION; st_destroy_context(st); |