radv: always decompress both aspects of a depth/stencil image

If compressed rendering is only used for the depth aspect of a
depth/stencil image, stencil might also be compressed and it needs
to be decompressed. This only happens for non-TC compatible images.

As long as the driver needs to decompress the depth aspect, I don't
think that decompressing the stencil aspect introduces extra cost.

Fixes dEQP-VK.renderpass*late_fragment_tests*.d32_sfloat_s8_uint for
chips that don't support TC-compat HTILE.

Cc: 21.1 mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11263>
(cherry picked from commit 213c4c5f44)
This commit is contained in:
Samuel Pitoiset 2021-06-09 14:26:15 +02:00 committed by Eric Engestrom
parent 0b51040b5e
commit 95476690e0
3 changed files with 2 additions and 18 deletions

View file

@ -121,7 +121,7 @@
"description": "radv: always decompress both aspects of a depth/stencil image",
"nominated": true,
"nomination_type": 0,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null
},

View file

@ -2637,11 +2637,3 @@ dEQP-VK.glsl.texture_gather.offsets.min_required_offset.2d_array.rgba8ui.base_le
dEQP-VK.glsl.texture_gather.offsets.min_required_offset.2d_array.rgba8ui.base_level.sparse_level_2_amd_bias,Fail
dEQP-VK.glsl.texture_gather.offsets.min_required_offset.2d_array.rgba8ui.base_level.sparse_level_2_amd_lod,Fail
# Oland specific issues, might need further investigation
dEQP-VK.renderpass.suballocation.subpass_dependencies.late_fragment_tests.render_size_128_128.subpass_count_2.d32_sfloat_s8_uint,Fail
dEQP-VK.renderpass.suballocation.subpass_dependencies.late_fragment_tests.render_size_128_128.subpass_count_3.d32_sfloat_s8_uint,Fail
dEQP-VK.renderpass.suballocation.subpass_dependencies.late_fragment_tests.render_size_128_128.subpass_count_5.d32_sfloat_s8_uint,Fail
dEQP-VK.renderpass2.suballocation.subpass_dependencies.late_fragment_tests.render_size_128_128.subpass_count_2.d32_sfloat_s8_uint,Fail
dEQP-VK.renderpass2.suballocation.subpass_dependencies.late_fragment_tests.render_size_128_128.subpass_count_3.d32_sfloat_s8_uint,Fail
dEQP-VK.renderpass2.suballocation.subpass_dependencies.late_fragment_tests.render_size_128_128.subpass_count_5.d32_sfloat_s8_uint,Fail

View file

@ -324,17 +324,9 @@ radv_get_depth_pipeline(struct radv_cmd_buffer *cmd_buffer, struct radv_image *i
struct radv_meta_state *state = &cmd_buffer->device->meta_state;
uint32_t samples = image->info.samples;
uint32_t samples_log2 = ffs(samples) - 1;
enum radv_depth_decompress decompress;
enum radv_depth_decompress decompress = DECOMPRESS_DEPTH_STENCIL;
VkPipeline *pipeline;
if (subresourceRange->aspectMask == VK_IMAGE_ASPECT_DEPTH_BIT) {
decompress = DECOMPRESS_DEPTH;
} else if (subresourceRange->aspectMask == VK_IMAGE_ASPECT_STENCIL_BIT) {
decompress = DECOMPRESS_STENCIL;
} else {
decompress = DECOMPRESS_DEPTH_STENCIL;
}
if (!state->depth_decomp[samples_log2].decompress_pipeline[decompress]) {
VkResult ret;