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

Author: Danylo Piliaiev <[email protected]>
Date:   Thu Aug  5 18:45:40 2021 +0300

tu: disable gmem in primary cmdbuffer if secondary has it disabled

If secondary command buffer is emitted within a subpass it may have
barriers which forces us to disable gmem for current renderpass.

Fixes: 20547a110edb7913fc1176b9605498a58e691cb5 "tu: delay decision of forcing 
sysmem due to subpass self-dependencies"

Signed-off-by: Danylo Piliaiev <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12219>

---

 src/freedreno/vulkan/tu_cmd_buffer.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/freedreno/vulkan/tu_cmd_buffer.c 
b/src/freedreno/vulkan/tu_cmd_buffer.c
index 47aa21789fa..05a8a314288 100644
--- a/src/freedreno/vulkan/tu_cmd_buffer.c
+++ b/src/freedreno/vulkan/tu_cmd_buffer.c
@@ -2755,6 +2755,8 @@ tu_CmdExecuteCommands(VkCommandBuffer commandBuffer,
             cmd->state.has_tess = true;
          if (secondary->state.has_subpass_predication)
             cmd->state.has_subpass_predication = true;
+         if (secondary->state.disable_gmem)
+            cmd->state.disable_gmem = true;
       } else {
          assert(tu_cs_is_empty(&secondary->draw_cs));
          assert(tu_cs_is_empty(&secondary->draw_epilogue_cs));

Reply via email to