mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-03-14 06:30:26 +01:00
pvr: fix src/dst image formats for DS resolve ops
This change only addresses the clear of one channel via the TQ for DS
formats. This is exercised by VK_KHR_depth_stencil_resolve in two ways:
resolve depth and clear stencil, or resolve stencil and clear depth.
When resolving, we need to propagate source and destination format if the
DS format is combined because we need either combination of both for cases
where the DSMERGE and PICKD flags are set.
- Resolve op
+ For combined DS formats
1. resolve the stencil from the source merging it with the depth of the
destination. Leave source depth unchanged.
2. resolve the depth from the source merging it with the stencil of the
destination. Leave the source stencil untouched.
+ For non-combined formats
1. we can use the source for all aspects / channels, this ensures the
size to blit the source to is compatible with the destination. Note
that the TQ doesn't require src/dst to be single channel formats.
- Non resolve op
+ Not part of this change.
Fix for deqp:
dEQP-VK.renderpass2.depth_stencil_resolve.*.*.d24_unorm_s8_uint.compatibility*
dEQP-VK.renderpass2.depth_stencil_resolve.*.*.d32_sfloat_s8_uint.compatibility*
Signed-off-by: Luigi Santivetti <luigi.santivetti@imgtec.com>
Co-authored-by: Leon Perianu <leon.perianu@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39654>
This commit is contained in:
parent
407e692c3c
commit
6a65b5dd4d
2 changed files with 10 additions and 21 deletions
|
|
@ -254,16 +254,4 @@ dEQP-VK.renderpasses.dynamic_rendering.primary_cmd_buff.random.seed99_multiview,
|
|||
dEQP-VK.renderpasses.dynamic_rendering.primary_cmd_buff.random.seed9_multiview,Fail
|
||||
dEQP-VK.renderpasses.dynamic_rendering.primary_cmd_buff.suballocation.attachment.4.568,Fail
|
||||
dEQP-VK.renderpasses.renderpass1.dedicated_allocation.attachment_allocation.input_output.71,Fail
|
||||
dEQP-VK.renderpasses.renderpass1.suballocation.attachment_allocation.input_output.71,Fail
|
||||
dEQP-VK.renderpasses.renderpass2.depth_stencil_resolve.image_2d_32_32.samples_2.d24_unorm_s8_uint.compatibility_depth_none_stencil_zero_testing_stencil,Fail
|
||||
dEQP-VK.renderpasses.renderpass2.depth_stencil_resolve.image_2d_32_32.samples_2.d24_unorm_s8_uint.compatibility_depth_zero_stencil_zero_testing_stencil,Crash
|
||||
dEQP-VK.renderpasses.renderpass2.depth_stencil_resolve.image_2d_32_32.samples_2.d24_unorm_s8_uint_separate_layouts.compatibility_depth_none_stencil_zero_testing_stencil,Fail
|
||||
dEQP-VK.renderpasses.renderpass2.depth_stencil_resolve.image_2d_32_32.samples_2.d24_unorm_s8_uint_separate_layouts.compatibility_depth_zero_stencil_zero_testing_stencil,Fail
|
||||
dEQP-VK.renderpasses.renderpass2.depth_stencil_resolve.image_2d_32_32.samples_2.d32_sfloat_s8_uint.compatibility_depth_none_stencil_zero_testing_stencil,Fail
|
||||
dEQP-VK.renderpasses.renderpass2.depth_stencil_resolve.image_2d_32_32.samples_2.d32_sfloat_s8_uint.compatibility_depth_zero_stencil_none_testing_depth,Fail
|
||||
dEQP-VK.renderpasses.renderpass2.depth_stencil_resolve.image_2d_32_32.samples_2.d32_sfloat_s8_uint.compatibility_depth_zero_stencil_zero_testing_depth,Fail
|
||||
dEQP-VK.renderpasses.renderpass2.depth_stencil_resolve.image_2d_32_32.samples_2.d32_sfloat_s8_uint.compatibility_depth_zero_stencil_zero_testing_stencil,Fail
|
||||
dEQP-VK.renderpasses.renderpass2.depth_stencil_resolve.image_2d_32_32.samples_2.d32_sfloat_s8_uint_separate_layouts.compatibility_depth_none_stencil_zero_testing_stencil,Fail
|
||||
dEQP-VK.renderpasses.renderpass2.depth_stencil_resolve.image_2d_32_32.samples_2.d32_sfloat_s8_uint_separate_layouts.compatibility_depth_zero_stencil_none_testing_depth,Fail
|
||||
dEQP-VK.renderpasses.renderpass2.depth_stencil_resolve.image_2d_32_32.samples_2.d32_sfloat_s8_uint_separate_layouts.compatibility_depth_zero_stencil_zero_testing_depth,Fail
|
||||
dEQP-VK.renderpasses.renderpass2.depth_stencil_resolve.image_2d_32_32.samples_2.d32_sfloat_s8_uint_separate_layouts.compatibility_depth_zero_stencil_zero_testing_stencil,Fail
|
||||
dEQP-VK.renderpasses.renderpass1.suballocation.attachment_allocation.input_output.71,Fail
|
||||
|
|
@ -598,19 +598,20 @@ pvr_copy_or_resolve_image_region(struct pvr_cmd_buffer *cmd_buffer,
|
|||
}
|
||||
|
||||
if (src->vk.samples > dst->vk.samples) {
|
||||
/* Resolve op needs to know the actual format. */
|
||||
dst_format =
|
||||
vk_format_get_plane_aspect_format(dst->vk.format,
|
||||
region->dstSubresource.aspectMask);
|
||||
src_format = src->vk.format;
|
||||
if (pvr_vk_format_is_combined_ds(src->vk.format) &&
|
||||
dst->vk.format != VK_FORMAT_X8_D24_UNORM_PACK32) {
|
||||
dst_format = dst->vk.format;
|
||||
} else {
|
||||
dst_format = src_format;
|
||||
}
|
||||
} else {
|
||||
/* We don't care what format dst is as it's guaranteed to be size
|
||||
* compatible with src.
|
||||
*/
|
||||
dst_format = pvr_get_raw_copy_format(
|
||||
vk_format_get_plane_aspect_format(src->vk.format,
|
||||
region->srcSubresource.aspectMask));
|
||||
dst_format = pvr_get_raw_copy_format(src->vk.format);
|
||||
src_format = dst_format;
|
||||
}
|
||||
src_format = dst_format;
|
||||
|
||||
src_layers =
|
||||
vk_image_subresource_layer_count(&src->vk, ®ion->srcSubresource);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue