egl: implement more hooks for swrast

these just need to use swapbuffers instead of flush

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15784>
This commit is contained in:
Mike Blumenkrantz 2022-04-06 16:47:52 -04:00 committed by Marge Bot
parent 0666b7fecc
commit 3c4be122cc
3 changed files with 11 additions and 4 deletions

View File

@ -860,7 +860,10 @@ dri2_copy_region(_EGLDisplay *disp,
if (draw->Type == EGL_PIXMAP_BIT || draw->Type == EGL_PBUFFER_BIT)
return EGL_TRUE;
dri2_dpy->flush->flush(dri2_surf->dri_drawable);
if (dri2_dpy->flush)
dri2_dpy->flush->flush(dri2_surf->dri_drawable);
else
dri2_dpy->core->swapBuffers(dri2_surf->dri_drawable);
if (dri2_surf->have_fake_front)
render_attachment = XCB_DRI2_ATTACHMENT_BUFFER_FAKE_FRONT_LEFT;
@ -1008,7 +1011,10 @@ dri2_x11_copy_buffers(_EGLDisplay *disp, _EGLSurface *surf, void *native_pixmap_
STATIC_ASSERT(sizeof(uintptr_t) == sizeof(native_pixmap_target));
target = (uintptr_t) native_pixmap_target;
dri2_dpy->flush->flush(dri2_surf->dri_drawable);
if (dri2_dpy->flush)
dri2_dpy->flush->flush(dri2_surf->dri_drawable);
else
dri2_dpy->core->swapBuffers(dri2_surf->dri_drawable);
gc = xcb_generate_id(dri2_dpy->conn);
xcb_create_gc(dri2_dpy->conn, gc, target, 0, NULL);
@ -1171,6 +1177,9 @@ static const struct dri2_egl_display_vtbl dri2_x11_swrast_display_vtbl = {
.destroy_surface = dri2_x11_destroy_surface,
.create_image = dri2_create_image_khr,
.swap_buffers = dri2_x11_swap_buffers,
.swap_buffers_region = dri2_x11_swap_buffers_region,
.post_sub_buffer = dri2_x11_post_sub_buffer,
.copy_buffers = dri2_x11_copy_buffers,
/* XXX: should really implement this since X11 has pixmaps */
.query_surface = dri2_query_surface,
.get_dri_drawable = dri2_surface_get_dri_drawable,

View File

@ -115,7 +115,6 @@ spec@arb_shader_texture_lod@execution@arb_shader_texture_lod-texgrad,Fail
spec@arb_tessellation_shader@execution@tcs-tes-levels-out-of-bounds-write,Crash
spec@egl 1.4@egl-copy-buffers,Fail
spec@egl_khr_gl_image@egl_khr_gl_renderbuffer_image-clear-shared-image gl_depth_component24,Fail
# No such file or directory (os error 2)

View File

@ -1179,7 +1179,6 @@ spec@arb_transform_feedback2@change objects while paused,Crash
spec@arb_transform_feedback3@arb_transform_feedback3-ext_interleaved_two_bufs_gs,Crash
spec@arb_transform_feedback3@arb_transform_feedback3-ext_interleaved_two_bufs_gs_max,Crash
spec@arb_transform_feedback3@arb_transform_feedback3-ext_interleaved_two_bufs_vs,Crash
spec@egl 1.4@egl-copy-buffers,Fail
# error: main:90: eglChooseConfig() returned no configs
spec@egl 1.4@eglterminate then unbind context,Fail