mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-04-22 06:47:12 -04:00
wip: add support for Vulkan software rendering
VK_EXT_external_memory_host allows us to instruct llvmpipe to render to an existing chunk of memory.
This commit is contained in:
parent
77951968dc
commit
e2518ea9de
6 changed files with 215 additions and 26 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue