diff options
author | Brian <[email protected]> | 2007-11-06 10:19:27 -0700 |
---|---|---|
committer | Brian <[email protected]> | 2007-11-06 15:27:14 -0700 |
commit | 4cf56a418399c142335e0cab3fe3b8e54bfc703c (patch) | |
tree | 6820c44715f1cb1948741b12fc2306f8e9316098 /src | |
parent | 5e24e3c4266779704fc30737ac5e005ba71fd797 (diff) |
implement context sharing code
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/intel_winsys/intel_context.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/mesa/drivers/dri/intel_winsys/intel_context.c b/src/mesa/drivers/dri/intel_winsys/intel_context.c index ed6448646a4..26420c848ae 100644 --- a/src/mesa/drivers/dri/intel_winsys/intel_context.c +++ b/src/mesa/drivers/dri/intel_winsys/intel_context.c @@ -35,7 +35,7 @@ #include "intel_batchbuffer.h" #include "state_tracker/st_public.h" -#include "state_tracker/st_context.h" /* XXX temporary */ +#include "state_tracker/st_context.h" #include "pipe/p_defines.h" #include "pipe/p_context.h" @@ -75,18 +75,22 @@ static const struct dri_debug_control debug_control[] = { GLboolean -intelCreateContext(const __GLcontextModes * mesaVis, +intelCreateContext(const __GLcontextModes * visual, __DRIcontextPrivate * driContextPriv, void *sharedContextPrivate) { struct intel_context *intel = CALLOC_STRUCT(intel_context); - __DRIscreenPrivate *sPriv = driContextPriv->driScreenPriv; struct intel_screen *intelScreen = intel_screen(sPriv); drmI830Sarea *saPriv = intelScreen->sarea; int fthrottle_mode; GLboolean havePools; struct pipe_context *pipe; + struct st_context *st_share = NULL; + + if (sharedContextPrivate) { + st_share = ((struct intel_context *) sharedContextPrivate)->st; + } driContextPriv->driverPrivate = intel; intel->intelScreen = intelScreen; @@ -144,15 +148,15 @@ intelCreateContext(const __GLcontextModes * mesaVis, pipe = intel_create_i915simple( intel ); break; default: - _mesa_printf("Unknown PCIID %x in %s, using software driver\n", - intel->intelScreen->deviceID, __FUNCTION__); + fprintf(stderr, "Unknown PCIID %x in %s, using software driver\n", + intel->intelScreen->deviceID, __FUNCTION__); pipe = intel_create_softpipe( intel ); break; } } - intel->st = st_create_context(pipe, mesaVis, NULL); + intel->st = st_create_context(pipe, visual, st_share); intel->st->ctx->DriverCtx = intel; /* hope to get rid of this... */ return GL_TRUE; |