turnip: add LRZ valid tracking for secondary command buffers
authorSamuel Iglesias Gonsálvez <siglesias@igalia.com>
Thu, 18 Jun 2020 09:04:50 +0000 (11:04 +0200)
committerMarge Bot <eric+marge@anholt.net>
Fri, 2 Oct 2020 03:46:47 +0000 (03:46 +0000)
After a secondary command buffer is executed, LRZ is not valid
until it is cleared again.

Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5146>

src/freedreno/vulkan/tu_cmd_buffer.c

index 33dc17b..d1fb52e 100644 (file)
@@ -2754,6 +2754,13 @@ tu_CmdExecuteCommands(VkCommandBuffer commandBuffer,
    }
    cmd->state.dirty = ~0u; /* TODO: set dirty only what needs to be */
 
+   if (cmd->state.pass) {
+      /* After a secondary command buffer is executed, LRZ is not valid
+       * until it is cleared again.
+       */
+      cmd->state.lrz.valid = false;
+   }
+
    /* After executing secondary command buffers, there may have been arbitrary
     * flushes executed, so when we encounter a pipeline barrier with a
     * srcMask, we have to assume that we need to invalidate. Therefore we need