missing validation layer is not fatal, added warning

This commit is contained in:
Turanszki Janos
2018-03-06 20:58:36 +00:00
parent ae0d912ff3
commit dc1d6ea8d1
2 changed files with 6 additions and 4 deletions
+5 -3
View File
@@ -22,9 +22,9 @@ namespace wiGraphicsTypes
"VK_LAYER_LUNARG_standard_validation"
};
#ifdef NDEBUG
const bool enableValidationLayers = false;
bool enableValidationLayers = false;
#else
const bool enableValidationLayers = true;
bool enableValidationLayers = true;
#endif
bool checkValidationLayerSupport() {
uint32_t layerCount;
@@ -567,7 +567,9 @@ namespace wiGraphicsTypes
}
if (enableValidationLayers && !checkValidationLayerSupport()) {
throw std::runtime_error("validation layers requested, but not available!");
//throw std::runtime_error("validation layers requested, but not available!");
wiHelper::messageBox("Vulkan validation layer requested but not available!");
enableValidationLayers = false;
}
// Create instance:
+1 -1
View File
@@ -64,7 +64,7 @@ namespace wiHelper
void messageBox(const std::string& msg, const std::string& caption){
#ifndef WINSTORE_SUPPORT
//MessageBoxA(wiWindowRegistration::GetInstance()->GetRegisteredWindow(), msg.c_str(), caption.c_str(), 0);
MessageBoxA(wiWindowRegistration::GetInstance()->GetRegisteredWindow(), msg.c_str(), caption.c_str(), 0);
#else
wstring wmsg(msg.begin(), msg.end());
wstring wcaption(caption.begin(), caption.end());