Merge branch 'vulkan-software' into 'master'

Draft: render/vulkan: add support for software rendering

See merge request wlroots/wlroots!3440
This commit is contained in:
Simon Ser 2022-08-20 13:04:41 +00:00
commit ea2a22d4b4
6 changed files with 215 additions and 26 deletions

View file

@ -58,12 +58,14 @@ struct wlr_vk_device {
struct {
PFN_vkGetMemoryFdPropertiesKHR getMemoryFdPropertiesKHR;
PFN_vkGetMemoryHostPointerPropertiesEXT getMemoryHostPointerPropertiesEXT;
} api;
uint32_t format_prop_count;
struct wlr_vk_format_props *format_props;
struct wlr_drm_format_set dmabuf_render_formats;
struct wlr_drm_format_set dmabuf_texture_formats;
struct wlr_drm_format_set shm_render_formats;
// supported formats for textures (contains only those formats
// that support everything we need for textures)
@ -260,6 +262,9 @@ VkImage vulkan_import_dmabuf(struct wlr_vk_renderer *renderer,
const struct wlr_dmabuf_attributes *attribs,
VkDeviceMemory mems[static WLR_DMABUF_MAX_PLANES], uint32_t *n_mems,
bool for_render);
VkImage vulkan_import_host_memory(struct wlr_vk_renderer *renderer,
void *host_ptr, uint32_t format, uint32_t width, uint32_t height,
uint32_t stride, VkDeviceMemory *mem, bool for_render);
struct wlr_texture *vulkan_texture_from_buffer(
struct wlr_renderer *wlr_renderer, struct wlr_buffer *buffer);
void vulkan_texture_destroy(struct wlr_vk_texture *texture);