Mesa (main): egl: implement more hooks for swrast
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Apr 7 19:52:02 UTC 2022
Module: Mesa
Branch: main
Commit: 3c4be122cc4996765f6c37c7c792b409340eb13a
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=3c4be122cc4996765f6c37c7c792b409340eb13a
Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date: Wed Apr 6 16:47:52 2022 -0400
egl: implement more hooks for swrast
these just need to use swapbuffers instead of flush
Reviewed-by: Adam Jackson <ajax at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15784>
---
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 at arb_shader_texture_lod@execution at arb_shader_texture_lod-texgrad,Fail
spec at arb_tessellation_shader@execution at tcs-tes-levels-out-of-bounds-write,Crash
-spec at egl 1.4 at egl-copy-buffers,Fail
spec at 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 at arb_transform_feedback2@change objects while paused,Crash
spec at arb_transform_feedback3@arb_transform_feedback3-ext_interleaved_two_bufs_gs,Crash
spec at arb_transform_feedback3@arb_transform_feedback3-ext_interleaved_two_bufs_gs_max,Crash
spec at arb_transform_feedback3@arb_transform_feedback3-ext_interleaved_two_bufs_vs,Crash
-spec at egl 1.4 at egl-copy-buffers,Fail
# error: main:90: eglChooseConfig() returned no configs
spec at egl 1.4 at eglterminate then unbind context,Fail
More information about the mesa-commit
mailing list