Repository: vulkano-rs/vulkano

Issue #261: Replaying trace of triangle example doesn't display triangle.
Created: 2016-09-11T20:40:29Z
I'm new to Vulkan, so I'm not sure whether this is a Vulkano issue or a Lunarg SDK issue (feels like the latter, but I'm not experienced enough to prove it)...
When I do the following:
cd vulkano/examples
cargo build
cd target/debug
vktrace -p triangle -o triangle.vktrace 
# manually close example window before invoking replay.
vkreplay -t triangle.vktrace
... the replayed trace is a solid blue screen.  No red triangle is drawn.
After hacking triangle.rs to use a different clear color each frame, the replay also shows a different color each frame, but still no red triangle.
(I did this because I was suspicious that the trace was corrupted, and was successfully replaying only the first buffer clear, but nothing afterward).
BTW, this is on Ubuntu 16.04 with a GeForce 1060 and NVIDIA 367.44 drivers.

Duplicate issue #1368: macOS: "unexpected error: InitializationFailed" running triangle example
Created: 2020-05-24T23:26:26Z
Attempting to run the triangle example on Mac Mini 2018 Catalina 10.15.4:
$ RUST_BACKTRACE=1 cargo run --bin triangle
    Finished dev [unoptimized + debuginfo] target(s) in 0.07s
     Running `~/Repositories/vulkano/target/debug/triangle`
thread 'main' panicked at 'unexpected error: InitializationFailed', vulkano/src/extensions.rs:227:18
stack backtrace:
   0: std::sys_common::at_exit_imp::push
   1: <&mut W as core::fmt::Write>::write_fmt
   2: std::io::Write::write_fmt
   3: std::panicking::default_hook::{{closure}}
   4: std::panicking::default_hook
   5: <std::panicking::begin_panic::PanicPayload<A> as core::panic::BoxMeUp>::get
   6: std::panicking::default_hook::{{closure}}
   7: std::thread::local::fast::Key<T>::try_initialize
   8: <vulkano::extensions::SupportedExtensionsError as core::convert::From<vulkano::Error>>::from
             at vulkano/src/extensions.rs:227
   9: vulkano::instance::extensions::InstanceExtensions::supported_by_core_raw_with_loader
             at vulkano/src/instance/extensions.rs:98
  10: vulkano::instance::extensions::InstanceExtensions::supported_by_core_raw
             at vulkano/src/instance/extensions.rs:84
  11: vulkano::instance::extensions::InstanceExtensions::supported_by_core
             at vulkano/src/instance/extensions.rs:123
  12: vulkano_win::required_extensions
             at vulkano-win/src/lib.rs:47
  13: triangle::main
             at examples/src/bin/triangle.rs:50
  14: std::rt::lang_start::{{closure}}
             at /rustc/f509b26a7730d721ef87423a72b3fdf8724b4afa/src/libstd/rt.rs:67
  15: <std::panicking::begin_panic::PanicPayload<A> as core::panic::BoxMeUp>::get
  16: std::rt::lang_start
             at /rustc/f509b26a7730d721ef87423a72b3fdf8724b4afa/src/libstd/rt.rs:67
  17: triangle::main::scope::attachment_layouts
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

Vulkan SDK is indeed installed, but it appears vulkaninfo is having issues as well:
ERROR at /tmp/macos-sdk-build/Vulkan-Tools/vulkaninfo/vulkaninfo.h:240:vkEnumerateInstanceExtensionProperties failed with ERROR_INITIALIZATION_FAILED

So this may not be a vulkano issue.
Thanks

Closing comment (2020-06-07T13:56:40Z): I had the exact same issue. When sourcing the env-vars from Vulkan's SKD setup-envs.sh script instead of what is described in Vulkanos Readme it worked for me (Running triangle-example / vulkaninfo)!
Just append this to your ~/.zshrc / ~/.bashrc and replace {your_path_to_sdk}. Restart your terminal and vulkaninfo should print actual content.
VULKAN_SDK="{your_path_to_sdk}/macOS"
export VULKAN_SDK
PATH="$PATH:$VULKAN_SDK/bin"
export PATH
DYLD_LIBRARY_PATH="$VULKAN_SDK/lib:${DYLD_LIBRARY_PATH:-}"
export DYLD_LIBRARY_PATH
VK_LAYER_PATH="$VULKAN_SDK/share/vulkan/explicit_layer.d"
export VK_LAYER_PATH
VK_ICD_FILENAMES="$VULKAN_SDK/share/vulkan/icd.d/MoltenVK_icd.json"
export VK_ICD_FILENAMES
(For me at least its working to the point where the examples run with blue background. However unfortunately nothing is rendered (no triangle(s)). I'm guessing it's some shader-compiling / loading / executing problem. If you run into the same issue, let me know :)
=> similar to #261)