render/vulkan: use stage buffers for read_pixels

No need to roll our own cache machinery here, stage buffers
already do it (and more) for us. Should improve performance
when multiple screens with a different resolution are captured.

Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3525
This commit is contained in:
Simon Ser 2022-11-25 16:41:05 +01:00
parent 3ed69b4946
commit 7328cad84b
2 changed files with 37 additions and 90 deletions

View file

@ -207,14 +207,6 @@ struct wlr_vk_renderer {
uint64_t last_timeline_point;
struct wl_list buffers; // wlr_vk_shared_buffer.link
} 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.