aboutsummaryrefslogtreecommitdiffstats
path: root/src/freedreno/vulkan/tu_fence.c
diff options
context:
space:
mode:
authorJonathan Marek <[email protected]>2019-11-24 09:42:43 -0500
committerJonathan Marek <[email protected]>2019-12-02 14:29:47 -0500
commitbebfb17a2b50f9890262e9c713cbb138796a1819 (patch)
tree55a8a461b0b68355ba67eb457da102ee93108bef /src/freedreno/vulkan/tu_fence.c
parent5404b7aaa36fad18df19e12abcc8af69014e74c2 (diff)
turnip: fix display wsi fence timing out
Fixes: df9f2adf ("turnip: add display wsi") Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/freedreno/vulkan/tu_fence.c')
-rw-r--r--src/freedreno/vulkan/tu_fence.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/freedreno/vulkan/tu_fence.c b/src/freedreno/vulkan/tu_fence.c
index 68c1f31c0b8..9e4a92370f8 100644
--- a/src/freedreno/vulkan/tu_fence.c
+++ b/src/freedreno/vulkan/tu_fence.c
@@ -211,6 +211,10 @@ tu_fence_init_poll_fds(uint32_t fence_count,
for (uint32_t i = 0; i < fence_count; i++) {
TU_FROM_HANDLE(tu_fence, fence, fences[i]);
+ /* skip wsi fences */
+ if (fence->fence_wsi)
+ continue;
+
if (fence->signaled) {
if (wait_all) {
/* skip signaled fences */
@@ -292,6 +296,10 @@ tu_fence_update_fences_and_poll_fds(uint32_t fence_count,
for (uint32_t i = 0; i < fence_count; i++) {
TU_FROM_HANDLE(tu_fence, fence, fences[i]);
+ /* skip wsi fences */
+ if (fence->fence_wsi)
+ continue;
+
/* no signaled fence in fds */
if (fence->signaled)
continue;
@@ -352,6 +360,9 @@ tu_WaitForFences(VkDevice _device,
if (fds != stack_fds)
vk_free(&device->alloc, fds);
+ if (result != VK_SUCCESS)
+ return result;
+
for (uint32_t i = 0; i < fenceCount; ++i) {
TU_FROM_HANDLE(tu_fence, fence, pFences[i]);
if (fence->fence_wsi) {