From 3c4be122cc4996765f6c37c7c792b409340eb13a Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Wed, 6 Apr 2022 16:47:52 -0400 Subject: [PATCH] egl: implement more hooks for swrast these just need to use swapbuffers instead of flush Reviewed-by: Adam Jackson Part-of: --- src/egl/drivers/dri2/platform_x11.c | 13 +++++++++++-- src/gallium/drivers/llvmpipe/ci/llvmpipe-fails.txt | 1 - src/gallium/drivers/softpipe/ci/softpipe-fails.txt | 1 - 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/egl/drivers/dri2/platform_x11.c b/src/egl/drivers/dri2/platform_x11.c index 576d47e4350..f8a5b90b3a5 100644 --- a/src/egl/drivers/dri2/platform_x11.c +++ b/src/egl/drivers/dri2/platform_x11.c @@ -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, diff --git a/src/gallium/drivers/llvmpipe/ci/llvmpipe-fails.txt b/src/gallium/drivers/llvmpipe/ci/llvmpipe-fails.txt index 25bc30eb30d..eede727b774 100644 --- a/src/gallium/drivers/llvmpipe/ci/llvmpipe-fails.txt +++ b/src/gallium/drivers/llvmpipe/ci/llvmpipe-fails.txt @@ -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) diff --git a/src/gallium/drivers/softpipe/ci/softpipe-fails.txt b/src/gallium/drivers/softpipe/ci/softpipe-fails.txt index 778b9ef3434..eacbfff5065 100644 --- a/src/gallium/drivers/softpipe/ci/softpipe-fails.txt +++ b/src/gallium/drivers/softpipe/ci/softpipe-fails.txt @@ -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