/[packages]/cauldron/mesa/current/SOURCES/0014-glx-mandate-xf86vidmode-only-for-drm-dri-platforms.patch
ViewVC logotype

Contents of /cauldron/mesa/current/SOURCES/0014-glx-mandate-xf86vidmode-only-for-drm-dri-platforms.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1355920 - (show annotations) (download)
Sun Jan 13 14:22:00 2019 UTC (5 years, 3 months ago) by tmb
File size: 4542 byte(s)
add current fixes from upstream staging/18.3 branch
1 From 76dd56bfd54a5003a8f8744b59398b88b4703330 Mon Sep 17 00:00:00 2001
2 From: Emil Velikov <emil.velikov@collabora.com>
3 Date: Tue, 11 Dec 2018 16:20:40 +0000
4 Subject: [PATCH 14/78] glx: mandate xf86vidmode only for "drm" dri platforms
5
6 Currently we have the three dri "platforms" - drm, apple and windows.
7
8 Since xf86vidmode is a thing only for the drm one, adjust the
9 preprocessor guards and correctly check for the dependency.
10
11 v2: terminate the GLX_USE_WINDOWSGL hunk
12
13 Cc: Jon TURNEY <jon.turney@dronecode.org.uk>
14 Fixes: 5bc509363b6 ("glx: make xf86vidmode mandatory for direct rendering")
15 Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
16 Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
17 Acked-by: Eric Engestrom <eric.engestrom@intel.com>
18 (cherry picked from commit a95ec13879d4f04d01fc04a62503578e85c846a8)
19
20 Squashed with commit:
21
22 glx: Fix compilation with GLX_USE_WINDOWSGL
23
24 Sadly, the GLX_USE_APPLEGL and GLX_USE_WINDOWSGL cases are not identical
25 (because GLX_USE_WINDOWSGL uses vtables rather than a maze of ifdefs)
26
27 Include <sys/time.h> again, as functions prototyped by it are used in
28 the GLX_USE_WINDOWSGL path.
29
30 Make the include guard around the __glxGetMscRate() definition match the
31 one at it's declaration again, as it's referenced from dri_common.c
32 which is built for GLX_USE_WINDOWSGL.
33
34 Fixes: a95ec138 ("glx: mandate xf86vidmode only for "drm" dri platforms")
35 Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
36 Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
37 (cherry picked from commit d512b35b62ff928b880a67887d36f1568aaa5e4b)
38 ---
39 configure.ac | 4 ++--
40 meson.build | 4 ++--
41 src/glx/glxcmds.c | 6 +++++-
42 3 files changed, 9 insertions(+), 5 deletions(-)
43
44 diff --git a/configure.ac b/configure.ac
45 index a3d10cf40e..b1c6967afe 100644
46 --- a/configure.ac
47 +++ b/configure.ac
48 @@ -1716,6 +1716,8 @@ xdri)
49 if test x"$enable_dri" = xyes; then
50 dri_modules="$dri_modules xcb-dri2 >= $XCBDRI2_REQUIRED"
51 fi
52 +
53 + dri_modules="$dri_modules xxf86vm"
54 fi
55 if test x"$dri_platform" = xapple ; then
56 DEFINES="$DEFINES -DGLX_USE_APPLEGL"
57 @@ -1725,8 +1727,6 @@ xdri)
58 fi
59 fi
60
61 - dri_modules="$dri_modules xxf86vm"
62 -
63 PKG_CHECK_MODULES([DRIGL], [$dri_modules])
64 GL_PC_REQ_PRIV="$GL_PC_REQ_PRIV $dri_modules"
65 X11_INCLUDES="$X11_INCLUDES $DRIGL_CFLAGS"
66 diff --git a/meson.build b/meson.build
67 index 33f4e5ad3c..89f3eae92f 100644
68 --- a/meson.build
69 +++ b/meson.build
70 @@ -1350,7 +1350,6 @@ if with_platform_x11
71 dep_xdamage = dependency('xdamage', version : '>= 1.1')
72 dep_xfixes = dependency('xfixes')
73 dep_xcb_glx = dependency('xcb-glx', version : '>= 1.8.1')
74 - dep_xxf86vm = dependency('xxf86vm')
75 endif
76 if (with_any_vk or with_glx == 'dri' or
77 (with_gallium_vdpau or with_gallium_xvmc or with_gallium_va or
78 @@ -1377,6 +1376,7 @@ if with_platform_x11
79 if with_glx == 'dri'
80 if with_dri_platform == 'drm'
81 dep_dri2proto = dependency('dri2proto', version : '>= 2.8')
82 + dep_xxf86vm = dependency('xxf86vm')
83 endif
84 dep_glproto = dependency('glproto', version : '>= 1.4.14')
85 endif
86 @@ -1427,8 +1427,8 @@ elif with_glx == 'dri'
87 'xcb-glx >= 1.8.1']
88 if with_dri_platform == 'drm'
89 gl_priv_reqs += 'xcb-dri2 >= 1.8'
90 + gl_priv_reqs += 'xxf86vm'
91 endif
92 - gl_priv_reqs += 'xxf86vm'
93 endif
94 if dep_libdrm.found()
95 gl_priv_reqs += 'libdrm >= 2.4.75'
96 diff --git a/src/glx/glxcmds.c b/src/glx/glxcmds.c
97 index 79e3503be8..424008fd67 100644
98 --- a/src/glx/glxcmds.c
99 +++ b/src/glx/glxcmds.c
100 @@ -46,7 +46,9 @@
101 #include "util/debug.h"
102 #else
103 #include <sys/time.h>
104 +#ifndef GLX_USE_WINDOWSGL
105 #include <X11/extensions/xf86vmode.h>
106 +#endif /* GLX_USE_WINDOWSGL */
107 #endif
108 #endif
109
110 @@ -2069,6 +2071,7 @@ _X_HIDDEN GLboolean
111 __glxGetMscRate(struct glx_screen *psc,
112 int32_t * numerator, int32_t * denominator)
113 {
114 +#if !defined(GLX_USE_WINDOWSGL)
115 XF86VidModeModeLine mode_line;
116 int dot_clock;
117 int i;
118 @@ -2115,6 +2118,7 @@ __glxGetMscRate(struct glx_screen *psc,
119
120 return True;
121 }
122 +#endif
123
124 return False;
125 }
126 @@ -2140,7 +2144,7 @@ _X_HIDDEN GLboolean
127 __glXGetMscRateOML(Display * dpy, GLXDrawable drawable,
128 int32_t * numerator, int32_t * denominator)
129 {
130 -#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
131 +#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) && !defined(GLX_USE_WINDOWSGL)
132 __GLXDRIdrawable *draw = GetGLXDRIDrawable(dpy, drawable);
133
134 if (draw == NULL)
135 --
136 2.20.1
137

  ViewVC Help
Powered by ViewVC 1.1.30