aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/dri/common
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2011-12-13 15:46:20 -0800
committerIan Romanick <[email protected]>2011-12-23 08:49:50 -0800
commitd18152028e1825c05c7de33acacee3336350a096 (patch)
treecbfe88a4d0c18ff5e1c2d5ec4a4cf9eaf74875f2 /src/gallium/state_trackers/dri/common
parent358ecff1ea0fa8432fd46bd3deeb8d2d694b5550 (diff)
st-api: Have context_create explain why creation failed
This won't be used in the client-side libGL, but the xserver has to generate a different protocol error depending on the reason context creation failed. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Chia-I Wu <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/dri/common')
-rw-r--r--src/gallium/state_trackers/dri/common/dri_context.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/state_trackers/dri/common/dri_context.c b/src/gallium/state_trackers/dri/common/dri_context.c
index e9e00490d21..3e5a040c69e 100644
--- a/src/gallium/state_trackers/dri/common/dri_context.c
+++ b/src/gallium/state_trackers/dri/common/dri_context.c
@@ -58,6 +58,7 @@ dri_create_context(gl_api api, const struct gl_config * visual,
struct dri_context *ctx = NULL;
struct st_context_iface *st_share = NULL;
struct st_context_attribs attribs;
+ enum st_context_error ctx_err = 0;
memset(&attribs, 0, sizeof(attribs));
switch (api) {
@@ -88,7 +89,8 @@ dri_create_context(gl_api api, const struct gl_config * visual,
&screen->optionCache, sPriv->myNum, "dri");
dri_fill_st_visual(&attribs.visual, screen, visual);
- ctx->st = stapi->create_context(stapi, &screen->base, &attribs, st_share);
+ ctx->st = stapi->create_context(stapi, &screen->base, &attribs, &ctx_err,
+ st_share);
if (ctx->st == NULL)
goto fail;
ctx->st->st_manager_private = (void *) ctx;