summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/i915tex/intel_context.c
diff options
context:
space:
mode:
authorRoland Scheidegger <sroland@tungstengraphics.com>2007-07-13 20:47:17 +0200
committerRoland Scheidegger <sroland@tungstengraphics.com>2007-07-13 20:47:17 +0200
commitf022bff5aa828cfdbb4749f672fc51c345f9cb33 (patch)
tree6c8295ebd590e931776da57608c56feb27937748 /src/mesa/drivers/dri/i915tex/intel_context.c
parent8b6517abfc20dc508c2a4cb1f6f22f34a8a70805 (diff)
bugfixes (wrt fb updates), cleanups
move drawable validation back to where it was now that the driDrawable information isn't used directly anymore. Fix bogus fb updates (the context we get for SwapBuffer processing may not have the drawable being processed attached!) glthreads behaves a bit better but still not correct.
Diffstat (limited to 'src/mesa/drivers/dri/i915tex/intel_context.c')
-rw-r--r--src/mesa/drivers/dri/i915tex/intel_context.c24
1 files changed, 10 insertions, 14 deletions
diff --git a/src/mesa/drivers/dri/i915tex/intel_context.c b/src/mesa/drivers/dri/i915tex/intel_context.c
index 451c7fd1ba..41eaafece2 100644
--- a/src/mesa/drivers/dri/i915tex/intel_context.c
+++ b/src/mesa/drivers/dri/i915tex/intel_context.c
@@ -572,7 +572,6 @@ intelMakeCurrent(__DRIcontextPrivate * driContextPriv,
__DRIdrawablePrivate * driDrawPriv,
__DRIdrawablePrivate * driReadPriv)
{
- GLuint updatebufsize = GL_FALSE;
#if 0
if (driDrawPriv) {
@@ -620,22 +619,18 @@ intelMakeCurrent(__DRIcontextPrivate * driContextPriv,
}
}
- /* only update GLframebuffer size to match window
- if here for the first time */
- if (intel->ctx.FirstTimeCurrent) {
- updatebufsize = GL_TRUE;
- driUpdateFramebufferSize(&intel->ctx, driDrawPriv);
+ /* update GLframebuffer size to match window if needed */
+ driUpdateFramebufferSize(&intel->ctx, driDrawPriv);
- if (driReadPriv != driDrawPriv) {
- driUpdateFramebufferSize(&intel->ctx, driReadPriv);
- }
+ if (driReadPriv != driDrawPriv) {
+ driUpdateFramebufferSize(&intel->ctx, driReadPriv);
}
_mesa_make_current(&intel->ctx, &intel_fb->Base, readFb);
/* The drawbuffer won't always be updated by _mesa_make_current:
*/
- if (updatebufsize && intel->ctx.DrawBuffer == &intel_fb->Base) {
+ if (intel->ctx.DrawBuffer == &intel_fb->Base) {
if (intel->driDrawable != driDrawPriv) {
intel_fb->vblank_flags = (intel->intelScreen->irq_active != 0)
@@ -646,9 +641,11 @@ intelMakeCurrent(__DRIcontextPrivate * driContextPriv,
&intel_fb->vbl_seq);
intel->driDrawable = driDrawPriv;
intelWindowMoved(intel);
+ intel->lastStamp = driDrawPriv->lastStamp;
+ }
+ else if (intel->lastStamp != driDrawPriv->lastStamp) {
+ intel_draw_buffer(&intel->ctx, &intel_fb->Base);
}
-
- intel_draw_buffer(&intel->ctx, &intel_fb->Base);
}
}
else {
@@ -677,8 +674,7 @@ intelContendedLock(struct intel_context *intel, GLuint flags)
* checking must be done *after* this call:
*/
if (dPriv)
- intel->revalidateDrawable = GL_TRUE;
-// DRI_VALIDATE_DRAWABLE_INFO(sPriv, dPriv);
+ DRI_VALIDATE_DRAWABLE_INFO(sPriv, dPriv);
if (sarea->width != intelScreen->width ||
sarea->height != intelScreen->height ||