diff options
Diffstat (limited to 'src/mesa/drivers/dri/intel/intel_context.c')
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_context.c | 26 |
1 files changed, 8 insertions, 18 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_context.c b/src/mesa/drivers/dri/intel/intel_context.c index 5289e954dbd..176f32f3aa7 100644 --- a/src/mesa/drivers/dri/intel/intel_context.c +++ b/src/mesa/drivers/dri/intel/intel_context.c @@ -389,7 +389,7 @@ intel_prepare_render(struct intel_context *intel) __DRIcontext *driContext = intel->driContext; __DRIdrawable *drawable; - drawable = intel->driDrawable; + drawable = driContext->driDrawablePriv; if (drawable->dri2.stamp != driContext->dri2.draw_stamp) { if (drawable->lastStamp != drawable->dri2.stamp) intel_update_renderbuffers(driContext, drawable); @@ -397,7 +397,7 @@ intel_prepare_render(struct intel_context *intel) driContext->dri2.draw_stamp = drawable->dri2.stamp; } - drawable = intel->driReadDrawable; + drawable = driContext->driReadablePriv; if (drawable->dri2.stamp != driContext->dri2.read_stamp) { if (drawable->lastStamp != drawable->dri2.stamp) intel_update_renderbuffers(driContext, drawable); @@ -472,6 +472,7 @@ void intel_flush(GLcontext *ctx, GLboolean needs_mi_flush) { struct intel_context *intel = intel_context(ctx); + __DRIcontext *driContext = intel->driContext; if (intel->Fallback) _swrast_flush(ctx); @@ -488,9 +489,10 @@ intel_flush(GLcontext *ctx, GLboolean needs_mi_flush) if (screen->dri2.loader && (screen->dri2.loader->base.version >= 2) && (screen->dri2.loader->flushFrontBuffer != NULL) && - intel->driDrawable && intel->driDrawable->loaderPrivate) { - (*screen->dri2.loader->flushFrontBuffer)(intel->driDrawable, - intel->driDrawable->loaderPrivate); + driContext->driDrawablePriv && + driContext->driDrawablePriv->loaderPrivate) { + (*screen->dri2.loader->flushFrontBuffer)(driContext->driDrawablePriv, + driContext->driDrawablePriv->loaderPrivate); /* Only clear the dirty bit if front-buffer rendering is no longer * enabled. This is done so that the dirty bit can only be set in @@ -607,7 +609,6 @@ intelInitContext(struct intel_context *intel, driContextPriv->driverPrivate = intel; intel->intelScreen = intelScreen; - intel->driScreen = sPriv; intel->driContext = driContextPriv; intel->driFd = sPriv->fd; @@ -636,8 +637,7 @@ intelInitContext(struct intel_context *intel, } driParseConfigFiles(&intel->optionCache, &intelScreen->optionCache, - intel->driScreen->myNum, - (intel->gen >= 4) ? "i965" : "i915"); + sPriv->myNum, (intel->gen >= 4) ? "i965" : "i915"); if (intelScreen->deviceID == PCI_CHIP_I865_G) intel->maxBatchSize = 4096; else @@ -845,14 +845,6 @@ intelDestroyContext(__DRIcontext * driContextPriv) GLboolean intelUnbindContext(__DRIcontext * driContextPriv) { - struct intel_context *intel = - (struct intel_context *) driContextPriv->driverPrivate; - - /* Deassociate the context with the drawables. - */ - intel->driDrawable = NULL; - intel->driReadDrawable = NULL; - return GL_TRUE; } @@ -881,8 +873,6 @@ intelMakeCurrent(__DRIcontext * driContextPriv, struct gl_framebuffer *fb = driDrawPriv->driverPrivate; struct gl_framebuffer *readFb = driReadPriv->driverPrivate; - intel->driReadDrawable = driReadPriv; - intel->driDrawable = driDrawPriv; driContextPriv->dri2.draw_stamp = driDrawPriv->dri2.stamp - 1; driContextPriv->dri2.read_stamp = driReadPriv->dri2.stamp - 1; intel_prepare_render(intel); |