summaryrefslogtreecommitdiffstats
path: root/src/amd/vulkan/radv_wsi_x11.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2016-10-13 12:38:49 +1000
committerDave Airlie <airlied@redhat.com>2016-10-14 04:45:11 +1000
commit8bdac874e667179bd2682f0111cd7db58b858e5b (patch)
treeb7d7a3d64efe96b73412e480f88f6b091a8ec862 /src/amd/vulkan/radv_wsi_x11.c
parentdfe74fd1a9e16647e0f2673d3676264f2a588a95 (diff)
downloadexternal_mesa3d-8bdac874e667179bd2682f0111cd7db58b858e5b.zip
external_mesa3d-8bdac874e667179bd2682f0111cd7db58b858e5b.tar.gz
external_mesa3d-8bdac874e667179bd2682f0111cd7db58b858e5b.tar.bz2
radv/wsi: fix app that acquire multiple images up front
dota2 does multiple acquires followed by multiple queues, this bug manifested itself as a hang in the xshmfence code randomly when dota2 was doing it's menus. It also occured when running dota2 under phoronix-test-suite. The fix is once the image is acquired to mark it busy then so nobody else can acquire. We have to trust vulkan apps that they will eventually submit it. Acked-by: Edward O'Callaghan <funfunctor@folklore1984.net> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'src/amd/vulkan/radv_wsi_x11.c')
-rw-r--r--src/amd/vulkan/radv_wsi_x11.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/amd/vulkan/radv_wsi_x11.c b/src/amd/vulkan/radv_wsi_x11.c
index 0aae2a3..9cd0db0 100644
--- a/src/amd/vulkan/radv_wsi_x11.c
+++ b/src/amd/vulkan/radv_wsi_x11.c
@@ -579,6 +579,7 @@ x11_acquire_next_image(struct radv_swapchain *radv_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;
}
}