Module: Mesa
Branch: master
Commit: 2f79e0066405f80c3244d1cc814bc6a51d1d581a
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=2f79e0066405f80c3244d1cc814bc6a51d1d581a

Author: Samuel Iglesias Gonsálvez <[email protected]>
Date:   Thu Jul  9 16:10:19 2020 +0200

turnip: disable LRZ on vkCmdClearAttachments()

We don't support partial clears on LRZ. Blob disables them too.

Signed-off-by: Samuel Iglesias Gonsálvez <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5146>

---

 src/freedreno/vulkan/tu_clear_blit.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/freedreno/vulkan/tu_clear_blit.c 
b/src/freedreno/vulkan/tu_clear_blit.c
index cb70ebd02a9..f8ed2c1af42 100644
--- a/src/freedreno/vulkan/tu_clear_blit.c
+++ b/src/freedreno/vulkan/tu_clear_blit.c
@@ -2155,6 +2155,13 @@ tu_CmdClearAttachments(VkCommandBuffer commandBuffer,
    tu_cond_exec_start(cs, CP_COND_EXEC_0_RENDER_MODE_SYSMEM);
    tu_clear_sysmem_attachments(cmd, attachmentCount, pAttachments, rectCount, 
pRects);
    tu_cond_exec_end(cs);
+
+   for (uint32_t j = 0; j < attachmentCount; j++) {
+      if ((pAttachments[j].aspectMask & VK_IMAGE_ASPECT_DEPTH_BIT) == 0)
+         continue;
+      cmd->state.lrz.valid = false;
+      cmd->state.dirty |= TU_CMD_DIRTY_LRZ;
+   }
 }
 
 static void

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to