Skip to content

Commit a1d4f7a

Browse files
committed
fix: only enable validation layer when renderdoc profiling is enabled
1 parent 9868a63 commit a1d4f7a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/gpu.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,11 @@
2727

2828
// There is known issue that vkDestroyDebugUtilsMessengerEXT crash on exit when vulkan validation layer enabled
2929
// upstream fix https://github.com/KhronosGroup/Vulkan-Loader/pull/539
30+
#if NCNN_ENABLE_RENDERDOC_PROFILING
3031
#define ENABLE_VALIDATION_LAYER 1
32+
#else
33+
#define ENABLE_VALIDATION_LAYER 0
34+
#endif
3135

3236
#if NCNN_ENABLE_RENDERDOC_PROFILING
3337

0 commit comments

Comments
 (0)