v3dv: support blitting both depth and stencil aspects at the same time

Graphics / Mesa 3D Graphics Library / Mesa - Iago Toral Quiroga [igalia.com] - 13 October 2020 21:21 UTC

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:

df364f9e107 v3dv: support blitting both depth and stencil aspects at the same time
src/broadcom/vulkan/v3dv_meta_copy.c | 65 +++++++++++++++++++++---------------
1 file changed, 38 insertions(+), 27 deletions(-)

Upstream: cgit.freedesktop.org


  • Share