diff options
author | marha <marha@users.sourceforge.net> | 2011-12-25 17:34:25 +0100 |
---|---|---|
committer | Marc Haesen <marc@hc-consult.be> | 2011-12-25 17:34:25 +0100 |
commit | 7fd4689bd7bac15dcc0ab13d4689a11e2c303681 (patch) | |
tree | c5bd75a1fc913dcb08d03525d87638e66fa8aad2 /mesalib/src/mesa/state_tracker/st_manager.c | |
parent | 1a9e93b01e2339579bf9a0fae0db0f83b653aab7 (diff) | |
parent | 0fd2d56b0fc0ce74c5f3e5e23cb26b0d1a075ba1 (diff) | |
download | vcxsrv-7fd4689bd7bac15dcc0ab13d4689a11e2c303681.tar.gz vcxsrv-7fd4689bd7bac15dcc0ab13d4689a11e2c303681.tar.bz2 vcxsrv-7fd4689bd7bac15dcc0ab13d4689a11e2c303681.zip |
Merge remote-tracking branch 'origin/released'
Diffstat (limited to 'mesalib/src/mesa/state_tracker/st_manager.c')
-rw-r--r-- | mesalib/src/mesa/state_tracker/st_manager.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/mesalib/src/mesa/state_tracker/st_manager.c b/mesalib/src/mesa/state_tracker/st_manager.c index 55699e721..828f0d81f 100644 --- a/mesalib/src/mesa/state_tracker/st_manager.c +++ b/mesalib/src/mesa/state_tracker/st_manager.c @@ -600,6 +600,7 @@ st_context_destroy(struct st_context_iface *stctxi) static struct st_context_iface * st_api_create_context(struct st_api *stapi, struct st_manager *smapi, const struct st_context_attribs *attribs, + enum st_context_error *error, struct st_context_iface *shared_stctxi) { struct st_context *shared_ctx = (struct st_context *) shared_stctxi; @@ -623,17 +624,21 @@ st_api_create_context(struct st_api *stapi, struct st_manager *smapi, break; case ST_PROFILE_OPENGL_CORE: default: + *error = ST_CONTEXT_ERROR_BAD_API; return NULL; break; } pipe = smapi->screen->context_create(smapi->screen, NULL); - if (!pipe) + if (!pipe) { + *error = ST_CONTEXT_ERROR_NO_MEMORY; return NULL; + } st_visual_to_context_mode(&attribs->visual, &mode); st = st_create_context(api, pipe, &mode, shared_ctx); if (!st) { + *error = ST_CONTEXT_ERROR_NO_MEMORY; pipe->destroy(pipe); return NULL; } @@ -645,6 +650,7 @@ st_api_create_context(struct st_api *stapi, struct st_manager *smapi, /* is the actual version less than the requested version? */ if (st->ctx->VersionMajor * 10 + st->ctx->VersionMinor < attribs->major * 10 + attribs->minor) { + *error = ST_CONTEXT_ERROR_BAD_VERSION; st_destroy_context(st); return NULL; } @@ -660,6 +666,7 @@ st_api_create_context(struct st_api *stapi, struct st_manager *smapi, st->iface.share = st_context_share; st->iface.st_context_private = (void *) smapi; + *error = ST_CONTEXT_SUCCESS; return &st->iface; } |