Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replace validation layer with VK_LAYER_KHRONOS_validation #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ class ComputeApplication {

/*
By enabling validation layers, Vulkan will emit warnings if the API
is used incorrectly. We shall enable the layer VK_LAYER_LUNARG_standard_validation,
is used incorrectly. We shall enable the layer VK_LAYER_KHRONOS_validation,
which is basically a collection of several useful validation layers.
*/
if (enableValidationLayers) {
Expand All @@ -204,22 +204,22 @@ class ComputeApplication {
vkEnumerateInstanceLayerProperties(&layerCount, layerProperties.data());

/*
And then we simply check if VK_LAYER_LUNARG_standard_validation is among the supported layers.
And then we simply check if VK_LAYER_KHRONOS_validation is among the supported layers.
*/
bool foundLayer = false;
for (VkLayerProperties prop : layerProperties) {

if (strcmp("VK_LAYER_LUNARG_standard_validation", prop.layerName) == 0) {
if (strcmp("VK_LAYER_KHRONOS_validation", prop.layerName) == 0) {
foundLayer = true;
break;
}

}

if (!foundLayer) {
throw std::runtime_error("Layer VK_LAYER_LUNARG_standard_validation not supported\n");
throw std::runtime_error("Layer VK_LAYER_KHRONOS_validation not supported\n");
}
enabledLayers.push_back("VK_LAYER_LUNARG_standard_validation"); // Alright, we can use this layer.
enabledLayers.push_back("VK_LAYER_KHRONOS_validation"); // Alright, we can use this layer.

/*
We need to enable an extension named VK_EXT_DEBUG_REPORT_EXTENSION_NAME,
Expand Down