Mesa (main): radv: always decompress both aspects of a depth/stencil image

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Jun 18 12:46:05 UTC 2021


Module: Mesa
Branch: main
Commit: 213c4c5f44f0f731a2c7538405612eea81f874fa
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=213c4c5f44f0f731a2c7538405612eea81f874fa

Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date:   Wed Jun  9 14:26:15 2021 +0200

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 at gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11263>

---

 src/amd/ci/deqp-radv-bonaire-aco-fails.txt |  7 -------
 src/amd/ci/deqp-radv-oland-aco-fails.txt   |  8 --------
 src/amd/ci/deqp-radv-stoney-aco-fails.txt  | 18 ------------------
 src/amd/vulkan/radv_meta_decompress.c      | 10 +---------
 4 files changed, 1 insertion(+), 42 deletions(-)

diff --git a/src/amd/ci/deqp-radv-bonaire-aco-fails.txt b/src/amd/ci/deqp-radv-bonaire-aco-fails.txt
index 9dbff85f376..ca97b9c870c 100644
--- a/src/amd/ci/deqp-radv-bonaire-aco-fails.txt
+++ b/src/amd/ci/deqp-radv-bonaire-aco-fails.txt
@@ -34,10 +34,3 @@ dEQP-VK.robustness.buffer_access.through_pointers.graphics.writes.vertex.3B_in_m
 dEQP-VK.robustness.buffer_access.through_pointers.graphics.writes.vertex.3B_in_memory_with_scalar_u64,Fail
 dEQP-VK.robustness.buffer_access.through_pointers.graphics.writes.vertex.3B_in_memory_with_vec4_s64,Fail
 dEQP-VK.robustness.buffer_access.through_pointers.graphics.writes.vertex.3B_in_memory_with_vec4_u64,Fail
-
-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/ci/deqp-radv-oland-aco-fails.txt b/src/amd/ci/deqp-radv-oland-aco-fails.txt
index 54ec5b19552..ca97b9c870c 100644
--- a/src/amd/ci/deqp-radv-oland-aco-fails.txt
+++ b/src/amd/ci/deqp-radv-oland-aco-fails.txt
@@ -34,11 +34,3 @@ dEQP-VK.robustness.buffer_access.through_pointers.graphics.writes.vertex.3B_in_m
 dEQP-VK.robustness.buffer_access.through_pointers.graphics.writes.vertex.3B_in_memory_with_scalar_u64,Fail
 dEQP-VK.robustness.buffer_access.through_pointers.graphics.writes.vertex.3B_in_memory_with_vec4_s64,Fail
 dEQP-VK.robustness.buffer_access.through_pointers.graphics.writes.vertex.3B_in_memory_with_vec4_u64,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/ci/deqp-radv-stoney-aco-fails.txt b/src/amd/ci/deqp-radv-stoney-aco-fails.txt
index efd65cadfcf..11cf136eebf 100644
--- a/src/amd/ci/deqp-radv-stoney-aco-fails.txt
+++ b/src/amd/ci/deqp-radv-stoney-aco-fails.txt
@@ -60,15 +60,6 @@ dEQP-VK.api.image_clearing.dedicated_allocation.clear_depth_stencil_image.single
 dEQP-VK.api.image_clearing.dedicated_allocation.clear_depth_stencil_image.single_layer.d32_sfloat_s8_uint_separate_layouts_stencil_1x33,Fail
 # See https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9049
 dEQP-VK.pipeline.timestamp.calibrated.calibration_test,Fail
-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.renderpass.suballocation.subpass_dependencies.late_fragment_tests.render_size_32_32.subpass_count_2.d32_sfloat_s8_uint,Fail
-dEQP-VK.renderpass.suballocation.subpass_dependencies.late_fragment_tests.render_size_32_32.subpass_count_3.d32_sfloat_s8_uint,Fail
-dEQP-VK.renderpass.suballocation.subpass_dependencies.late_fragment_tests.render_size_32_32.subpass_count_5.d32_sfloat_s8_uint,Fail
-dEQP-VK.renderpass.suballocation.subpass_dependencies.late_fragment_tests.render_size_64_64.subpass_count_2.d32_sfloat_s8_uint,Fail
-dEQP-VK.renderpass.suballocation.subpass_dependencies.late_fragment_tests.render_size_64_64.subpass_count_3.d32_sfloat_s8_uint,Fail
-dEQP-VK.renderpass.suballocation.subpass_dependencies.late_fragment_tests.render_size_64_64.subpass_count_5.d32_sfloat_s8_uint,Fail
 dEQP-VK.renderpass2.depth_stencil_resolve.image_2d_49_13.samples_2.d16_unorm_s8_uint.depth_average_stencil_max_testing_stencil,Fail
 dEQP-VK.renderpass2.depth_stencil_resolve.image_2d_49_13.samples_2.d16_unorm_s8_uint.depth_average_stencil_max_unused_resolve_testing_stencil,Fail
 dEQP-VK.renderpass2.depth_stencil_resolve.image_2d_49_13.samples_2.d16_unorm_s8_uint.depth_average_stencil_min_testing_stencil,Fail
@@ -297,15 +288,6 @@ dEQP-VK.renderpass2.depth_stencil_resolve.image_2d_49_13.samples_8.d16_unorm_s8_
 dEQP-VK.renderpass2.depth_stencil_resolve.image_2d_49_13.samples_8.d16_unorm_s8_uint_separate_layouts.depth_zero_stencil_none_unused_resolve_testing_stencil,Fail
 dEQP-VK.renderpass2.depth_stencil_resolve.image_2d_49_13.samples_8.d16_unorm_s8_uint_separate_layouts.depth_zero_stencil_zero_testing_stencil,Fail
 dEQP-VK.renderpass2.depth_stencil_resolve.image_2d_49_13.samples_8.d16_unorm_s8_uint_separate_layouts.depth_zero_stencil_zero_unused_resolve_testing_stencil,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
-dEQP-VK.renderpass2.suballocation.subpass_dependencies.late_fragment_tests.render_size_32_32.subpass_count_2.d32_sfloat_s8_uint,Fail
-dEQP-VK.renderpass2.suballocation.subpass_dependencies.late_fragment_tests.render_size_32_32.subpass_count_3.d32_sfloat_s8_uint,Fail
-dEQP-VK.renderpass2.suballocation.subpass_dependencies.late_fragment_tests.render_size_32_32.subpass_count_5.d32_sfloat_s8_uint,Fail
-dEQP-VK.renderpass2.suballocation.subpass_dependencies.late_fragment_tests.render_size_64_64.subpass_count_2.d32_sfloat_s8_uint,Fail
-dEQP-VK.renderpass2.suballocation.subpass_dependencies.late_fragment_tests.render_size_64_64.subpass_count_3.d32_sfloat_s8_uint,Fail
-dEQP-VK.renderpass2.suballocation.subpass_dependencies.late_fragment_tests.render_size_64_64.subpass_count_5.d32_sfloat_s8_uint,Fail
 dEQP-VK.robustness.buffer_access.through_pointers.compute.reads.1B_in_memory_with_scalar_s64,Fail
 dEQP-VK.robustness.buffer_access.through_pointers.compute.reads.1B_in_memory_with_vec4_s64,Fail
 dEQP-VK.robustness.buffer_access.through_pointers.compute.reads.3B_in_memory_with_scalar_s64,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;
 



More information about the mesa-commit mailing list