mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 04:30:10 +01:00
egl/wayland: add a separate hook for kopper buffer age
this otherwise hits the swrast one which is wrong Acked-by: Daniel Stone <daniels@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27703>
This commit is contained in:
parent
4345c415d7
commit
76f74f55a4
1 changed files with 13 additions and 1 deletions
|
|
@ -2561,6 +2561,18 @@ dri2_wl_swrast_swap_buffers(_EGLDisplay *disp, _EGLSurface *draw)
|
|||
return EGL_TRUE;
|
||||
}
|
||||
|
||||
static EGLint
|
||||
dri2_wl_kopper_query_buffer_age(_EGLDisplay *disp, _EGLSurface *surface)
|
||||
{
|
||||
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
|
||||
struct dri2_egl_surface *dri2_surf = dri2_egl_surface(surface);
|
||||
|
||||
/* This can legitimately be null for lavapipe */
|
||||
if (dri2_dpy->kopper)
|
||||
return dri2_dpy->kopper->queryBufferAge(dri2_surf->dri_drawable);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static EGLint
|
||||
dri2_wl_swrast_query_buffer_age(_EGLDisplay *disp, _EGLSurface *surface)
|
||||
{
|
||||
|
|
@ -2640,7 +2652,7 @@ static const struct dri2_egl_display_vtbl dri2_wl_kopper_display_vtbl = {
|
|||
.swap_buffers = dri2_wl_swrast_swap_buffers,
|
||||
.swap_buffers_with_damage = dri2_wl_swrast_swap_buffers_with_damage,
|
||||
.get_dri_drawable = dri2_surface_get_dri_drawable,
|
||||
.query_buffer_age = dri2_wl_swrast_query_buffer_age,
|
||||
.query_buffer_age = dri2_wl_kopper_query_buffer_age,
|
||||
};
|
||||
|
||||
static const __DRIswrastLoaderExtension swrast_loader_extension = {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue