* should work regardless.
*/
LOCK_HARDWARE(intel);
+ /* if this drawable isn't currently bound the LOCK_HARDWARE done on the
+ current context (which is what intelScreenContext should return) might
+ not get a contended lock and thus cliprects not updated (tests/manywin) */
+ if ((struct intel_context *)dPriv->driContextPriv->driverPrivate != intel)
+ DRI_VALIDATE_DRAWABLE_INFO(intel->driScreen, dPriv);
+
if (dPriv && dPriv->numClipRects) {
struct intel_framebuffer *intel_fb = dPriv->driverPrivate;
/* XXX: Using INTEL_BATCH_NO_CLIPRECTS here is dangerous as the
* drawing origin may not be correctly emitted.
*/
- intel_meta_draw_quad(intel, clear.x1, clear.x2, clear.y1, clear.y2, intel->ctx.Depth.Clear, clearColor, 0, 0, 0, 0); /* texcoords */
+ intel_meta_draw_quad(intel, clear.x1, clear.x2, clear.y1, clear.y2,
+ intel->ctx.Depth.Clear, clearColor, 0, 0, 0, 0); /* texcoords */
mask &=
~(BUFFER_BIT_BACK_LEFT | BUFFER_BIT_STENCIL | BUFFER_BIT_DEPTH);
/**
** Release old regions, reference new regions
**/
-#if 0 /* XXX FBO: this seems to be redundant with i915_state_draw_region() */
- if (intel->draw_region != colorRegion) {
- intel_region_release(&intel->draw_region);
- intel_region_reference(&intel->draw_region, colorRegion);
- }
- if (intel->intelScreen->depth_region != depthRegion) {
- intel_region_release(&intel->intelScreen->depth_region);
- intel_region_reference(&intel->intelScreen->depth_region, depthRegion);
- }
-#endif
intel->vtbl.set_draw_region(intel, colorRegion, depthRegion);
GLboolean
intelUnbindContext(__DRIcontextPrivate * driContextPriv)
{
+ struct intel_context *intel = (struct intel_context *) driContextPriv->driverPrivate;
+ FLUSH_VERTICES((&intel->ctx), 0);
+ intelFlush(&intel->ctx);
return GL_TRUE;
}
(*dri_interface->getUST) (&intel_fb->swap_ust);
driDrawableInitVBlank(driDrawPriv, intel_fb->vblank_flags,
&intel_fb->vbl_seq);
+ }
+ }
+
+ if ((intel->driDrawable != driDrawPriv) ||
+ (intel->lastStamp != driDrawPriv->lastStamp)) {
intel->driDrawable = driDrawPriv;
intelWindowMoved(intel);
intel->lastStamp = driDrawPriv->lastStamp;
- }
- else if (intel->lastStamp != driDrawPriv->lastStamp) {
- intel_draw_buffer(&intel->ctx, &intel_fb->Base);
- }
}
+
}
else {
_mesa_make_current(NULL, NULL, NULL);