2021-02-21 18:30:12 +01:00
|
|
|
/*
|
|
|
|
* 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
|
|
|
|
|
2022-05-23 15:54:36 +02:00
|
|
|
#include <vulkan/vulkan_core.h>
|
2021-02-21 18:30:12 +01:00
|
|
|
#include <wlr/render/wlr_renderer.h>
|
|
|
|
|
2022-05-23 15:54:36 +02:00
|
|
|
struct wlr_vk_image_attribs {
|
|
|
|
VkImage image;
|
|
|
|
VkImageLayout layout;
|
|
|
|
VkFormat format;
|
|
|
|
};
|
|
|
|
|
2021-02-21 18:30:12 +01:00
|
|
|
struct wlr_renderer *wlr_vk_renderer_create_with_drm_fd(int drm_fd);
|
2022-05-23 15:54:36 +02:00
|
|
|
|
|
|
|
VkInstance wlr_vk_renderer_get_instance(struct wlr_renderer *renderer);
|
|
|
|
VkPhysicalDevice wlr_vk_renderer_get_physical_device(struct wlr_renderer *renderer);
|
|
|
|
VkDevice wlr_vk_renderer_get_device(struct wlr_renderer *renderer);
|
|
|
|
uint32_t wlr_vk_renderer_get_queue_family(struct wlr_renderer *renderer);
|
|
|
|
void wlr_vk_renderer_get_current_image_attribs(struct wlr_renderer *renderer,
|
|
|
|
struct wlr_vk_image_attribs *attribs);
|
|
|
|
|
|
|
|
bool wlr_renderer_is_vk(struct wlr_renderer *wlr_renderer);
|
2021-02-21 18:30:12 +01:00
|
|
|
bool wlr_texture_is_vk(struct wlr_texture *texture);
|
|
|
|
|
2022-05-23 15:54:36 +02:00
|
|
|
void wlr_vk_texture_get_image_attribs(struct wlr_texture *texture,
|
|
|
|
struct wlr_vk_image_attribs *attribs);
|
|
|
|
|
2021-02-21 18:30:12 +01:00
|
|
|
#endif
|
|
|
|
|