egl/wayland: Don't replace existing backbuffer in get_buffers
If the surface already has a current backbuffer - say through a buffer_age query - we do not want to replace it in get_buffers, because it means the result we'd previously returned them is stale. If we already have a backbuffer set on the surface, keep it locked in no matter what until we hit SwapBuffers. Signed-off-by: Daniel Stone <daniels@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14873>
This commit is contained in:
parent
3da8300562
commit
b561946497
|
@ -1172,7 +1172,7 @@ dri2_wl_get_buffers_with_format(__DRIdrawable * driDrawable,
|
|||
struct dri2_egl_surface *dri2_surf = loaderPrivate;
|
||||
int i, j;
|
||||
|
||||
if (update_buffers(dri2_surf) < 0)
|
||||
if (update_buffers_if_needed(dri2_surf) < 0)
|
||||
return NULL;
|
||||
|
||||
for (i = 0, j = 0; i < 2 * count; i += 2, j++) {
|
||||
|
@ -1251,7 +1251,7 @@ image_get_buffers(__DRIdrawable *driDrawable,
|
|||
{
|
||||
struct dri2_egl_surface *dri2_surf = loaderPrivate;
|
||||
|
||||
if (update_buffers(dri2_surf) < 0)
|
||||
if (update_buffers_if_needed(dri2_surf) < 0)
|
||||
return 0;
|
||||
|
||||
buffers->image_mask = __DRI_IMAGE_BUFFER_BACK;
|
||||
|
|
Loading…
Reference in New Issue