When translating combined depth/stencil blits to compatible color blits we
should look at the requested region aspects to decide the color
mask to apply.
Fixes:
dEQP-VK.api.copy_and_blit.*.buffer_to_depthstencil.buffer_offset_d24_unorm_s8_uint_D
dEQP-VK.api.copy_and_blit.*.buffer_to_depthstencil.buffer_offset_d24_unorm_s8_uint_SD
dEQP-VK.api.copy_and_blit.*.buffer_to_depthstencil.buffer_offset_d24_unorm_s8_uint_S_D
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6766>
break;
case VK_FORMAT_X8_D24_UNORM_PACK32:
case VK_FORMAT_D24_UNORM_S8_UINT:
- if (dst->aspects & VK_IMAGE_ASPECT_DEPTH_BIT) {
+ if (region.srcSubresource.aspectMask & VK_IMAGE_ASPECT_DEPTH_BIT) {
cmask |= VK_COLOR_COMPONENT_G_BIT |
VK_COLOR_COMPONENT_B_BIT |
VK_COLOR_COMPONENT_A_BIT;
}
- if (dst->aspects & VK_IMAGE_ASPECT_STENCIL_BIT) {
+ if (region.srcSubresource.aspectMask & VK_IMAGE_ASPECT_STENCIL_BIT) {
assert(dst_format == VK_FORMAT_D24_UNORM_S8_UINT);
cmask |= VK_COLOR_COMPONENT_R_BIT;
}