mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-02-06 13:54:14 +01:00
[dxvk] Fixed command buffer synchronization
This commit is contained in:
parent
16caa10697
commit
44d8d6b8c3
@ -40,7 +40,6 @@ namespace dxvk {
|
|||||||
|
|
||||||
|
|
||||||
DxvkCommandList::~DxvkCommandList() {
|
DxvkCommandList::~DxvkCommandList() {
|
||||||
this->synchronize();
|
|
||||||
this->reset();
|
this->reset();
|
||||||
|
|
||||||
m_vkd->vkDestroyCommandPool(m_vkd->device(), m_pool, nullptr);
|
m_vkd->vkDestroyCommandPool(m_vkd->device(), m_pool, nullptr);
|
||||||
|
@ -226,23 +226,25 @@ namespace dxvk {
|
|||||||
commandList->trackResource(wakeSync);
|
commandList->trackResource(wakeSync);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
VkResult status;
|
||||||
|
|
||||||
{ // Queue submissions are not thread safe
|
{ // Queue submissions are not thread safe
|
||||||
std::lock_guard<std::mutex> lock(m_submissionLock);
|
std::lock_guard<std::mutex> lock(m_submissionLock);
|
||||||
|
|
||||||
const VkResult status = commandList->submit(
|
status = commandList->submit(
|
||||||
m_graphicsQueue, waitSemaphore, wakeSemaphore);
|
m_graphicsQueue, waitSemaphore, wakeSemaphore);
|
||||||
|
}
|
||||||
|
|
||||||
if (status != VK_SUCCESS) {
|
if (status == VK_SUCCESS) {
|
||||||
|
// Add this to the set of running submissions
|
||||||
|
m_submissionQueue.submit(commandList);
|
||||||
|
} else {
|
||||||
Logger::err(str::format(
|
Logger::err(str::format(
|
||||||
"DxvkDevice: Command buffer submission failed: ",
|
"DxvkDevice: Command buffer submission failed: ",
|
||||||
status));
|
status));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add this to the set of running submissions
|
|
||||||
m_submissionQueue.submit(commandList);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void DxvkDevice::waitForIdle() {
|
void DxvkDevice::waitForIdle() {
|
||||||
if (m_vkd->vkDeviceWaitIdle(m_vkd->device()) != VK_SUCCESS)
|
if (m_vkd->vkDeviceWaitIdle(m_vkd->device()) != VK_SUCCESS)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user