kopper: pass modifier availability to drawable creation
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Thu, 27 Jul 2023 12:53:54 +0000 (08:53 -0400)
committerMarge Bot <emma+marge@anholt.net>
Thu, 27 Jul 2023 19:18:21 +0000 (19:18 +0000)
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24075>

include/kopper_interface.h
src/egl/drivers/dri2/egl_dri2.c
src/glx/drisw_glx.c

index 4c8dcc9..2088098 100644 (file)
@@ -50,6 +50,7 @@ typedef struct __DRIkopperDrawableInfoRec    __DRIkopperDrawableInfo;
 #define __DRI_KOPPER_VERSION 1
 
 struct __DRIkopperDrawableInfoRec {
+   bool multiplanes_available;
    int is_pixmap;
 };
 
index 56680bd..f60b9f9 100644 (file)
@@ -1596,6 +1596,9 @@ dri2_create_drawable(struct dri2_egl_display *dri2_dpy,
       dri2_surf->dri_drawable = dri2_dpy->kopper->createNewDrawable(
          dri2_dpy->dri_screen_render_gpu, config, loaderPrivate,
          &(__DRIkopperDrawableInfo){
+#ifdef HAVE_X11_PLATFORM
+            .multiplanes_available = dri2_dpy->multibuffers_available,
+#endif
             .is_pixmap = dri2_surf->base.Type == EGL_PBUFFER_BIT ||
                          dri2_surf->base.Type == EGL_PIXMAP_BIT,
          });
index f399d77..3263034 100644 (file)
@@ -729,6 +729,7 @@ driswCreateDrawable(struct glx_screen *base, XID xDrawable,
       pdp->driDrawable =
          kopper->createNewDrawable(psc->driScreen, config->driConfig, pdp,
          &(__DRIkopperDrawableInfo){
+            .multiplanes_available = psc->has_multibuffer,
             .is_pixmap = !(type & GLX_WINDOW_BIT),
          });