Mesa (main): kopper: Only include XCB headers on supported platforms

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed May 25 15:48:05 UTC 2022


Module: Mesa
Branch: main
Commit: f2a65359017014e53338eed78354a67bae080621
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=f2a65359017014e53338eed78354a67bae080621

Author: Alessandro Astone <ales.astone at gmail.com>
Date:   Mon May 23 22:36:51 2022 +0200

kopper: Only include XCB headers on supported platforms

Fixes: 054bd2d38f83 ("kopper: copy a bunch of code for texture_from_pixmap")

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>

Reviewed-by: Adam Jackson <ajax at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16675>

---

 src/gallium/frontends/dri/kopper.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/gallium/frontends/dri/kopper.c b/src/gallium/frontends/dri/kopper.c
index a30c9426f6d..d2df5aace4f 100644
--- a/src/gallium/frontends/dri/kopper.c
+++ b/src/gallium/frontends/dri/kopper.c
@@ -42,7 +42,7 @@
 
 #include <vulkan/vulkan.h>
 
-
+#ifdef VK_USE_PLATFORM_XCB_KHR
 #include <xcb/xcb.h>
 #include <xcb/dri3.h>
 #include <xcb/present.h>
@@ -50,6 +50,7 @@
 #include "util/libsync.h"
 #include <X11/Xlib-xcb.h>
 #include "drm-uapi/drm_fourcc.h"
+#endif
 
 struct kopper_drawable {
    struct dri_drawable base;



More information about the mesa-commit mailing list