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

Tut 02: VK_LAYER_KHRONOS_validation not available. Win10, rust nightly-2020-12-18-gnu #35

Closed
raum-dellamorte opened this issue Dec 19, 2020 · 2 comments

Comments

@raum-dellamorte
Copy link

raum-dellamorte commented Dec 19, 2020

Without modification, running example 02 gives this output: (I edited out my println! statement)

Instance Available Layers:
        VK_LAYER_NV_optimus
        VK_LAYER_OBS_HOOK
        VK_LAYER_VALVE_steam_overlay
        VK_LAYER_VALVE_steam_fossilize
        VK_LAYER_EOS_Overlay
        VK_LAYER_EOS_Overlay
thread 'main' panicked at 'Validation layers requested, but not available!', src/tutorials/02_validation_layers.rs:83:13
stack backtrace:
   0:           0x6302fb - std::backtrace_rs::backtrace::dbghelp::trace::h81f68c85e8a404bc
                               at /rustc/eb4fc71dc9024f15a0c9cc44bcc10c861e9d585e\/library\std\src\..\..\backtrace\src\backtrace\dbghelp.rs:98:5
   1:           0x6302fb - std::backtrace_rs::backtrace::trace_unsynchronized::h38c8cbf83a2b340b
                               at /rustc/eb4fc71dc9024f15a0c9cc44bcc10c861e9d585e\/library\std\src\..\..\backtrace\src\backtrace\mod.rs:66:5
   2:           0x6302fb - std::sys_common::backtrace::_print_fmt::he83f99e5e7da91ec
                               at /rustc/eb4fc71dc9024f15a0c9cc44bcc10c861e9d585e\/library\std\src\sys_common\backtrace.rs:67:5
   3:           0x6302fb - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hdca2d1f25a396476
                               at /rustc/eb4fc71dc9024f15a0c9cc44bcc10c861e9d585e\/library\std\src\sys_common\backtrace.rs:46:22
   4:           0x69bb6b - core::fmt::write::h15a44803aaa8cb9c
                               at /rustc/eb4fc71dc9024f15a0c9cc44bcc10c861e9d585e\/library\core\src\fmt\mod.rs:1078:17
   5:           0x621ea3 - std::io::Write::write_fmt::h30650b0792e7e471
                               at /rustc/eb4fc71dc9024f15a0c9cc44bcc10c861e9d585e\/library\std\src\io\mod.rs:1519:15
   6:           0x633f48 - std::sys_common::backtrace::_print::h8a896f01a2594c13
                               at /rustc/eb4fc71dc9024f15a0c9cc44bcc10c861e9d585e\/library\std\src\sys_common\backtrace.rs:49:5
   7:           0x633f48 - std::sys_common::backtrace::print::hdd949e22ad060cf7
                               at /rustc/eb4fc71dc9024f15a0c9cc44bcc10c861e9d585e\/library\std\src\sys_common\backtrace.rs:36:9
   8:           0x633f48 - std::panicking::default_hook::{{closure}}::h7c4d2996f576da8d
                               at /rustc/eb4fc71dc9024f15a0c9cc44bcc10c861e9d585e\/library\std\src\panicking.rs:208:50
   9:           0x633b5c - std::panicking::default_hook::h6bfae4e54c8522ba
                               at /rustc/eb4fc71dc9024f15a0c9cc44bcc10c861e9d585e\/library\std\src\panicking.rs:225:9
  10:           0x6347d9 - std::panicking::rust_panic_with_hook::h39f01e8db1be2ade
                               at /rustc/eb4fc71dc9024f15a0c9cc44bcc10c861e9d585e\/library\std\src\panicking.rs:591:17
  11:           0x40f014 - std::panicking::begin_panic::{{closure}}::h0866a0a3edf0c304
  12:           0x40ef2f - std::sys_common::backtrace::__rust_end_short_backtrace::h2debba070202f4d5
  13:           0x406a1d - std::panicking::begin_panic::h6f8f5821fbf06777
  14:           0x40eceb - _02::main::h8024fc558f3fed18
  15:           0x40ef46 - std::sys_common::backtrace::__rust_begin_short_backtrace::hd7b7017a0a872516
  16:           0x40ef8c - std::rt::lang_start::{{closure}}::hcf719bb69b974c4c
  17:           0x634a5c - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::h137dc4e3949337b2
                               at /rustc/eb4fc71dc9024f15a0c9cc44bcc10c861e9d585e\library\core\src\ops/function.rs:259:13
  18:           0x634a5c - std::panicking::try::do_call::h0e5552fee324fdbb
                               at /rustc/eb4fc71dc9024f15a0c9cc44bcc10c861e9d585e\/library\std\src\panicking.rs:379:40
  19:           0x634a5c - std::panicking::try::h6d54d70d12e29c0a
                               at /rustc/eb4fc71dc9024f15a0c9cc44bcc10c861e9d585e\/library\std\src\panicking.rs:343:19
  20:           0x634a5c - std::panic::catch_unwind::h8e874b49d2127ff8
                               at /rustc/eb4fc71dc9024f15a0c9cc44bcc10c861e9d585e\/library\std\src\panic.rs:396:14
  21:           0x634a5c - std::rt::lang_start_internal::h79337b5f0625a1d5
                               at /rustc/eb4fc71dc9024f15a0c9cc44bcc10c861e9d585e\/library\std\src\rt.rs:51:25
  22:           0x40ee88 - main
  23:           0x4013b4 - __tmainCRTStartup
                               at E:\mingwbuild\mingw-w64-crt-git\src\crt-x86_64-w64-mingw32/E:/mingwbuild/mingw-w64-crt-git/src/mingw-w64/mingw-w64-crt/crt/crtexe.c:339:15
  24:           0x40150b - mainCRTStartup
                               at E:\mingwbuild\mingw-w64-crt-git\src\crt-x86_64-w64-mingw32/E:/mingwbuild/mingw-w64-crt-git/src/mingw-w64/mingw-w64-crt/crt/crtexe.c:223:9
  25:     0x7ffa0f617c24 - <unknown>
  26:     0x7ffa0f7ed4d1 - <unknown>

So I added a println! to figure out what it wanted that it didn't have. It wants to find VK_LAYER_KHRONOS_validation which is not among the available things.

Perhaps I should have installed the Vulkan SDK first? Though I thought it was only necessary for C or C++ and whatnot.

I'm struggling with google trying to find out why that's not an available layer but to no avail thus far. I would like to work directly with Vulkan as opposed to a "safe wrapper" because I find it harder to understand things when part of the job is being done for me. I need to break a system down to its components to understand it.

The available layers all seem to be programs I'm running and nothing to do with the system itself.

@unknownue
Copy link
Owner

Yes, you can run a program written in Vulkan without Vulkan SDK. However, in actual vulkan development, you probably need validation layer to help you debug program state, which is a optional component provided in Vulkan SDK.
Please install Vulkan SDK and see if this problem can have been fixed.

@raum-dellamorte
Copy link
Author

I installed the Vulkan SDK and for good measure I ran the Vulkan Configurator and the missing layers became available.

I didn't follow the link in your readme to the environment configuration used with ash, so that's my mistake.

I now get the following output:

Instance Available Layers: 
        VK_LAYER_NV_optimus
        VK_LAYER_OBS_HOOK
        VK_LAYER_VALVE_steam_overlay
        VK_LAYER_VALVE_steam_fossilize
        VK_LAYER_EOS_Overlay
        VK_LAYER_EOS_Overlay
        VK_LAYER_LUNARG_override
        VK_LAYER_LUNARG_api_dump
        VK_LAYER_LUNARG_device_simulation
        VK_LAYER_LUNARG_gfxreconstruct
        VK_LAYER_KHRONOS_validation
        VK_LAYER_LUNARG_monitor
        VK_LAYER_LUNARG_screenshot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants