mirror of
https://github.com/EduApps-CDG/OpenDX
synced 2024-12-30 09:45:37 +01:00
[dxvk] Lock queue around acquireNextImage
This commit is contained in:
parent
9cae049b53
commit
eb39cf4b11
@ -36,6 +36,10 @@ namespace dxvk {
|
|||||||
|
|
||||||
Rc<DxvkImageView> DxvkSwapchain::getImageView(
|
Rc<DxvkImageView> DxvkSwapchain::getImageView(
|
||||||
const Rc<DxvkSemaphore>& wakeSync) {
|
const Rc<DxvkSemaphore>& wakeSync) {
|
||||||
|
// AcquireNextImage might interfere with the Vulkan
|
||||||
|
// device queue internally, so we should lock it
|
||||||
|
m_device->lockSubmission();
|
||||||
|
|
||||||
VkResult status = this->acquireNextImage(wakeSync);
|
VkResult status = this->acquireNextImage(wakeSync);
|
||||||
|
|
||||||
if (status == VK_ERROR_OUT_OF_DATE_KHR) {
|
if (status == VK_ERROR_OUT_OF_DATE_KHR) {
|
||||||
@ -43,6 +47,8 @@ namespace dxvk {
|
|||||||
status = this->acquireNextImage(wakeSync);
|
status = this->acquireNextImage(wakeSync);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m_device->unlockSubmission();
|
||||||
|
|
||||||
if (status != VK_SUCCESS
|
if (status != VK_SUCCESS
|
||||||
&& status != VK_SUBOPTIMAL_KHR)
|
&& status != VK_SUBOPTIMAL_KHR)
|
||||||
throw DxvkError("DxvkSwapchain: Failed to acquire image");
|
throw DxvkError("DxvkSwapchain: Failed to acquire image");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user