From 812c8f6abe4d78a26c7f669f0fcbc07540b3c0d8 Mon Sep 17 00:00:00 2001 From: Connor Abbott Date: Tue, 14 Nov 2023 16:22:48 +0100 Subject: [PATCH] tu: Treat partially-bound depth/stencil attachments as passthrough Make sure to preserve the depth or stencil components of D24S8 using the fixed codepath just added. While we're here, fix the detection of whether an attachment is bound. Fixes: cb0f414b ("tu: Add support for suspending and resuming renderpasses") Part-of: --- src/freedreno/ci/freedreno-a618-fails.txt | 3 --- src/freedreno/ci/freedreno-a630-fails.txt | 3 --- src/freedreno/ci/freedreno-a750-fails.txt | 3 --- src/freedreno/vulkan/tu_pass.cc | 16 ++++++++-------- 4 files changed, 8 insertions(+), 17 deletions(-) diff --git a/src/freedreno/ci/freedreno-a618-fails.txt b/src/freedreno/ci/freedreno-a618-fails.txt index 2de6de3685b..8c1601576fc 100644 --- a/src/freedreno/ci/freedreno-a618-fails.txt +++ b/src/freedreno/ci/freedreno-a618-fails.txt @@ -318,6 +318,3 @@ spec@arb_gpu_shader_fp64@execution@arb_gpu_shader_fp64-gs-getuniformdv,Crash # We can't support VK_EXT_sample_locations on pre-A650 GPUs # See https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4665#note_473653 dEQP-VK.info.device_mandatory_features,Fail - -# Can be fixed by https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26154 -dEQP-VK.dynamic_rendering.primary_cmd_buff.basic.partial_binding_depth_stencil,Fail diff --git a/src/freedreno/ci/freedreno-a630-fails.txt b/src/freedreno/ci/freedreno-a630-fails.txt index aca8f4c622a..6bf11a469b9 100644 --- a/src/freedreno/ci/freedreno-a630-fails.txt +++ b/src/freedreno/ci/freedreno-a630-fails.txt @@ -315,6 +315,3 @@ dynamic-dEQP-VK.renderpass2.depth_stencil_resolve.image_2d_32_32.samples_2.d32_s # We can't support VK_EXT_sample_locations on pre-A650 GPUs # See https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4665#note_473653 dEQP-VK.info.device_mandatory_features,Fail - -# Can be fixed by https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26154 -dEQP-VK.dynamic_rendering.primary_cmd_buff.basic.partial_binding_depth_stencil,Fail diff --git a/src/freedreno/ci/freedreno-a750-fails.txt b/src/freedreno/ci/freedreno-a750-fails.txt index 86dc7145d71..c120a23be34 100644 --- a/src/freedreno/ci/freedreno-a750-fails.txt +++ b/src/freedreno/ci/freedreno-a750-fails.txt @@ -1,6 +1,3 @@ -# Can be fixed by https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26154 -dEQP-VK.dynamic_rendering.primary_cmd_buff.basic.partial_binding_depth_stencil,Fail - gmem-dEQP-VK.clipping.user_defined.clip_cull_distance_dynamic_index.vert_geom.6_2,Fail gmem-dEQP-VK.clipping.user_defined.clip_cull_distance_dynamic_index.vert_geom.6_2_fragmentshader_read,Fail gmem-dEQP-VK.draw.dynamic_rendering.complete_secondary_cmd_buff.scissor.dynamic_scissor_out_of_order_updates,Fail diff --git a/src/freedreno/vulkan/tu_pass.cc b/src/freedreno/vulkan/tu_pass.cc index d00c2f9677b..a41a8854c3b 100644 --- a/src/freedreno/vulkan/tu_pass.cc +++ b/src/freedreno/vulkan/tu_pass.cc @@ -1153,14 +1153,14 @@ tu_setup_dynamic_render_pass(struct tu_cmd_buffer *cmd_buffer, attachment_set_ops( device, att, - info->pDepthAttachment ? info->pDepthAttachment->loadOp - : VK_ATTACHMENT_LOAD_OP_DONT_CARE, - info->pStencilAttachment ? info->pStencilAttachment->loadOp - : VK_ATTACHMENT_LOAD_OP_DONT_CARE, - info->pDepthAttachment ? info->pDepthAttachment->storeOp - : VK_ATTACHMENT_STORE_OP_DONT_CARE, - info->pStencilAttachment ? info->pStencilAttachment->storeOp - : VK_ATTACHMENT_STORE_OP_DONT_CARE); + (info->pDepthAttachment && info->pDepthAttachment->imageView) ? + info->pDepthAttachment->loadOp : VK_ATTACHMENT_LOAD_OP_NONE_EXT, + (info->pStencilAttachment && info->pStencilAttachment->imageView) ? + info->pStencilAttachment->loadOp : VK_ATTACHMENT_LOAD_OP_NONE_EXT, + (info->pDepthAttachment && info->pDepthAttachment->imageView) ? + info->pDepthAttachment->storeOp : VK_ATTACHMENT_STORE_OP_NONE_EXT, + (info->pStencilAttachment && info->pStencilAttachment->imageView) ? + info->pStencilAttachment->storeOp : VK_ATTACHMENT_STORE_OP_NONE_EXT); subpass->samples = (VkSampleCountFlagBits) view->image->layout->nr_samples;