Patrick Williams | b58112e | 2024-03-07 11:16:36 -0600 | [diff] [blame] | 1 | From 4bd15a419e892da843489c374c58c5b29c40b5d6 Mon Sep 17 00:00:00 2001 |
| 2 | From: Romain Naour <romain.naour@smile.fr> |
| 3 | Date: Tue, 6 Feb 2024 09:47:09 +0100 |
| 4 | Subject: [PATCH 1/2] drisw: fix build without dri3 |
| 5 | |
| 6 | commit 1887368df41 ("glx/sw: check for modifier support in the kopper path") |
| 7 | added dri3_priv.h header and dri3_check_multibuffer() function in drisw that |
| 8 | can be build without dri3. |
| 9 | |
| 10 | i686-buildroot-linux-gnu/bin/ld: src/glx/libglx.a.p/drisw_glx.c.o: in function `driswCreateScreenDriver': |
| 11 | drisw_glx.c:(.text.driswCreateScreenDriver+0x3a0): undefined reference to `dri3_check_multibuffer' |
| 12 | collect2: error: ld returned 1 exit status |
| 13 | |
| 14 | Add HAVE_DRI3 guard around dri3_priv.h header and the zink code using |
| 15 | dri3_check_multibuffer(). |
| 16 | |
| 17 | Fixes: 1887368df41 ("glx/sw: check for modifier support in the kopper path") |
| 18 | |
| 19 | Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27478] |
| 20 | Signed-off-by: Romain Naour <romain.naour@smile.fr> |
| 21 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 22 | --- |
| 23 | src/glx/drisw_glx.c | 4 ++++ |
| 24 | 1 file changed, 4 insertions(+) |
| 25 | |
| 26 | diff --git a/src/glx/drisw_glx.c b/src/glx/drisw_glx.c |
| 27 | index 3d3f752..4b19e2d 100644 |
| 28 | --- a/src/glx/drisw_glx.c |
| 29 | +++ b/src/glx/drisw_glx.c |
| 30 | @@ -32,7 +32,9 @@ |
| 31 | #include <dlfcn.h> |
| 32 | #include "dri_common.h" |
| 33 | #include "drisw_priv.h" |
| 34 | +#ifdef HAVE_DRI3 |
| 35 | #include "dri3_priv.h" |
| 36 | +#endif |
| 37 | #include <X11/extensions/shmproto.h> |
| 38 | #include <assert.h> |
| 39 | #include <vulkan/vulkan_core.h> |
| 40 | @@ -995,6 +997,7 @@ driswCreateScreenDriver(int screen, struct glx_display *priv, |
| 41 | goto handle_error; |
| 42 | } |
| 43 | |
| 44 | +#ifdef HAVE_DRI3 |
| 45 | if (pdpyp->zink) { |
| 46 | bool err; |
| 47 | psc->has_multibuffer = dri3_check_multibuffer(priv->dpy, &err); |
| 48 | @@ -1005,6 +1008,7 @@ driswCreateScreenDriver(int screen, struct glx_display *priv, |
| 49 | goto handle_error; |
| 50 | } |
| 51 | } |
| 52 | +#endif |
| 53 | |
| 54 | glx_config_destroy_list(psc->base.configs); |
| 55 | psc->base.configs = configs; |
| 56 | -- |
| 57 | 2.44.0 |
| 58 | |