summaryrefslogtreecommitdiffstats
path: root/src/glx
diff options
context:
space:
mode:
authorEmil Velikov <[email protected]>2018-11-16 11:15:37 +0000
committerEmil Velikov <[email protected]>2018-11-20 11:13:20 +0000
commit5bc509363b6dbc42af72668fe500b6aec988dbf0 (patch)
treed9bf7beec454f84cbc96e3892d640aebba776f7e /src/glx
parent84445a86d192c0d7f07bc25a84080458de764149 (diff)
glx: make xf86vidmode mandatory for direct rendering
Currently we detect the module and if missing, the glXGetMsc* API is effectively a stub, always returning false. This is what effectively has been happening with our meson build :-( Thus users have no chance of using it - they cannot even distinguish if the failure is due to a misconfigured build. There's no reason for keeping xf86vidmode optional - it has been available in all distributions for years. Cc: [email protected] Signed-off-by: Emil Velikov <[email protected]> Acked-by: Dylan Baker <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Fixes: a47c525f3281a2753180e "meson: build glx"
Diffstat (limited to 'src/glx')
-rw-r--r--src/glx/Makefile.am5
-rw-r--r--src/glx/SConscript5
-rw-r--r--src/glx/glxcmds.c7
-rw-r--r--src/glx/meson.build6
4 files changed, 3 insertions, 20 deletions
diff --git a/src/glx/Makefile.am b/src/glx/Makefile.am
index d208ce14bb7..a66957d609b 100644
--- a/src/glx/Makefile.am
+++ b/src/glx/Makefile.am
@@ -24,10 +24,6 @@ SUBDIRS =
EXTRA_DIST = SConscript meson.build
-if HAVE_XF86VIDMODE
-EXTRA_DEFINES_XF86VIDMODE = -DXF86VIDMODE
-endif
-
AM_CFLAGS = \
-I$(top_srcdir)/include \
-I$(top_srcdir)/include/GL/internal \
@@ -38,7 +34,6 @@ AM_CFLAGS = \
-I$(top_builddir)/src/mapi/glapi \
-I$(top_srcdir)/src/mapi/glapi \
$(VISIBILITY_CFLAGS) \
- $(EXTRA_DEFINES_XF86VIDMODE) \
-D_REENTRANT \
$(DEFINES) \
$(LIBDRM_CFLAGS) \
diff --git a/src/glx/SConscript b/src/glx/SConscript
index 7555fb0568c..ce25a1faa84 100644
--- a/src/glx/SConscript
+++ b/src/glx/SConscript
@@ -35,10 +35,7 @@ env.Prepend(LIBS = [
env.PkgUseModules('X11')
env.PkgUseModules('XCB')
env.PkgUseModules('DRM')
-
-if env['HAVE_XF86VIDMODE']:
- env.Append(CPPDEFINES = ['XF86VIDMODE'])
- env.PkgUseModules('XF86VIDMODE')
+env.PkgUseModules('XF86VIDMODE')
sources = [
'clientattrib.c',
diff --git a/src/glx/glxcmds.c b/src/glx/glxcmds.c
index 3ed960fbf3c..b940c8ebdbe 100644
--- a/src/glx/glxcmds.c
+++ b/src/glx/glxcmds.c
@@ -46,11 +46,9 @@
#include "util/debug.h"
#else
#include <sys/time.h>
-#ifdef XF86VIDMODE
#include <X11/extensions/xf86vmode.h>
#endif
#endif
-#endif
#include <X11/Xlib-xcb.h>
#include <xcb/xcb.h>
@@ -2088,7 +2086,6 @@ _X_HIDDEN GLboolean
__glxGetMscRate(struct glx_screen *psc,
int32_t * numerator, int32_t * denominator)
{
-#ifdef XF86VIDMODE
XF86VidModeModeLine mode_line;
int dot_clock;
int i;
@@ -2135,8 +2132,6 @@ __glxGetMscRate(struct glx_screen *psc,
return True;
}
- else
-#endif
return False;
}
@@ -2162,7 +2157,7 @@ _X_HIDDEN GLboolean
__glXGetMscRateOML(Display * dpy, GLXDrawable drawable,
int32_t * numerator, int32_t * denominator)
{
-#if defined( GLX_DIRECT_RENDERING ) && defined( XF86VIDMODE )
+#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
__GLXDRIdrawable *draw = GetGLXDRIDrawable(dpy, drawable);
if (draw == NULL)
diff --git a/src/glx/meson.build b/src/glx/meson.build
index 1de35fca6bc..3fd74439b11 100644
--- a/src/glx/meson.build
+++ b/src/glx/meson.build
@@ -136,10 +136,6 @@ gl_lib_cargs = [
'-D_REENTRANT',
]
-if dep_xxf86vm.found()
- gl_lib_cargs += '-DHAVE_XF86VIDMODE'
-endif
-
libglx = static_library(
'glx',
[files_libglx, glx_generated],
@@ -166,7 +162,7 @@ if with_glx == 'dri'
link_args : [ld_args_bsymbolic, ld_args_gc_sections, extra_ld_args_libgl],
dependencies : [
dep_libdrm, dep_dl, dep_m, dep_thread, dep_x11, dep_xcb_glx, dep_xcb,
- dep_x11_xcb, dep_xcb_dri2, dep_xext, dep_xfixes, dep_xdamage,
+ dep_x11_xcb, dep_xcb_dri2, dep_xext, dep_xfixes, dep_xdamage, dep_xxf86vm,
extra_deps_libgl,
],
version : gl_lib_version,