LWJGL / lwjgl3-demos

Demo suite for LWJGL 3
BSD 3-Clause "New" or "Revised" License
351 stars 89 forks source link

Throw `Vulkan layer VK_LAYER_KHRONOS_validation is not supported` error #42

Closed gcnyin closed 2 years ago

gcnyin commented 3 years ago

OS name: macOS OS version: 12.0.1 Java version: 11.0.12 running demo: vulkan.raytracing.SimpleSphere

logging:

$ java -XstartOnFirstThread  -cp target/lwjgl3-demos.jar org.lwjgl.demo.vulkan.raytracing.SimpleSphere
[LWJGL] Version: 3.3.0 SNAPSHOT
[LWJGL]          OS: Mac OS X v10.16
[LWJGL]         JRE: macOS x86_64 11.0.12
[LWJGL]         JVM: OpenJDK 64-Bit Server VM v11.0.12+7 by Eclipse Foundation
[LWJGL] Loading JNI library: lwjgl
[LWJGL]         Module: org.lwjgl
[LWJGL]         Using SharedLibraryLoader...
[LWJGL]         Found at: /var/folders/w2/pymyhlpx2b38ylvvypt63_ym0000gp/T/lwjglhuanghezhao/3.3.0-SNAPSHOT/liblwjgl.dylib
[LWJGL]         Loaded from org.lwjgl.librarypath: /var/folders/w2/pymyhlpx2b38ylvvypt63_ym0000gp/T/lwjglhuanghezhao/3.3.0-SNAPSHOT/liblwjgl.dylib
[LWJGL] Loading library: glfw
[LWJGL]         Module: org.lwjgl.glfw
[LWJGL]         Using SharedLibraryLoader...
[LWJGL]         Found at: /var/folders/w2/pymyhlpx2b38ylvvypt63_ym0000gp/T/lwjglhuanghezhao/3.3.0-SNAPSHOT/libglfw.dylib
[LWJGL]         Loaded from org.lwjgl.librarypath: /var/folders/w2/pymyhlpx2b38ylvvypt63_ym0000gp/T/lwjglhuanghezhao/3.3.0-SNAPSHOT/libglfw.dylib
[LWJGL] Loading library: MoltenVK
[LWJGL]         Module: org.lwjgl.vulkan
[LWJGL]         Using SharedLibraryLoader...
[LWJGL]         Found at: /var/folders/w2/pymyhlpx2b38ylvvypt63_ym0000gp/T/lwjglhuanghezhao/3.3.0-SNAPSHOT/libMoltenVK.dylib
[LWJGL]         Loaded from org.lwjgl.librarypath: /var/folders/w2/pymyhlpx2b38ylvvypt63_ym0000gp/T/lwjglhuanghezhao/3.3.0-SNAPSHOT/libMoltenVK.dylib
[LWJGL] Loading library: jemalloc
[LWJGL]         Module: org.lwjgl.jemalloc
[LWJGL]         Using SharedLibraryLoader...
[LWJGL]         Found at: /var/folders/w2/pymyhlpx2b38ylvvypt63_ym0000gp/T/lwjglhuanghezhao/3.3.0-SNAPSHOT/libjemalloc.dylib
[LWJGL]         Loaded from org.lwjgl.librarypath: /var/folders/w2/pymyhlpx2b38ylvvypt63_ym0000gp/T/lwjglhuanghezhao/3.3.0-SNAPSHOT/libjemalloc.dylib
[LWJGL] Closure Registry: simple
[LWJGL] MemoryUtil allocator: DebugAllocator
[mvk-error] VK_ERROR_LAYER_NOT_PRESENT: Vulkan layer VK_LAYER_KHRONOS_validation is not supported.
Exception in thread "main" java.lang.AssertionError: Failed to create VkInstance: A requested layer is not present or could not be loaded.
        at org.lwjgl.demo.vulkan.VKUtil._CHECK_(VKUtil.java:109)
        at org.lwjgl.demo.vulkan.raytracing.SimpleSphere.createInstance(SimpleSphere.java:262)
        at org.lwjgl.demo.vulkan.raytracing.SimpleSphere.init(SimpleSphere.java:1519)
        at org.lwjgl.demo.vulkan.raytracing.SimpleSphere.main(SimpleSphere.java:1608)
[LWJGL] 108 bytes leaked, thread 1 (main), address: 0x107F69000
        at org.lwjgl.glfw.GLFWVulkan.setPath(GLFWVulkan.java:355)
        at org.lwjgl.glfw.GLFWVulkan.setPath(GLFWVulkan.java:331)
        at org.lwjgl.glfw.GLFWVulkan.<clinit>(GLFWVulkan.java:44)
        at org.lwjgl.demo.vulkan.raytracing.SimpleSphere.initGlfwAndReturnRequiredExtensions(SimpleSphere.java:270)
        at org.lwjgl.demo.vulkan.raytracing.SimpleSphere.init(SimpleSphere.java:1518)
        at org.lwjgl.demo.vulkan.raytracing.SimpleSphere.main(SimpleSphere.java:1608)
httpdigest commented 2 years ago

Fixed with: https://github.com/LWJGL/lwjgl3-demos/commit/a35f8c52be0e8377a2088ab5eb44f0a1297de84d