mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-22 22:10:10 +01:00
vulkan: EXT_acquire_xlib_display requires libXrandr headers to build
When VK_USE_PLATFORM_XLIB_XRANDR_EXT is defined, vulkan.h includes
X11/extensions/Xrandr.h for the RROutput typedef which is used in
the vkGetRandROutputDisplayEXT interface.
Make sure we have the required header by checking during the build,
and also set CFLAGS to point at the right directory.
We don't need to link against the library as we don't use any
functions from there, so don't add the _LIBS value in the autotools
build.
Signed-off-by: Keith Packard <keithp@keithp.com>
Fixes: dbac8e25f8 "radv: Add EXT_acquire_xlib_display to radv driver [v2]"
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
This commit is contained in:
parent
f49d112a01
commit
3f960c1338
8 changed files with 13 additions and 5 deletions
|
|
@ -1881,6 +1881,8 @@ fi
|
||||||
if test x"$have_xlease" = xyes; then
|
if test x"$have_xlease" = xyes; then
|
||||||
randr_modules="x11-xcb xcb-randr"
|
randr_modules="x11-xcb xcb-randr"
|
||||||
PKG_CHECK_MODULES([XCB_RANDR], [$randr_modules])
|
PKG_CHECK_MODULES([XCB_RANDR], [$randr_modules])
|
||||||
|
xlib_randr_modules="xrandr"
|
||||||
|
PKG_CHECK_MODULES([XLIB_RANDR], [$xlib_randr_modules])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AM_CONDITIONAL(HAVE_PLATFORM_X11, echo "$platforms" | grep -q 'x11')
|
AM_CONDITIONAL(HAVE_PLATFORM_X11, echo "$platforms" | grep -q 'x11')
|
||||||
|
|
|
||||||
|
|
@ -1308,6 +1308,7 @@ dep_xcb_sync = null_dep
|
||||||
dep_xcb_xfixes = null_dep
|
dep_xcb_xfixes = null_dep
|
||||||
dep_xshmfence = null_dep
|
dep_xshmfence = null_dep
|
||||||
dep_xcb_xrandr = null_dep
|
dep_xcb_xrandr = null_dep
|
||||||
|
dep_xlib_xrandr = null_dep
|
||||||
if with_platform_x11
|
if with_platform_x11
|
||||||
if with_glx == 'xlib' or with_glx == 'gallium-xlib'
|
if with_glx == 'xlib' or with_glx == 'gallium-xlib'
|
||||||
dep_x11 = dependency('x11')
|
dep_x11 = dependency('x11')
|
||||||
|
|
@ -1356,6 +1357,7 @@ if with_platform_x11
|
||||||
endif
|
endif
|
||||||
if with_xlib_lease
|
if with_xlib_lease
|
||||||
dep_xcb_xrandr = dependency('xcb-randr', version : '>= 1.12')
|
dep_xcb_xrandr = dependency('xcb-randr', version : '>= 1.12')
|
||||||
|
dep_xlib_xrandr = dependency('xrandr', version : '>= 1.3')
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -90,7 +90,8 @@ endif
|
||||||
if HAVE_XLIB_LEASE
|
if HAVE_XLIB_LEASE
|
||||||
AM_CPPFLAGS += \
|
AM_CPPFLAGS += \
|
||||||
-DVK_USE_PLATFORM_XLIB_XRANDR_EXT \
|
-DVK_USE_PLATFORM_XLIB_XRANDR_EXT \
|
||||||
$(XCB_RANDR_CFLAGS)
|
$(XCB_RANDR_CFLAGS) \
|
||||||
|
$(XLIB_RANDR_CFLAGS)
|
||||||
|
|
||||||
VULKAN_LIB_DEPS += $(XCB_RANDR_LIBS)
|
VULKAN_LIB_DEPS += $(XCB_RANDR_LIBS)
|
||||||
endif
|
endif
|
||||||
|
|
|
||||||
|
|
@ -121,7 +121,7 @@ if with_platform_drm
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if with_xlib_lease
|
if with_xlib_lease
|
||||||
radv_deps += dep_xcb_xrandr
|
radv_deps += [dep_xcb_xrandr, dep_xlib_xrandr]
|
||||||
radv_flags += '-DVK_USE_PLATFORM_XLIB_XRANDR_EXT'
|
radv_flags += '-DVK_USE_PLATFORM_XLIB_XRANDR_EXT'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -202,7 +202,8 @@ endif
|
||||||
if HAVE_XLIB_LEASE
|
if HAVE_XLIB_LEASE
|
||||||
VULKAN_CPPFLAGS += \
|
VULKAN_CPPFLAGS += \
|
||||||
-DVK_USE_PLATFORM_XLIB_XRANDR_EXT \
|
-DVK_USE_PLATFORM_XLIB_XRANDR_EXT \
|
||||||
$(XCB_RANDR_CFLAGS)
|
$(XCB_RANDR_CFLAGS) \
|
||||||
|
$(XLIB_RANDR_CFLAGS)
|
||||||
VULKAN_LIB_DEPS += $(XCB_RANDR_LIBS)
|
VULKAN_LIB_DEPS += $(XCB_RANDR_LIBS)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -170,7 +170,7 @@ if with_platform_drm
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if with_xlib_lease
|
if with_xlib_lease
|
||||||
anv_deps += dep_xcb_xrandr
|
anv_deps += [dep_xcb_xrandr, dep_xlib_xrandr]
|
||||||
anv_flags += '-DVK_USE_PLATFORM_XLIB_XRANDR_EXT'
|
anv_flags += '-DVK_USE_PLATFORM_XLIB_XRANDR_EXT'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -63,6 +63,8 @@ endif
|
||||||
|
|
||||||
if HAVE_XLIB_LEASE
|
if HAVE_XLIB_LEASE
|
||||||
AM_CPPFLAGS += \
|
AM_CPPFLAGS += \
|
||||||
|
$(XCB_RANDR_CFLAGS) \
|
||||||
|
$(XLIB_RANDR_CFLAGS) \
|
||||||
-DVK_USE_PLATFORM_XLIB_XRANDR_EXT
|
-DVK_USE_PLATFORM_XLIB_XRANDR_EXT
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,7 @@ if with_platform_drm
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if with_xlib_lease
|
if with_xlib_lease
|
||||||
vulkan_wsi_deps += dep_xcb_xrandr
|
vulkan_wsi_deps += [dep_xcb_xrandr, dep_xlib_xrandr]
|
||||||
vulkan_wsi_args += '-DVK_USE_PLATFORM_XLIB_XRANDR_EXT'
|
vulkan_wsi_args += '-DVK_USE_PLATFORM_XLIB_XRANDR_EXT'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue