render/vulkan: add caching to vulkan_read_pixels

This commit is contained in:
David96 2022-10-13 10:48:05 +02:00 committed by Simon Ser
parent 05454618cd
commit 7a42392da2
2 changed files with 88 additions and 53 deletions

View file

@ -189,6 +189,14 @@ struct wlr_vk_renderer {
bool recording;
struct wl_list buffers; // type wlr_vk_shared_buffer
} stage;
struct {
bool initialized;
uint32_t drm_format;
uint32_t width, height;
VkImage dst_image;
VkDeviceMemory dst_img_memory;
} read_pixels_cache;
};
// Creates a vulkan renderer for the given device.