Skip to content

Commit

Permalink
removing a validation layer when not using debug printf
Browse files Browse the repository at this point in the history
  • Loading branch information
natevm committed Dec 9, 2024
1 parent d467b83 commit 0d00cc0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion gprt/gprt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3156,7 +3156,12 @@ struct Context {
// need this for printf to work
const char *layerNames[1] = {"VK_LAYER_KHRONOS_validation"};
instanceCreateInfo.ppEnabledLayerNames = &layerNames[0];
instanceCreateInfo.enabledLayerCount = 1;

if (requestedFeatures.debugPrintf) {
instanceCreateInfo.enabledLayerCount = 1;
} else {
instanceCreateInfo.enabledLayerCount = 0;
}

VkResult err;

Expand Down

0 comments on commit 0d00cc0

Please sign in to comment.