diff options
author | Marek Olšák <[email protected]> | 2012-11-28 20:38:22 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2012-11-29 01:07:26 +0100 |
commit | aa46cc2879846c7f4e11dfb0a83063863bce6997 (patch) | |
tree | f1a2eefb8b23ab5c7e1ab02bf3992d92204ff17e /src/mesa/state_tracker/st_manager.c | |
parent | 249f86e3f88d667437130a2badfe139d3144fcc9 (diff) |
st/mesa: allow forward-compatible contexts and set Const.ContextFlags
Reviewed-by: Brian Paul <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker/st_manager.c')
-rw-r--r-- | src/mesa/state_tracker/st_manager.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/mesa/state_tracker/st_manager.c b/src/mesa/state_tracker/st_manager.c index 999e916e92d..5576a0d6cb3 100644 --- a/src/mesa/state_tracker/st_manager.c +++ b/src/mesa/state_tracker/st_manager.c @@ -646,16 +646,18 @@ st_api_create_context(struct st_api *stapi, struct st_manager *smapi, return NULL; } + if (attribs->flags & ST_CONTEXT_FLAG_DEBUG) + st->ctx->Const.ContextFlags |= GL_CONTEXT_FLAG_DEBUG_BIT; + if (attribs->flags & ST_CONTEXT_FLAG_FORWARD_COMPATIBLE) + st->ctx->Const.ContextFlags |= GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT; + /* need to perform version check */ if (attribs->major > 1 || attribs->minor > 0) { _mesa_compute_version(st->ctx); - /* Is the actual version less than the requested version? Mesa can't - * yet enforce the added restrictions of a forward-looking context, so - * fail that too. + /* Is the actual version less than the requested version? */ - if (st->ctx->Version < attribs->major * 10 + attribs->minor - || (attribs->flags & ~ST_CONTEXT_FLAG_DEBUG) != 0) { + if (st->ctx->Version < attribs->major * 10 + attribs->minor) { *error = ST_CONTEXT_ERROR_BAD_VERSION; st_destroy_context(st); return NULL; |