From 5b5ec1df7adf964a2be366b752c1cef1d424e41c Mon Sep 17 00:00:00 2001 From: hyzboy Date: Fri, 11 Mar 2022 18:27:04 +0800 Subject: [PATCH] added GPUDevice::WaitIdle function. --- example/common/VulkanAppFramework.h | 2 ++ inc/hgl/graph/VKDevice.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/example/common/VulkanAppFramework.h b/example/common/VulkanAppFramework.h index bc8e6d65..7d138508 100644 --- a/example/common/VulkanAppFramework.h +++ b/example/common/VulkanAppFramework.h @@ -327,6 +327,8 @@ public: if(win->IsVisible()) Draw(); + device->WaitIdle(); + return(true); } };//class VulkanApplicationFramework diff --git a/inc/hgl/graph/VKDevice.h b/inc/hgl/graph/VKDevice.h index b74822fa..e56010dd 100644 --- a/inc/hgl/graph/VKDevice.h +++ b/inc/hgl/graph/VKDevice.h @@ -96,6 +96,8 @@ public: const VkExtent2D & GetSwapchainSize ()const {return swapchainRT->GetExtent();} + void WaitIdle ()const {vkDeviceWaitIdle(attr->device);} + public: bool Resize (const VkExtent2D &);