From 68afd1fa1730759317129e9656b20fcf98b643c9 Mon Sep 17 00:00:00 2001 From: nihui Date: Sat, 2 Mar 2019 15:51:29 +0800 Subject: [PATCH] reset fence --- src/allocator.cpp | 2 +- src/command.cpp | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/allocator.cpp b/src/allocator.cpp index 06e10d396..5e353ee11 100644 --- a/src/allocator.cpp +++ b/src/allocator.cpp @@ -829,7 +829,7 @@ VkBufferMemory* VkUnlockedStagingBufferAllocator::fastMalloc(size_t size) { budgets.erase(it); -// fprintf(stderr, "VkUnlockedStagingBufferAllocator M %p %lu reused %lu\n", ptr->buffer, size, bs); +// fprintf(stderr, "VkUnlockedStagingBufferAllocator M %p %lu reused %lu\n", ptr->buffer, size, capacity); return ptr; } diff --git a/src/command.cpp b/src/command.cpp index 879b52612..043d7d359 100644 --- a/src/command.cpp +++ b/src/command.cpp @@ -548,6 +548,13 @@ int VkCompute::reset() return -1; } + ret = vkResetFences(vkdev->vkdevice(), 1, &fence); + if (ret != VK_SUCCESS) + { + fprintf(stderr, "vkResetFences failed %d\n", ret); + return -1; + } + if (vkdev->info.support_VK_KHR_push_descriptor) { begin_command_buffer();