mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 19:58:09 +02:00
swapbuffers with non-current contexts, cleanups
manywin got broken (when intelPageflip got no longer called). Make sure that intelFlush is getting called when a context gets unbound, to handle later swapbuffer calls on that context's drawable better. Related, fix non-current cliprects getting used on unbound drawables.
This commit is contained in:
parent
c5a8bc7125
commit
ccb713cdb8
4 changed files with 17 additions and 17 deletions
|
|
@ -78,6 +78,12 @@ intelCopyBuffer(__DRIdrawablePrivate * dPriv,
|
|||
* 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;
|
||||
|
|
|
|||
|
|
@ -356,7 +356,8 @@ intelClearWithTris(struct intel_context *intel, GLbitfield mask)
|
|||
/* 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);
|
||||
|
|
@ -991,16 +992,6 @@ intel_draw_buffer(GLcontext * ctx, struct gl_framebuffer *fb)
|
|||
/**
|
||||
** 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);
|
||||
|
||||
|
|
|
|||
|
|
@ -569,6 +569,9 @@ intelDestroyContext(__DRIcontextPrivate * driContextPriv)
|
|||
GLboolean
|
||||
intelUnbindContext(__DRIcontextPrivate * driContextPriv)
|
||||
{
|
||||
struct intel_context *intel = (struct intel_context *) driContextPriv->driverPrivate;
|
||||
FLUSH_VERTICES((&intel->ctx), 0);
|
||||
intelFlush(&intel->ctx);
|
||||
return GL_TRUE;
|
||||
}
|
||||
|
||||
|
|
@ -616,14 +619,16 @@ intelMakeCurrent(__DRIcontextPrivate * driContextPriv,
|
|||
(*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);
|
||||
|
|
|
|||
|
|
@ -247,8 +247,6 @@ struct intel_context
|
|||
drm_clip_rect_t *pClipRects;
|
||||
drm_clip_rect_t fboRect; /**< cliprect for rendering */
|
||||
|
||||
int perf_boxes;
|
||||
|
||||
GLuint do_usleeps;
|
||||
int do_irqs;
|
||||
GLuint irqsEmitted;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue