Skip to content

render: optionally clear buffer before rendering

Julia Tatz requested to merge jdtatz/wlroots:buffer-pass-clear into master

It's suboptimal to do it separately, and some drivers can do it for free this way. Prevents UNASSIGNED-BestPractices-vkCmdClearAttachments-clear-after-load warning when using the vulkan validation layer's best practices mode. I needed to separate out wlr_vk_render_format_setup from the render buffer to prevent having multiple per-buffer to support both loading & clearing, I used imageless framebuffers to do so since every driver supports it

Not sure if it's better to have both a boolean and the color by-value in the options, or if I should switch it to be a pointer to the clear color that's non-null when clearing.

Merge request reports