1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-01-18 02:52:10 +01:00

[dxvk] Fixed command buffer synchronization

This commit is contained in:
Philip Rebohle 2018-03-22 20:15:46 +01:00
parent 16caa10697
commit 44d8d6b8c3
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99
2 changed files with 11 additions and 10 deletions

View File

@ -40,7 +40,6 @@ namespace dxvk {
DxvkCommandList::~DxvkCommandList() {
this->synchronize();
this->reset();
m_vkd->vkDestroyCommandPool(m_vkd->device(), m_pool, nullptr);

View File

@ -226,21 +226,23 @@ namespace dxvk {
commandList->trackResource(wakeSync);
}
VkResult status;
{ // Queue submissions are not thread safe
std::lock_guard<std::mutex> lock(m_submissionLock);
const VkResult status = commandList->submit(
status = commandList->submit(
m_graphicsQueue, waitSemaphore, wakeSemaphore);
if (status != VK_SUCCESS) {
Logger::err(str::format(
"DxvkDevice: Command buffer submission failed: ",
status));
}
}
// Add this to the set of running submissions
m_submissionQueue.submit(commandList);
if (status == VK_SUCCESS) {
// Add this to the set of running submissions
m_submissionQueue.submit(commandList);
} else {
Logger::err(str::format(
"DxvkDevice: Command buffer submission failed: ",
status));
}
}