Log the specific error if vkCreateInstance fails in demo program

This commit is contained in:
baldurk
2020-12-03 10:59:05 +00:00
parent 1e1ac07a07
commit b69ca4526e
+5 -1
View File
@@ -265,7 +265,11 @@ void VulkanGraphicsTest::Prepare(int argc, char **argv)
vkh::InstanceCreateInfo(app, enabledLayers, enabledInstExts).next(instInfoNext), NULL,
&inst);
if(vkr == VK_SUCCESS)
if(vkr != VK_SUCCESS)
{
TEST_ERROR("Error initialising vulkan instance: %d", vkr);
}
else
{
volkLoadInstance((VkInstance)inst);