render/vulkan: Defer to renderpass clears when possible

Signed-off-by: Joshua Ashton <joshua@froggi.es>
This commit is contained in:
Joshua Ashton 2021-10-16 15:00:21 +01:00
parent 3a685b10b6
commit f53aeeb4d4
2 changed files with 76 additions and 30 deletions

View file

@ -129,7 +129,8 @@ void vulkan_format_props_finish(struct wlr_vk_format_props *props);
struct wlr_vk_render_format_setup {
struct wl_list link;
VkFormat render_format; // used in renderpass
VkRenderPass render_pass;
VkRenderPass render_pass_load;
VkRenderPass render_pass_clear;
VkPipeline tex_pipe;
VkPipeline quad_pipe;
@ -194,6 +195,10 @@ struct wlr_vk_renderer {
struct wl_list render_buffers; // wlr_vk_render_buffer
bool in_render_pass;
bool pending_render_pass_clear;
VkClearValue render_pass_clear_color;
struct {
VkCommandBuffer cb;
bool recording;