- fixed saved game thumbnails generation with Vulkan renderer

GZDoom aborts with 'Failed to submit command buffer' error on saving a game when open source Intel Vulkan driver (part of Mesa 3D package) is used on Linux
This driver generates VK_DEVICE_LOST error when vkWaitForFences() is called with zero fence count. It must be greater than zero according to Vulkan spec
This commit is contained in:
alexey.lysiuk 2019-05-01 13:42:07 +03:00
parent 1973001834
commit b23958b204

View file

@ -286,8 +286,12 @@ void VulkanFrameBuffer::WaitForCommands(bool finish)
} }
int numWaitFences = MIN(mNextSubmit, (int)maxConcurrentSubmitCount); int numWaitFences = MIN(mNextSubmit, (int)maxConcurrentSubmitCount);
if (numWaitFences > 0)
{
vkWaitForFences(device->device, numWaitFences, mSubmitWaitFences, VK_TRUE, std::numeric_limits<uint64_t>::max()); vkWaitForFences(device->device, numWaitFences, mSubmitWaitFences, VK_TRUE, std::numeric_limits<uint64_t>::max());
vkResetFences(device->device, numWaitFences, mSubmitWaitFences); vkResetFences(device->device, numWaitFences, mSubmitWaitFences);
}
DeleteFrameObjects(); DeleteFrameObjects();
mNextSubmit = 0; mNextSubmit = 0;