This is achieved by rendering a quad in the clear color for each layer of each attachment being cleared. Right now we emit each clear in a separate job with a single attachment framebuffer, but in the future we may be able to extend the solution to using multiple render targets and clear multiple attachments with a single job.
7a39e5e9022 v3dv: implement partial color attachment clears
src/broadcom/vulkan/v3dv_cmd_buffer.c | 78 ++++--
src/broadcom/vulkan/v3dv_device.c | 2 +-
src/broadcom/vulkan/v3dv_meta_clear.c | 494 +++++++++++++++++++++++++++++++++-
src/broadcom/vulkan/v3dv_pipeline.c | 6 +
src/broadcom/vulkan/v3dv_private.h | 31 ++-
5 files changed, 587 insertions(+), 24 deletions(-)