Mesa (main): radv: fix resume/suspend render pass with depth/stencil attachment

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Dec 8 09:26:30 UTC 2021


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

Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date:   Tue Dec  7 17:54:56 2021 +0100

radv: fix resume/suspend render pass with depth/stencil attachment

Shouldn't clear on resume.

This fixes dEQP-VK.dynamic_rendering.*resuming.

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/14113>

---

 src/amd/vulkan/radv_cmd_buffer.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c
index e2bc07caa7e..803834cd514 100644
--- a/src/amd/vulkan/radv_cmd_buffer.c
+++ b/src/amd/vulkan/radv_cmd_buffer.c
@@ -7551,6 +7551,17 @@ radv_CmdBeginRenderingKHR(VkCommandBuffer commandBuffer, const VkRenderingInfoKH
             att->stencilLoadOp = VK_ATTACHMENT_LOAD_OP_LOAD;
             att->stencilStoreOp = VK_ATTACHMENT_STORE_OP_STORE;
          }
+
+         if (pRenderingInfo->flags & VK_RENDERING_RESUMING_BIT_KHR) {
+            att->loadOp = VK_ATTACHMENT_LOAD_OP_LOAD;
+            att->stencilLoadOp = VK_ATTACHMENT_LOAD_OP_LOAD;
+         }
+
+         if (pRenderingInfo->flags & VK_RENDERING_SUSPENDING_BIT_KHR) {
+            att->storeOp = VK_ATTACHMENT_STORE_OP_STORE;
+            att->stencilStoreOp = VK_ATTACHMENT_STORE_OP_STORE;
+         }
+
          att->initialLayout = common_info->imageLayout;
          att->finalLayout = common_info->imageLayout;
 



More information about the mesa-commit mailing list