vulkan: Add a clear op
authorBenjamin Otte <otte@redhat.com>
Wed, 12 Jul 2023 07:26:24 +0000 (09:26 +0200)
committerBenjamin Otte <otte@redhat.com>
Sun, 16 Jul 2023 11:16:15 +0000 (13:16 +0200)
commitbb2cd7225eb2eeaf2ab343af916eaeef1ceebb78
tree25a813afb896c7bd0fd6d6cfaffe73556c5e8b4e
parent5e1fd5634589509e0844c502a6e1143502750b0d
vulkan: Add a clear op

The op emits a vkCmdClearAttachments() with a given color. That can be
used with color nodes that are pixel-aligned and opaque to significantly
speed up rendering when the window background is a solid color.

However, currently this fails a bit outside of fullscreen when rounded
clip rectangles are in use to draw rounded corners.
gsk/meson.build
gsk/vulkan/gskvulkanclearop.c [new file with mode: 0644]
gsk/vulkan/gskvulkanclearopprivate.h [new file with mode: 0644]
gsk/vulkan/gskvulkanrenderpass.c