GL 4.5 on llvmpipe
GL_NV_half_float
+EGL_KHR_swap_buffers_with_damage on X11 (DRI3)
disp->Extensions.NOK_texture_from_pixmap = EGL_TRUE;
disp->Extensions.CHROMIUM_sync_control = EGL_TRUE;
disp->Extensions.EXT_buffer_age = EGL_TRUE;
+ disp->Extensions.EXT_swap_buffers_with_damage = EGL_TRUE;
dri2_set_WL_bind_wayland_display(disp);
};
static EGLBoolean
-dri3_swap_buffers(_EGLDisplay *disp, _EGLSurface *draw)
+dri3_swap_buffers_with_damage(_EGLDisplay *disp, _EGLSurface *draw,
+ const EGLint *rects, EGLint n_rects)
{
struct dri3_egl_surface *dri3_surf = dri3_egl_surface(draw);
return loader_dri3_swap_buffers_msc(&dri3_surf->loader_drawable,
0, 0, 0, 0,
+ rects, n_rects,
draw->SwapBehavior == EGL_BUFFER_PRESERVED) != -1;
}
+static EGLBoolean
+dri3_swap_buffers(_EGLDisplay *disp, _EGLSurface *draw)
+{
+ return dri3_swap_buffers_with_damage(disp, draw, NULL, 0);
+}
+
static EGLBoolean
dri3_copy_buffers(_EGLDisplay *disp, _EGLSurface *surf, void *native_pixmap_target)
{
.create_image = dri3_create_image_khr,
.swap_interval = dri3_set_swap_interval,
.swap_buffers = dri3_swap_buffers,
+ .swap_buffers_with_damage = dri3_swap_buffers_with_damage,
.copy_buffers = dri3_copy_buffers,
.query_buffer_age = dri3_query_buffer_age,
.query_surface = dri3_query_surface,
return loader_dri3_swap_buffers_msc(&priv->loader_drawable,
target_msc, divisor, remainder,
- flags, false);
+ flags, NULL, 0, false);
}
static int
#include <xcb/xcb.h>
#include <xcb/dri3.h>
#include <xcb/present.h>
+#include <xcb/xfixes.h>
#include <X11/Xlib-xcb.h>
loader_dri3_swap_buffers_msc(struct loader_dri3_drawable *draw,
int64_t target_msc, int64_t divisor,
int64_t remainder, unsigned flush_flags,
+ const int *rects, int n_rects,
bool force_copy)
{
struct loader_dri3_buffer *back;
#endif
back->busy = 1;
back->last_swap = draw->send_sbc;
+
+ xcb_xfixes_region_t region = 0;
+ xcb_rectangle_t xcb_rects[64];
+
+ if (n_rects > 0 && n_rects <= ARRAY_SIZE(xcb_rects)) {
+ for (int i = 0; i < n_rects; i++) {
+ const int *rect = &rects[i * 4];
+ xcb_rects[i].x = rect[0];
+ xcb_rects[i].y = draw->height - rect[1] - rect[3];
+ xcb_rects[i].width = rect[2];
+ xcb_rects[i].height = rect[3];
+ }
+
+ region = xcb_generate_id(draw->conn);
+ xcb_xfixes_create_region(draw->conn, region, n_rects, xcb_rects);
+ }
+
xcb_present_pixmap(draw->conn,
draw->drawable,
back->pixmap,
(uint32_t) draw->send_sbc,
0, /* valid */
- 0, /* update */
+ region, /* update */
0, /* x_off */
0, /* y_off */
None, /* target_crtc */
remainder, 0, NULL);
ret = (int64_t) draw->send_sbc;
+ if (region)
+ xcb_xfixes_destroy_region(draw->conn, region);
+
/* Schedule a server-side back-preserving blit if necessary.
* This happens iff all conditions below are satisfied:
* a) We have a fake front,
loader_dri3_swap_buffers_msc(struct loader_dri3_drawable *draw,
int64_t target_msc, int64_t divisor,
int64_t remainder, unsigned flush_flags,
+ const int *rects, int n_rects,
bool force_copy);
int
include_directories : [inc_include, inc_src],
dependencies : [
dep_libdrm, dep_xcb_dri3, dep_xcb_present, dep_xcb_sync, dep_xshmfence,
+ dep_xcb_xfixes,
],
build_by_default : false,
)