Result (exit) codes for fatal terminations
This commit is contained in:
parent
90d7e09890
commit
df223f5b9b
29 changed files with 56 additions and 52 deletions
|
|
@ -520,7 +520,7 @@ public:
|
|||
texFormat = VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK;
|
||||
}
|
||||
else {
|
||||
vks::tools::exitFatal("Device does not support any compressed texture format!", "Error");
|
||||
vks::tools::exitFatal("Device does not support any compressed texture format!", VK_ERROR_FEATURE_NOT_PRESENT);
|
||||
}
|
||||
|
||||
textures.model.colorMap.loadFromFile(getAssetPath() + "models/armor/color" + texFormatSuffix + ".ktx", texFormat, vulkanDevice, queue);
|
||||
|
|
|
|||
|
|
@ -600,7 +600,7 @@ public:
|
|||
texFormat = VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK;
|
||||
}
|
||||
else {
|
||||
vks::tools::exitFatal("Device does not support any compressed texture format!", "Error");
|
||||
vks::tools::exitFatal("Device does not support any compressed texture format!", VK_ERROR_FEATURE_NOT_PRESENT);
|
||||
}
|
||||
|
||||
textures.model.colorMap.loadFromFile(getAssetPath() + "models/armor/color" + texFormatSuffix + ".ktx", texFormat, vulkanDevice, queue);
|
||||
|
|
|
|||
|
|
@ -238,7 +238,7 @@ public:
|
|||
enabledFeatures.geometryShader = VK_TRUE;
|
||||
}
|
||||
else {
|
||||
vks::tools::exitFatal("Selected GPU does not support geometry shaders!", "Feature not supported");
|
||||
vks::tools::exitFatal("Selected GPU does not support geometry shaders!", VK_ERROR_FEATURE_NOT_PRESENT);
|
||||
}
|
||||
// Enable anisotropic filtering if supported
|
||||
if (deviceFeatures.samplerAnisotropy) {
|
||||
|
|
@ -458,7 +458,7 @@ public:
|
|||
texFormat = VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK;
|
||||
}
|
||||
else {
|
||||
vks::tools::exitFatal("Device does not support any compressed texture format!", "Error");
|
||||
vks::tools::exitFatal("Device does not support any compressed texture format!", VK_ERROR_FEATURE_NOT_PRESENT);
|
||||
}
|
||||
|
||||
textures.model.colorMap.loadFromFile(getAssetPath() + "models/armor/color" + texFormatSuffix + ".ktx", texFormat, vulkanDevice, queue);
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ public:
|
|||
enabledFeatures.tessellationShader = VK_TRUE;
|
||||
}
|
||||
else {
|
||||
vks::tools::exitFatal("Selected GPU does not support tessellation shaders!", "Feature not supported");
|
||||
vks::tools::exitFatal("Selected GPU does not support tessellation shaders!", VK_ERROR_FEATURE_NOT_PRESENT);
|
||||
}
|
||||
// Fill mode non solid is required for wireframe display
|
||||
if (deviceFeatures.fillModeNonSolid) {
|
||||
|
|
@ -138,7 +138,7 @@ public:
|
|||
textures.colorHeightMap.loadFromFile(getAssetPath() + "textures/stonefloor03_color_etc2_unorm.ktx", VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK, vulkanDevice, queue);
|
||||
}
|
||||
else {
|
||||
vks::tools::exitFatal("Device does not support any compressed texture format!", "Error");
|
||||
vks::tools::exitFatal("Device does not support any compressed texture format!", VK_ERROR_FEATURE_NOT_PRESENT);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ public:
|
|||
enabledFeatures.geometryShader = VK_TRUE;
|
||||
}
|
||||
else {
|
||||
vks::tools::exitFatal("Selected GPU does not support geometry shaders!", "Feature not supported");
|
||||
vks::tools::exitFatal("Selected GPU does not support geometry shaders!", VK_ERROR_FEATURE_NOT_PRESENT);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -270,7 +270,7 @@ public:
|
|||
texFormat = VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK;
|
||||
}
|
||||
else {
|
||||
vks::tools::exitFatal("Device does not support any compressed texture format!", "Error");
|
||||
vks::tools::exitFatal("Device does not support any compressed texture format!", VK_ERROR_FEATURE_NOT_PRESENT);
|
||||
}
|
||||
|
||||
textures.plants.loadFromFile(getAssetPath() + "textures/texturearray_plants" + texFormatSuffix + ".ktx", texFormat, vulkanDevice, queue);
|
||||
|
|
|
|||
|
|
@ -221,7 +221,7 @@ public:
|
|||
texFormat = VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK;
|
||||
}
|
||||
else {
|
||||
vks::tools::exitFatal("Device does not support any compressed texture format!", "Error");
|
||||
vks::tools::exitFatal("Device does not support any compressed texture format!", VK_ERROR_FEATURE_NOT_PRESENT);
|
||||
}
|
||||
|
||||
textures.rocks.loadFromFile(getAssetPath() + "textures/texturearray_rocks" + texFormatSuffix + ".ktx", texFormat, vulkanDevice, queue);
|
||||
|
|
|
|||
|
|
@ -364,7 +364,7 @@ public:
|
|||
textures.colorMap.loadFromFile(getAssetPath() + "models/voyager/voyager_etc2_unorm.ktx", VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK, vulkanDevice, queue);
|
||||
}
|
||||
else {
|
||||
vks::tools::exitFatal("Device does not support any compressed texture format!", "Error");
|
||||
vks::tools::exitFatal("Device does not support any compressed texture format!", VK_ERROR_FEATURE_NOT_PRESENT);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -443,7 +443,7 @@ public:
|
|||
textures.colorMap.loadFromFile(getAssetPath() + "models/voyager/voyager_etc2_unorm.ktx", VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK, vulkanDevice, queue);
|
||||
}
|
||||
else {
|
||||
vks::tools::exitFatal("Device does not support any compressed texture format!", "Error");
|
||||
vks::tools::exitFatal("Device does not support any compressed texture format!", VK_ERROR_FEATURE_NOT_PRESENT);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -483,7 +483,7 @@ public:
|
|||
textures.colorMap.loadFromFile(getAssetPath() + "textures/darkmetal_etc2_unorm.ktx", VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK, vulkanDevice, queue);
|
||||
}
|
||||
else {
|
||||
vks::tools::exitFatal("Device does not support any compressed texture format!", "Error");
|
||||
vks::tools::exitFatal("Device does not support any compressed texture format!", VK_ERROR_FEATURE_NOT_PRESENT);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -132,7 +132,7 @@ public:
|
|||
textures.colorMap.loadFromFile(getAssetPath() + "textures/rocks_color_etc2_unorm.ktx", VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK, vulkanDevice, queue);
|
||||
}
|
||||
else {
|
||||
vks::tools::exitFatal("Device does not support any compressed texture format!", "Error");
|
||||
vks::tools::exitFatal("Device does not support any compressed texture format!", VK_ERROR_FEATURE_NOT_PRESENT);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -347,7 +347,7 @@ public:
|
|||
texFormat = VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK;
|
||||
}
|
||||
else {
|
||||
vks::tools::exitFatal("Device does not support any compressed texture format!", "Error");
|
||||
vks::tools::exitFatal("Device does not support any compressed texture format!", VK_ERROR_FEATURE_NOT_PRESENT);
|
||||
}
|
||||
|
||||
// Particles
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ public:
|
|||
enabledFeatures.pipelineStatisticsQuery = VK_TRUE;
|
||||
}
|
||||
else {
|
||||
vks::tools::exitFatal("Selected GPU does not support pipeline statistics!", "Feature not supported");
|
||||
vks::tools::exitFatal("Selected GPU does not support pipeline statistics!", VK_ERROR_FEATURE_NOT_PRESENT);
|
||||
}
|
||||
if (deviceFeatures.fillModeNonSolid) {
|
||||
enabledFeatures.fillModeNonSolid = VK_TRUE;
|
||||
|
|
|
|||
|
|
@ -164,7 +164,7 @@ private:
|
|||
texFormat = VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK;
|
||||
}
|
||||
else {
|
||||
vks::tools::exitFatal("Device does not support any compressed texture format!", "Error");
|
||||
vks::tools::exitFatal("Device does not support any compressed texture format!", VK_ERROR_FEATURE_NOT_PRESENT);
|
||||
}
|
||||
|
||||
aiString texturefile;
|
||||
|
|
|
|||
|
|
@ -683,7 +683,7 @@ public:
|
|||
texFormat = VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK;
|
||||
}
|
||||
else {
|
||||
vks::tools::exitFatal("Device does not support any compressed texture format!", "Error");
|
||||
vks::tools::exitFatal("Device does not support any compressed texture format!", VK_ERROR_FEATURE_NOT_PRESENT);
|
||||
}
|
||||
|
||||
textures.colorMap.loadFromFile(getAssetPath() + "textures/goblin" + texFormatSuffix + ".ktx", texFormat, vulkanDevice, queue);
|
||||
|
|
|
|||
|
|
@ -548,7 +548,7 @@ public:
|
|||
textures.glass.loadFromFile(getAssetPath() + "textures/colored_glass_etc2_unorm.ktx", VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK, vulkanDevice, queue);
|
||||
}
|
||||
else {
|
||||
vks::tools::exitFatal("Device does not support any compressed texture format!", "Error");
|
||||
vks::tools::exitFatal("Device does not support any compressed texture format!", VK_ERROR_FEATURE_NOT_PRESENT);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -160,7 +160,7 @@ public:
|
|||
enabledFeatures.tessellationShader = VK_TRUE;
|
||||
}
|
||||
else {
|
||||
vks::tools::exitFatal("Selected GPU does not support tessellation shaders!", "Feature not supported");
|
||||
vks::tools::exitFatal("Selected GPU does not support tessellation shaders!", VK_ERROR_FEATURE_NOT_PRESENT);
|
||||
}
|
||||
// Fill mode non solid is required for wireframe display
|
||||
if (deviceFeatures.fillModeNonSolid) {
|
||||
|
|
@ -255,7 +255,7 @@ public:
|
|||
texFormat = VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK;
|
||||
}
|
||||
else {
|
||||
vks::tools::exitFatal("Device does not support any compressed texture format!", "Error");
|
||||
vks::tools::exitFatal("Device does not support any compressed texture format!", VK_ERROR_FEATURE_NOT_PRESENT);
|
||||
}
|
||||
|
||||
textures.skySphere.loadFromFile(getAssetPath() + "textures/skysphere" + texFormatSuffix + ".ktx", texFormat, vulkanDevice, queue);
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ public:
|
|||
enabledFeatures.tessellationShader = VK_TRUE;
|
||||
}
|
||||
else {
|
||||
vks::tools::exitFatal("Selected GPU does not support tessellation shaders!", "Feature not supported");
|
||||
vks::tools::exitFatal("Selected GPU does not support tessellation shaders!", VK_ERROR_FEATURE_NOT_PRESENT);
|
||||
}
|
||||
// Fill mode non solid is required for wireframe display
|
||||
if (deviceFeatures.fillModeNonSolid) {
|
||||
|
|
@ -203,7 +203,7 @@ public:
|
|||
textures.colorMap.loadFromFile(getAssetPath() + "textures/deer_etc2_unorm.ktx", VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK, vulkanDevice, queue);
|
||||
}
|
||||
else {
|
||||
vks::tools::exitFatal("Device does not support any compressed texture format!", "Error");
|
||||
vks::tools::exitFatal("Device does not support any compressed texture format!", VK_ERROR_FEATURE_NOT_PRESENT);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -884,7 +884,7 @@ public:
|
|||
texFormat = VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK;
|
||||
}
|
||||
else {
|
||||
vks::tools::exitFatal("Device does not support any compressed texture format!", "Error");
|
||||
vks::tools::exitFatal("Device does not support any compressed texture format!", VK_ERROR_FEATURE_NOT_PRESENT);
|
||||
}
|
||||
|
||||
textures.background.loadFromFile(getAssetPath() + "textures/skysphere" + texFormatSuffix + ".ktx", texFormat, vulkanDevice, queue);
|
||||
|
|
|
|||
|
|
@ -300,7 +300,7 @@ public:
|
|||
format = VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK;
|
||||
}
|
||||
else {
|
||||
vks::tools::exitFatal("Device does not support any compressed texture format!", "Error");
|
||||
vks::tools::exitFatal("Device does not support any compressed texture format!", VK_ERROR_FEATURE_NOT_PRESENT);
|
||||
}
|
||||
loadTextureArray(getAssetPath() + "textures/" + filename, format);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -318,7 +318,7 @@ public:
|
|||
format = VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK;
|
||||
}
|
||||
else {
|
||||
vks::tools::exitFatal("Device does not support any compressed texture format!", "Error");
|
||||
vks::tools::exitFatal("Device does not support any compressed texture format!", VK_ERROR_FEATURE_NOT_PRESENT);
|
||||
}
|
||||
|
||||
loadCubemap(getAssetPath() + "textures/" + filename, format, false);
|
||||
|
|
|
|||
|
|
@ -912,9 +912,8 @@ public:
|
|||
{
|
||||
VulkanExampleBase::prepare();
|
||||
// Check if the GPU supports sparse residency for 2D images
|
||||
if (!vulkanDevice->features.sparseResidencyImage2D)
|
||||
{
|
||||
vks::tools::exitFatal("Device does not support sparse residency for 2D images!", "Feature not supported");
|
||||
if (!vulkanDevice->features.sparseResidencyImage2D) {
|
||||
vks::tools::exitFatal("Device does not support sparse residency for 2D images!", VK_ERROR_FEATURE_NOT_PRESENT);
|
||||
}
|
||||
loadAssets();
|
||||
generateTerrain();
|
||||
|
|
|
|||
|
|
@ -85,14 +85,14 @@ public:
|
|||
enabledFeatures.geometryShader = VK_TRUE;
|
||||
}
|
||||
else {
|
||||
vks::tools::exitFatal("Selected GPU does not support geometry shaders!", "Feature not supported");
|
||||
vks::tools::exitFatal("Selected GPU does not support geometry shaders!", VK_ERROR_FEATURE_NOT_PRESENT);
|
||||
}
|
||||
// Multiple viewports must be supported
|
||||
if (deviceFeatures.multiViewport) {
|
||||
enabledFeatures.multiViewport = VK_TRUE;
|
||||
}
|
||||
else {
|
||||
vks::tools::exitFatal("Selected GPU does not support multi viewports!", "Feature not supported");
|
||||
vks::tools::exitFatal("Selected GPU does not support multi viewports!", VK_ERROR_FEATURE_NOT_PRESENT);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue