From ce6f16d382dc76fd77064c6ce04ca6cc18cdfcef Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Sat, 5 Mar 2011 11:08:57 -0700 Subject: st/mesa: fix incorrect version checking code --- src/mesa/state_tracker/st_manager.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/mesa/state_tracker/st_manager.c') 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; } -- cgit v1.2.3