From e6c3f0479d6f565a1bdd2bcd4e2e6f5c2e6db77c Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Sat, 2 Nov 2019 16:08:51 +0100 Subject: [PATCH] [dxvk] Let device know that async presentation is enabled --- src/dxvk/dxvk_device.h | 13 ++++++++++++- src/dxvk/dxvk_queue.h | 8 ++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/src/dxvk/dxvk_device.h b/src/dxvk/dxvk_device.h index a692d13c..4154824f 100644 --- a/src/dxvk/dxvk_device.h +++ b/src/dxvk/dxvk_device.h @@ -388,7 +388,18 @@ namespace dxvk { const Rc& commandList, VkSemaphore waitSync, VkSemaphore wakeSync); - + + /** + * \brief Checks for async presentation support + * + * If this is \c false, synchronize with the + * present call immediately after submitting it. + * \returns \c true if async present is enabled + */ + bool hasAsyncPresent() const { + return m_submissionQueue.hasAsyncPresent(); + } + /** * \brief Locks submission queue * diff --git a/src/dxvk/dxvk_queue.h b/src/dxvk/dxvk_queue.h index 9387510e..8e7b7b16 100644 --- a/src/dxvk/dxvk_queue.h +++ b/src/dxvk/dxvk_queue.h @@ -104,6 +104,14 @@ namespace dxvk { return m_lastError.load(); } + /** + * \brief Checks whether asynchronous presentation is supported + * \returns \c true if presentation is asynchronous + */ + bool hasAsyncPresent() const { + return m_asyncPresent; + } + /** * \brief Submits a command list asynchronously *