mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-02 10:24:12 +01:00
[dxvk] Support new Vulkan presenter in DxvkDevice
This commit is contained in:
parent
746529b71b
commit
81306cdc11
@ -254,6 +254,21 @@ namespace dxvk {
|
||||
}
|
||||
|
||||
|
||||
VkResult DxvkDevice::presentImage(
|
||||
const Rc<vk::Presenter>& presenter,
|
||||
VkSemaphore semaphore) {
|
||||
std::lock_guard<std::mutex> queueLock(m_submissionLock);
|
||||
VkResult status = presenter->presentImage(semaphore);
|
||||
|
||||
if (status != VK_SUCCESS)
|
||||
return status;
|
||||
|
||||
std::lock_guard<sync::Spinlock> statLock(m_statLock);
|
||||
m_statCounters.addCtr(DxvkStatCounter::QueuePresentCount, 1);
|
||||
return status;
|
||||
}
|
||||
|
||||
|
||||
void DxvkDevice::submitCommandList(
|
||||
const Rc<DxvkCommandList>& commandList,
|
||||
VkSemaphore waitSync,
|
||||
|
@ -24,6 +24,8 @@
|
||||
#include "dxvk_sync.h"
|
||||
#include "dxvk_unbound.h"
|
||||
|
||||
#include "../vulkan/vulkan_presenter.h"
|
||||
|
||||
namespace dxvk {
|
||||
|
||||
class DxvkInstance;
|
||||
@ -338,6 +340,18 @@ namespace dxvk {
|
||||
VkResult presentSwapImage(
|
||||
const VkPresentInfoKHR& presentInfo);
|
||||
|
||||
/**
|
||||
* \brief Presents a swap chain image
|
||||
*
|
||||
* Locks the device queues and invokes the
|
||||
* presenter's \c presentImage method.
|
||||
* \param [in] presenter The presenter
|
||||
* \param [in] semaphore Sync semaphore
|
||||
*/
|
||||
VkResult presentImage(
|
||||
const Rc<vk::Presenter>& presenter,
|
||||
VkSemaphore semaphore);
|
||||
|
||||
/**
|
||||
* \brief Submits a command list
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user