Result (exit) codes for fatal terminations

This commit is contained in:
saschawillems 2018-01-21 18:28:17 +01:00
parent 90d7e09890
commit df223f5b9b
29 changed files with 56 additions and 52 deletions

View file

@ -136,7 +136,7 @@ public:
#endif
if (err != VK_SUCCESS) {
vks::tools::exitFatal("Could not create surface!", "Fatal error");
vks::tools::exitFatal("Could not create surface!", err);
}
// Get available queue family properties
@ -194,13 +194,13 @@ public:
// Exit if either a graphics or a presenting queue hasn't been found
if (graphicsQueueNodeIndex == UINT32_MAX || presentQueueNodeIndex == UINT32_MAX)
{
vks::tools::exitFatal("Could not find a graphics and/or presenting queue!", "Fatal error");
vks::tools::exitFatal("Could not find a graphics and/or presenting queue!", -1);
}
// todo : Add support for separate graphics and presenting queue
if (graphicsQueueNodeIndex != presentQueueNodeIndex)
{
vks::tools::exitFatal("Separate graphics and presenting queues are not supported yet!", "Fatal error");
vks::tools::exitFatal("Separate graphics and presenting queues are not supported yet!", -1);
}
queueNodeIndex = graphicsQueueNodeIndex;
@ -563,7 +563,7 @@ public:
if(!foundMode)
{
vks::tools::exitFatal("Can't find a display and a display mode!", "Fatal error");
vks::tools::exitFatal("Can't find a display and a display mode!", -1);
return;
}
@ -600,7 +600,7 @@ public:
if(bestPlaneIndex == UINT32_MAX)
{
vks::tools::exitFatal("Can't find a plane for displaying!", "Fatal error");
vks::tools::exitFatal("Can't find a plane for displaying!", -1);
return;
}
@ -639,9 +639,8 @@ public:
surfaceInfo.imageExtent.height = height;
VkResult result = vkCreateDisplayPlaneSurfaceKHR(instance, &surfaceInfo, NULL, &surface);
if(result !=VK_SUCCESS)
{
vks::tools::exitFatal("Failed to create surface!", "Fatal error");
if (result !=VK_SUCCESS) {
vks::tools::exitFatal("Failed to create surface!", result);
}
delete[] pDisplays;