Browse Source

package/wlroots: enable vulkan renderer if possible

Enable the wlroots' Vulkan renderer if a suitable driver is being built.
Currently only Mesa provides Vulkan drivers, so gating the feature on
BR2_PACKAGE_MESA3D_VULKAN_DRIVER seems reasonable at the moment (and is
done at least by one other package already: pipewire).

Signed-off-by: Adrian Perez de Castro <aperez@igalia.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Adrian Perez de Castro 3 years ago
parent
commit
d7f7265125
1 changed files with 10 additions and 2 deletions
  1. 10 2
      package/wlroots/wlroots.mk

+ 10 - 2
package/wlroots/wlroots.mk

@@ -23,8 +23,9 @@ WLROOTS_DEPENDENCIES = \
 	wayland \
 	wayland-protocols
 
-WLROOTS_CONF_OPTS = -Dexamples=false -Dxcb-errors=disabled -Drenderers=gles2
+WLROOTS_CONF_OPTS = -Dexamples=false -Dxcb-errors=disabled
 
+WLROOTS_RENDERERS = gles2
 WLROOTS_BACKENDS = libinput drm
 
 ifeq ($(BR2_PACKAGE_WLROOTS_X11),y)
@@ -35,6 +36,13 @@ else
 WLROOTS_CONF_OPTS += -Dxwayland=disabled
 endif
 
-WLROOTS_CONF_OPTS += -Dbackends=$(subst $(space),$(comma),$(strip $(WLROOTS_BACKENDS)))
+ifeq ($(BR2_PACKAGE_MESA3D_VULKAN_DRIVER),y)
+WLROOTS_RENDERERS += vulkan
+WLROOTS_DEPENDENCIES += mesa3d
+endif
+
+WLROOTS_CONF_OPTS += \
+	-Dbackends=$(subst $(space),$(comma),$(strip $(WLROOTS_BACKENDS))) \
+	-Drenderers=$(subst $(space),$(comma),$(strip $(WLROOTS_RENDERERS)))
 
 $(eval $(meson-package))