From 0d00cc0a8ca28ca2807137b4f66bc19587abefb6 Mon Sep 17 00:00:00 2001 From: Nathan Morrical Date: Mon, 9 Dec 2024 13:51:44 -0800 Subject: [PATCH] removing a validation layer when not using debug printf --- gprt/gprt.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gprt/gprt.cpp b/gprt/gprt.cpp index e857176..fe02641 100644 --- a/gprt/gprt.cpp +++ b/gprt/gprt.cpp @@ -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;