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

@ -831,7 +831,7 @@ void VulkanExampleBase::initVulkan()
// Vulkan instance
err = createInstance(settings.validation);
if (err) {
vks::tools::exitFatal("Could not create Vulkan instance : \n" + vks::tools::errorString(err), "Fatal error", !benchmark.active);
vks::tools::exitFatal("Could not create Vulkan instance : \n" + vks::tools::errorString(err), err);
}
#if defined(VK_USE_PLATFORM_ANDROID_KHR)
@ -857,7 +857,7 @@ void VulkanExampleBase::initVulkan()
std::vector<VkPhysicalDevice> physicalDevices(gpuCount);
err = vkEnumeratePhysicalDevices(instance, &gpuCount, physicalDevices.data());
if (err) {
vks::tools::exitFatal("Could not enumerate physical devices : \n" + vks::tools::errorString(err), "Fatal error", !benchmark.active);
vks::tools::exitFatal("Could not enumerate physical devices : \n" + vks::tools::errorString(err), err);
}
// GPU selection
@ -932,7 +932,7 @@ void VulkanExampleBase::initVulkan()
vulkanDevice = new vks::VulkanDevice(physicalDevice);
VkResult res = vulkanDevice->createLogicalDevice(enabledFeatures, enabledExtensions);
if (res != VK_SUCCESS) {
vks::tools::exitFatal("Could not create Vulkan device: \n" + vks::tools::errorString(res), "Fatal error", benchmark.active);
vks::tools::exitFatal("Could not create Vulkan device: \n" + vks::tools::errorString(res), res);
}
device = vulkanDevice->logicalDevice;