mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-03-02 04:29:14 +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(
|
void DxvkDevice::submitCommandList(
|
||||||
const Rc<DxvkCommandList>& commandList,
|
const Rc<DxvkCommandList>& commandList,
|
||||||
VkSemaphore waitSync,
|
VkSemaphore waitSync,
|
||||||
|
@ -24,6 +24,8 @@
|
|||||||
#include "dxvk_sync.h"
|
#include "dxvk_sync.h"
|
||||||
#include "dxvk_unbound.h"
|
#include "dxvk_unbound.h"
|
||||||
|
|
||||||
|
#include "../vulkan/vulkan_presenter.h"
|
||||||
|
|
||||||
namespace dxvk {
|
namespace dxvk {
|
||||||
|
|
||||||
class DxvkInstance;
|
class DxvkInstance;
|
||||||
@ -338,6 +340,18 @@ namespace dxvk {
|
|||||||
VkResult presentSwapImage(
|
VkResult presentSwapImage(
|
||||||
const VkPresentInfoKHR& presentInfo);
|
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
|
* \brief Submits a command list
|
||||||
*
|
*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user