mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 13:28:06 +02:00
glx/egl/kopper: explicitly pass __DRI2_FLUSH_CONTEXT when appropriate
this avoids unnecessary st flushing Reviewed-by: Adam Jackson <ajax@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36887>
This commit is contained in:
parent
b799622a41
commit
40b3479635
4 changed files with 6 additions and 6 deletions
|
|
@ -2310,9 +2310,9 @@ dri2_wl_kopper_swap_buffers_with_damage(_EGLDisplay *disp, _EGLSurface *draw,
|
|||
return EGL_FALSE;
|
||||
|
||||
if (n_rects) {
|
||||
kopperSwapBuffersWithDamage(dri2_surf->dri_drawable, __DRI2_FLUSH_INVALIDATE_ANCILLARY, n_rects, rects);
|
||||
kopperSwapBuffersWithDamage(dri2_surf->dri_drawable, __DRI2_FLUSH_CONTEXT | __DRI2_FLUSH_INVALIDATE_ANCILLARY, n_rects, rects);
|
||||
} else {
|
||||
kopperSwapBuffers(dri2_surf->dri_drawable, __DRI2_FLUSH_INVALIDATE_ANCILLARY);
|
||||
kopperSwapBuffers(dri2_surf->dri_drawable, __DRI2_FLUSH_CONTEXT | __DRI2_FLUSH_INVALIDATE_ANCILLARY);
|
||||
}
|
||||
|
||||
dri2_surf->current = dri2_surf->back;
|
||||
|
|
|
|||
|
|
@ -705,9 +705,9 @@ dri2_x11_kopper_swap_buffers_with_damage(_EGLDisplay *disp, _EGLSurface *draw,
|
|||
|
||||
/* swrast path unsupported for now */
|
||||
if (numRects)
|
||||
kopperSwapBuffersWithDamage(dri2_surf->dri_drawable, __DRI2_FLUSH_INVALIDATE_ANCILLARY, numRects, rects);
|
||||
kopperSwapBuffersWithDamage(dri2_surf->dri_drawable, __DRI2_FLUSH_CONTEXT | __DRI2_FLUSH_INVALIDATE_ANCILLARY, numRects, rects);
|
||||
else
|
||||
kopperSwapBuffers(dri2_surf->dri_drawable, __DRI2_FLUSH_INVALIDATE_ANCILLARY);
|
||||
kopperSwapBuffers(dri2_surf->dri_drawable, __DRI2_FLUSH_CONTEXT | __DRI2_FLUSH_INVALIDATE_ANCILLARY);
|
||||
|
||||
/* If the X11 window has been resized, vkQueuePresentKHR() or
|
||||
* vkAcquireNextImageKHR() may return VK_ERROR_SURFACE_LOST or
|
||||
|
|
|
|||
|
|
@ -536,7 +536,7 @@ kopperSwapBuffersWithDamage(struct dri_drawable *drawable, uint32_t flush_flags,
|
|||
drawable->texture_stamp = drawable->lastStamp - 1;
|
||||
|
||||
dri_flush(ctx, drawable,
|
||||
__DRI2_FLUSH_DRAWABLE | __DRI2_FLUSH_CONTEXT | flush_flags,
|
||||
__DRI2_FLUSH_DRAWABLE | flush_flags,
|
||||
__DRI2_THROTTLE_SWAPBUFFER);
|
||||
|
||||
struct pipe_box stack_boxes[64];
|
||||
|
|
|
|||
|
|
@ -563,7 +563,7 @@ driswSwapBuffers(__GLXDRIdrawable * pdraw,
|
|||
}
|
||||
|
||||
if (psc->kopper)
|
||||
return kopperSwapBuffers(pdraw->dri_drawable, 0);
|
||||
return kopperSwapBuffers(pdraw->dri_drawable, flush ? __DRI2_FLUSH_CONTEXT : 0);
|
||||
|
||||
driSwapBuffers(pdraw->dri_drawable);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue