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

Author: Dave Airlie <airl...@redhat.com>
Date:   Thu Oct 13 12:43:07 2016 +1000

anv/wsi: fix apps that acquire multiple images up front

This fix was found in the radv codebase when running dota2,
no idea if anyone has reported it on anv, but the same problem
occurs.

Once an image is acquired we need to mark it busy.

Acked-by: Edward O'Callaghan <funfunc...@folklore1984.net>
Cc: "12.0" <mesa-sta...@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airl...@redhat.com>

---

 src/intel/vulkan/anv_wsi_wayland.c | 1 +
 src/intel/vulkan/anv_wsi_x11.c     | 1 +
 2 files changed, 2 insertions(+)

diff --git a/src/intel/vulkan/anv_wsi_wayland.c 
b/src/intel/vulkan/anv_wsi_wayland.c
index afce96f..e6cc09f 100644
--- a/src/intel/vulkan/anv_wsi_wayland.c
+++ b/src/intel/vulkan/anv_wsi_wayland.c
@@ -523,6 +523,7 @@ wsi_wl_swapchain_acquire_next_image(struct anv_swapchain 
*anv_chain,
          if (!chain->images[i].busy) {
             /* We found a non-busy image */
             *image_index = i;
+            chain->images[image_index].busy = true;
             return VK_SUCCESS;
          }
       }
diff --git a/src/intel/vulkan/anv_wsi_x11.c b/src/intel/vulkan/anv_wsi_x11.c
index 010c86c..5748506 100644
--- a/src/intel/vulkan/anv_wsi_x11.c
+++ b/src/intel/vulkan/anv_wsi_x11.c
@@ -574,6 +574,7 @@ x11_acquire_next_image(struct anv_swapchain *anv_chain,
             /* We found a non-busy image */
             xshmfence_await(chain->images[i].shm_fence);
             *image_index = i;
+            chain->images[i].busy = true;
             return VK_SUCCESS;
          }
       }

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to