Skip to content

Commit

Permalink
- fixed saved game thumbnails generation with Vulkan renderer
Browse files Browse the repository at this point in the history
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
  • Loading branch information
alexey-lysiuk committed May 1, 2019
1 parent 1973001 commit b23958b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/rendering/vulkan/system/vk_framebuffer.cpp
Expand Up @@ -286,8 +286,12 @@ void VulkanFrameBuffer::WaitForCommands(bool finish)
}

int numWaitFences = MIN(mNextSubmit, (int)maxConcurrentSubmitCount);
vkWaitForFences(device->device, numWaitFences, mSubmitWaitFences, VK_TRUE, std::numeric_limits<uint64_t>::max());
vkResetFences(device->device, numWaitFences, mSubmitWaitFences);

if (numWaitFences > 0)
{
vkWaitForFences(device->device, numWaitFences, mSubmitWaitFences, VK_TRUE, std::numeric_limits<uint64_t>::max());
vkResetFences(device->device, numWaitFences, mSubmitWaitFences);
}

DeleteFrameObjects();
mNextSubmit = 0;
Expand Down

0 comments on commit b23958b

Please sign in to comment.