v3dv: support blitting both depth and stencil aspects at the same time
authorIago Toral Quiroga <itoral@igalia.com>
Thu, 7 May 2020 12:09:28 +0000 (14:09 +0200)
committerMarge Bot <eric+marge@anholt.net>
Tue, 13 Oct 2020 21:21:30 +0000 (21:21 +0000)
commitdf364f9e107d19a830c4803609d42181a2b0b318
tree899efe73ce2d1fbcf1f22448efe5c30335465917
parent0a3c7ac9fad1d135b6536d44a606c9b37711c210
v3dv: support blitting both depth and stencil aspects at the same time

In "v3dv: implement stencil aspect blits for combined depth/stencil format"
we only implemented the support we needed to implement partial copies.
Copies only allow to copy a single aspect, so we really only supported blitting
either the depth aspect or the stencil aspect, but not both, however,
actual blits (as per vkCmdBlitImage) allow to blit both stencil and depth
aspects at the same time, so this adds support for that.

Finally, this also fixes the fact that we were not really masking color writes
effectively for stencil-only blits, since create_blit_pipeline() would check
the requested aspect to see if it would need to mask writes, but by the time
we called this, we had already switched the aspect to color. The reason this
was not caught before is that for copies this would only mean that when we
copied stencil we would also copy depth, and the image copy CTS tests are
probably copying both aspects anyway.

Fixes:
dEQP-VK.api.copy_and_blit.core.blit_image.all_formats.depth_stencil.*d24_unorm_s8_uint*

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6766>
src/broadcom/vulkan/v3dv_meta_copy.c