From 8e346922508aa3eaccd6e12f2917f6574f349843 Mon Sep 17 00:00:00 2001 From: nyorain Date: Sun, 21 Feb 2021 18:30:12 +0100 Subject: 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 Co-authored-by: Jan Beich --- include/wlr/config.h.in | 2 ++ include/wlr/render/vulkan.h | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 include/wlr/render/vulkan.h (limited to 'include/wlr') 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 + +struct wlr_renderer *wlr_vk_renderer_create_with_drm_fd(int drm_fd); +bool wlr_texture_is_vk(struct wlr_texture *texture); + +#endif + -- cgit v1.2.3