From dc9a9956951ff7cf72920818887cca137ba84b15 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 2 Mar 2019 15:57:43 +0100 Subject: [PATCH] - output the error code when submitting a command buffer fails. --- src/rendering/vulkan/system/vk_framebuffer.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/rendering/vulkan/system/vk_framebuffer.cpp b/src/rendering/vulkan/system/vk_framebuffer.cpp index 2f152213d..51c12aa2a 100644 --- a/src/rendering/vulkan/system/vk_framebuffer.cpp +++ b/src/rendering/vulkan/system/vk_framebuffer.cpp @@ -180,8 +180,8 @@ void VulkanFrameBuffer::Update() submitInfo.signalSemaphoreCount = 1; submitInfo.pSignalSemaphores = &mUploadSemaphore->semaphore; VkResult result = vkQueueSubmit(device->graphicsQueue, 1, &submitInfo, VK_NULL_HANDLE); - if (result != VK_SUCCESS) - I_FatalError("Failed to submit command buffer!\n"); + if (result < VK_SUCCESS) + I_FatalError("Failed to submit command buffer! Error %d\n", result); // Wait for upload commands to finish, then submit render commands VkSemaphore waitSemaphores[] = { mUploadSemaphore->semaphore, device->imageAvailableSemaphore->semaphore }; @@ -194,8 +194,8 @@ void VulkanFrameBuffer::Update() submitInfo.signalSemaphoreCount = 1; submitInfo.pSignalSemaphores = &device->renderFinishedSemaphore->semaphore; result = vkQueueSubmit(device->graphicsQueue, 1, &submitInfo, device->renderFinishedFence->fence); - if (result != VK_SUCCESS) - I_FatalError("Failed to submit command buffer!\n"); + if (result < VK_SUCCESS) + I_FatalError("Failed to submit command buffer! Error %d\n", result); } else { @@ -212,8 +212,8 @@ void VulkanFrameBuffer::Update() submitInfo.signalSemaphoreCount = 1; submitInfo.pSignalSemaphores = &device->renderFinishedSemaphore->semaphore; VkResult result = vkQueueSubmit(device->graphicsQueue, 1, &submitInfo, device->renderFinishedFence->fence); - if (result != VK_SUCCESS) - I_FatalError("Failed to submit command buffer!\n"); + if (result < VK_SUCCESS) + I_FatalError("Failed to submit command buffer! Error %d\n", result); } Flush3D.Unclock();