xserver: Branch 'master' - 2 commits

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Apr 12 08:36:59 UTC 2023


 glamor/glamor.c               |    2 ++
 hw/xwayland/meson.build       |    6 ++++--
 hw/xwayland/xwayland-screen.c |    5 +++--
 3 files changed, 9 insertions(+), 4 deletions(-)

New commits:
commit da0de3caf62023d2b507ed3d66a0b0daa7104c4a
Author: Olivier Fourdan <ofourdan at redhat.com>
Date:   Thu Apr 6 16:13:17 2023 +0200

    xwayland: Fix build without GBM
    
    The present code in Xwayland cannot be used without GBM, so if GBM is
    not available (or too old), the build would fail.
    
    Make sure we do not use the present code without GBM support.
    
    Signed-off-by: Olivier Fourdan <ofourdan at redhat.com>

diff --git a/hw/xwayland/meson.build b/hw/xwayland/meson.build
index e24f39a75..b76d205b2 100644
--- a/hw/xwayland/meson.build
+++ b/hw/xwayland/meson.build
@@ -97,7 +97,10 @@ if build_glamor
         srcs += 'xwayland-glx.c'
     endif
     if gbm_dep.found()
-        srcs += 'xwayland-glamor-gbm.c'
+        srcs += [
+                  'xwayland-glamor-gbm.c',
+                  'xwayland-present.c'
+                ]
     endif
     if build_eglstream
         eglstream_protodir = eglstream_dep.get_pkgconfig_variable('pkgdatadir')
@@ -111,7 +114,6 @@ if build_glamor
 
         srcs += 'xwayland-glamor-eglstream.c'
     endif
-    srcs += 'xwayland-present.c'
     if build_xv
         srcs += 'xwayland-glamor-xv.c'
     endif
diff --git a/hw/xwayland/xwayland-screen.c b/hw/xwayland/xwayland-screen.c
index 46ab4fed7..ac7238b96 100644
--- a/hw/xwayland/xwayland-screen.c
+++ b/hw/xwayland/xwayland-screen.c
@@ -943,10 +943,11 @@ xwl_screen_init(ScreenPtr pScreen, int argc, char **argv)
            xwl_screen->glamor = 0;
         }
     }
-
+#ifdef GLAMOR_HAS_GBM
     if (xwl_screen->glamor && xwl_screen->rootless)
         xwl_screen->present = xwl_present_init(pScreen);
-#endif
+#endif /* GLAMOR_HAS_GBM */
+#endif /* XWL_HAS_GLAMOR */
 
     if (!xwl_screen->glamor) {
         xwl_screen->CreateScreenResources = pScreen->CreateScreenResources;
commit c24910d0e138dc1dc58c0c0cdc10b49a1ed85975
Author: Olivier Fourdan <ofourdan at redhat.com>
Date:   Thu Apr 6 16:12:54 2023 +0200

    glamor: Fix build without GBM
    
    The functions glamor_egl_fd_from_pixmap()/glamor_egl_fds_from_pixmap()
    are not available without GBM support.
    
    So if GBM is not available or too old, the code would fail to link
    trying to find the references to those functions.
    
    Make sure we skip that code when glamor is built without GBM.
    
    Signed-off-by: Olivier Fourdan <ofourdan at redhat.com>

diff --git a/glamor/glamor.c b/glamor/glamor.c
index 0cbc89ee4..617766c2a 100644
--- a/glamor/glamor.c
+++ b/glamor/glamor.c
@@ -1003,6 +1003,7 @@ _glamor_fds_from_pixmap(ScreenPtr screen, PixmapPtr pixmap, int *fds,
                         uint32_t *strides, uint32_t *offsets,
                         CARD32 *size, uint64_t *modifier)
 {
+#ifdef GLAMOR_HAS_GBM
     glamor_pixmap_private *pixmap_priv = glamor_get_pixmap_private(pixmap);
     glamor_screen_private *glamor_priv =
         glamor_get_screen_private(pixmap->drawable.pScreen);
@@ -1030,6 +1031,7 @@ _glamor_fds_from_pixmap(ScreenPtr screen, PixmapPtr pixmap, int *fds,
     default:
         break;
     }
+#endif /* GLAMOR_HAS_GBM */
     return 0;
 }
 


More information about the xorg-commit mailing list