Mesa (master): turnip: LAYOUT_PREINITIALIZED is not different for optimal tiling

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Nov 5 18:25:16 UTC 2020


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

Author: Jonathan Marek <jonathan at marek.ca>
Date:   Tue Sep 29 22:20:32 2020 -0400

turnip: LAYOUT_PREINITIALIZED is not different for optimal tiling

Signed-off-by: Jonathan Marek <jonathan at marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6940>

---

 src/freedreno/vulkan/tu_cmd_buffer.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/src/freedreno/vulkan/tu_cmd_buffer.c b/src/freedreno/vulkan/tu_cmd_buffer.c
index 2b8394f9d3f..dfcaca99f42 100644
--- a/src/freedreno/vulkan/tu_cmd_buffer.c
+++ b/src/freedreno/vulkan/tu_cmd_buffer.c
@@ -3975,12 +3975,8 @@ tu_barrier(struct tu_cmd_buffer *cmd,
    enum tu_cmd_access_mask dst_flags = 0;
 
    for (uint32_t i = 0; i < imageMemoryBarrierCount; i++) {
-      TU_FROM_HANDLE(tu_image, image, pImageMemoryBarriers[i].image);
       VkImageLayout old_layout = pImageMemoryBarriers[i].oldLayout;
-      /* For non-linear images, PREINITIALIZED is the same as UNDEFINED */
-      if (old_layout == VK_IMAGE_LAYOUT_UNDEFINED ||
-          (image->tiling != VK_IMAGE_TILING_LINEAR &&
-           old_layout == VK_IMAGE_LAYOUT_PREINITIALIZED)) {
+      if (old_layout == VK_IMAGE_LAYOUT_UNDEFINED) {
          /* The underlying memory for this image may have been used earlier
           * within the same queue submission for a different image, which
           * means that there may be old, stale cache entries which are in the



More information about the mesa-commit mailing list