mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 22:38:05 +02:00
dri3/GLX: Fix drawable invalidation v2
A number of internal VMware apitrace traces image comparisons fail with dri3 because the viewport transformation becomes incorrect after an X drawable resize. The incorrect viewport transformation sometimes persist until the second draw-call after a swapBuffer. Comparing with the dri2 glx code there are a couple of places where dri2 invalidates the drawable in the absence of server-triggered invalidation, where dri3 doesn't do that. When these invalidation points are added to dri3, the image comparisons become correct. v2: Addressed review comment by Michel Dänzer. Cc: <mesa-stable@lists.freedesktop.org> Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-and-tested-by: Michel Dänzer <michel.daenzer@amd.com>
This commit is contained in:
parent
09c3a00f10
commit
1253d58983
1 changed files with 6 additions and 0 deletions
|
|
@ -235,6 +235,11 @@ dri3_bind_context(struct glx_context *context, struct glx_context *old,
|
|||
if (!(*psc->core->bindContext) (pcp->driContext, dri_draw, dri_read))
|
||||
return GLXBadContext;
|
||||
|
||||
if (dri_draw)
|
||||
(*psc->f->invalidate)(dri_draw);
|
||||
if (dri_read && dri_read != dri_draw)
|
||||
(*psc->f->invalidate)(dri_read);
|
||||
|
||||
return Success;
|
||||
}
|
||||
|
||||
|
|
@ -493,6 +498,7 @@ dri3_flush_front_buffer(__DRIdrawable *driDrawable, void *loaderPrivate)
|
|||
|
||||
loader_dri3_flush(draw, __DRI2_FLUSH_DRAWABLE, __DRI2_THROTTLE_FLUSHFRONT);
|
||||
|
||||
(*psc->f->invalidate)(driDrawable);
|
||||
loader_dri3_wait_gl(draw);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue