diff options
author | Brian Paul <[email protected]> | 2011-03-05 11:08:57 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2011-03-07 14:58:39 -0700 |
commit | ce6f16d382dc76fd77064c6ce04ca6cc18cdfcef (patch) | |
tree | 27f7389bfb5596f466fecdac8138fe8039be0197 | |
parent | 8329f4db6124de0578bd1def39f0d5845a9025af (diff) |
st/mesa: fix incorrect version checking code
-rw-r--r-- | src/mesa/state_tracker/st_manager.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mesa/state_tracker/st_manager.c b/src/mesa/state_tracker/st_manager.c index 5c8853cfadb..d85bcd4f7c3 100644 --- a/src/mesa/state_tracker/st_manager.c +++ b/src/mesa/state_tracker/st_manager.c @@ -684,8 +684,9 @@ st_api_create_context(struct st_api *stapi, struct st_manager *smapi, if (attribs->major > 1 || attribs->minor > 0) { _mesa_compute_version(st->ctx); - if (st->ctx->VersionMajor < attribs->major || - st->ctx->VersionMajor < attribs->minor) { + /* is the actual version less than the requested version? */ + if (st->ctx->VersionMajor * 10 + st->ctx->VersionMinor < + attribs->major * 10 + attribs->minor) { st_destroy_context(st); return NULL; } |