From 95476690e04dd700d0bed7c8c169aa1ae4525f81 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Wed, 9 Jun 2021 14:26:15 +0200 Subject: [PATCH] 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 Reviewed-by: Bas Nieuwenhuizen Part-of: (cherry picked from commit 213c4c5f44f0f731a2c7538405612eea81f874fa) --- .pick_status.json | 2 +- src/amd/ci/deqp-radv-oland-aco-fails.txt | 8 -------- src/amd/vulkan/radv_meta_decompress.c | 10 +--------- 3 files changed, 2 insertions(+), 18 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 30d7a818b11..b07e15533c8 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -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 }, diff --git a/src/amd/ci/deqp-radv-oland-aco-fails.txt b/src/amd/ci/deqp-radv-oland-aco-fails.txt index 322f0e907af..61bb6cbbafe 100644 --- a/src/amd/ci/deqp-radv-oland-aco-fails.txt +++ b/src/amd/ci/deqp-radv-oland-aco-fails.txt @@ -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 - diff --git a/src/amd/vulkan/radv_meta_decompress.c b/src/amd/vulkan/radv_meta_decompress.c index 73922d1d751..f206642b6b2 100644 --- a/src/amd/vulkan/radv_meta_decompress.c +++ b/src/amd/vulkan/radv_meta_decompress.c @@ -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;