diff options
author | Ian Romanick <[email protected]> | 2011-12-01 11:31:28 -0800 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2012-01-02 12:41:45 -0800 |
commit | 4c7898cb13528ede00c7524849de4aeac81a6ac3 (patch) | |
tree | 4591eb298cac4d5299a8ee9c62a06e498c568e2c /src/mesa | |
parent | d9de33c304d875627937cacbfc21f54a406af726 (diff) |
st/mesa: Reject forward-looking contexts
Signed-off-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/state_tracker/st_manager.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mesa/state_tracker/st_manager.c b/src/mesa/state_tracker/st_manager.c index 828f0d81f60..1cee312cd3e 100644 --- a/src/mesa/state_tracker/st_manager.c +++ b/src/mesa/state_tracker/st_manager.c @@ -647,9 +647,13 @@ st_api_create_context(struct st_api *stapi, struct st_manager *smapi, if (attribs->major > 1 || attribs->minor > 0) { _mesa_compute_version(st->ctx); - /* is the actual version less than the requested version? */ + /* 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. + */ if (st->ctx->VersionMajor * 10 + st->ctx->VersionMinor < - attribs->major * 10 + attribs->minor) { + attribs->major * 10 + attribs->minor + || (attribs->flags & ~ST_CONTEXT_FLAG_DEBUG) != 0) { *error = ST_CONTEXT_ERROR_BAD_VERSION; st_destroy_context(st); return NULL; |