aboutsummaryrefslogtreecommitdiff
path: root/include/wlr
diff options
context:
space:
mode:
authornyorain <nyorain@gmail.com>2021-02-21 18:30:12 +0100
committerSimon Ser <contact@emersion.fr>2021-10-18 11:51:13 +0200
commit8e346922508aa3eaccd6e12f2917f6574f349843 (patch)
tree550742b8a086287b6d478db1ade14b2cc4a21294 /include/wlr
parent2edf468aeb7d4703aa211cea3b58f04cbc73298c (diff)
render/vulkan: add Vulkan renderer
This new renderer is implemented with the existing wlr_renderer API (which is known to be sub-optimal for some operations). It's not used by default, but users can opt-in by setting WLR_RENDERER=vulkan. The renderer depends on VK_EXT_image_drm_format_modifier and VK_EXT_physical_device_drm. Co-authored-by: Simon Ser <contact@emersion.fr> Co-authored-by: Jan Beich <jbeich@FreeBSD.org>
Diffstat (limited to 'include/wlr')
-rw-r--r--include/wlr/config.h.in2
-rw-r--r--include/wlr/render/vulkan.h18
2 files changed, 20 insertions, 0 deletions
diff --git a/include/wlr/config.h.in b/include/wlr/config.h.in
index f8e55149..71868a34 100644
--- a/include/wlr/config.h.in
+++ b/include/wlr/config.h.in
@@ -7,6 +7,8 @@
#mesondefine WLR_HAS_GLES2_RENDERER
+#mesondefine WLR_HAS_VULKAN_RENDERER
+
#mesondefine WLR_HAS_XWAYLAND
#endif
diff --git a/include/wlr/render/vulkan.h b/include/wlr/render/vulkan.h
new file mode 100644
index 00000000..0302d85b
--- /dev/null
+++ b/include/wlr/render/vulkan.h
@@ -0,0 +1,18 @@
+/*
+ * This an unstable interface of wlroots. No guarantees are made regarding the
+ * future consistency of this API.
+ */
+#ifndef WLR_USE_UNSTABLE
+#error "Add -DWLR_USE_UNSTABLE to enable unstable wlroots features"
+#endif
+
+#ifndef WLR_RENDER_VULKAN_H
+#define WLR_RENDER_VULKAN_H
+
+#include <wlr/render/wlr_renderer.h>
+
+struct wlr_renderer *wlr_vk_renderer_create_with_drm_fd(int drm_fd);
+bool wlr_texture_is_vk(struct wlr_texture *texture);
+
+#endif
+