From 43e24ff50773575d28763d899a4f25bb430418b5 Mon Sep 17 00:00:00 2001 From: Roland Scheidegger Date: Wed, 11 Jul 2007 14:20:39 +0200 Subject: some fixes, fake frontbuffer still doesn't work quite right (resize). Fake frontbuffer doesn't copy in real frontbuffer. Don't even think about doing rotation/page flip/triple buffering for now... More cleanups needed (fake cliprects etc.) --- src/mesa/drivers/dri/i915tex/intel_context.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'src/mesa/drivers/dri/i915tex/intel_context.c') diff --git a/src/mesa/drivers/dri/i915tex/intel_context.c b/src/mesa/drivers/dri/i915tex/intel_context.c index 028e57e5ab..76426e3c88 100644 --- a/src/mesa/drivers/dri/i915tex/intel_context.c +++ b/src/mesa/drivers/dri/i915tex/intel_context.c @@ -282,18 +282,22 @@ intelFlush(GLcontext * ctx) * Check if we need to rotate/warp the front color buffer to the * rotated screen. We generally need to do this when we get a glFlush * or glFinish after drawing to the front color buffer. + * If no rotation, just copy the private fake front buffer to the real one. */ static void -intelCheckFrontRotate(GLcontext * ctx) +intelCheckFrontUpdate(GLcontext * ctx) { struct intel_context *intel = intel_context(ctx); if (intel->ctx.DrawBuffer->_ColorDrawBufferMask[0] == BUFFER_BIT_FRONT_LEFT) { intelScreenPrivate *screen = intel->intelScreen; + __DRIdrawablePrivate *dPriv = intel->driDrawable; if (screen->current_rotation != 0) { - __DRIdrawablePrivate *dPriv = intel->driDrawable; intelRotateWindow(intel, dPriv, BUFFER_BIT_FRONT_LEFT); } + else { + intelCopyBuffer(dPriv, NULL); + } } } @@ -305,7 +309,7 @@ static void intelglFlush(GLcontext * ctx) { intelFlush(ctx); - intelCheckFrontRotate(ctx); + intelCheckFrontUpdate(ctx); } void @@ -319,7 +323,7 @@ intelFinish(GLcontext * ctx) driFenceUnReference(intel->batch->last_fence); intel->batch->last_fence = NULL; } - intelCheckFrontRotate(ctx); + intelCheckFrontUpdate(ctx); } @@ -724,8 +728,10 @@ intelContendedLock(struct intel_context *intel, GLuint flags) /* Drawable changed? */ if (dPriv && intel->lastStamp != dPriv->lastStamp) { - intelWindowMoved(intel); - intel->lastStamp = dPriv->lastStamp; + if (INTEL_DEBUG & DEBUG_LOCK) + _mesa_printf("drawable change detected but defering update\n"); +/* intelWindowMoved(intel); + intel->lastStamp = dPriv->lastStamp;*/ } } -- cgit v1.2.3