wgpu
wgpu copied to clipboard
Old GPU unable to find layer VK_LAYER_KHRONOS_validation
Description
When i try cargo run --bin wgpu-examples hello
with env vars set RUST_LOG=trace
and set WGPU_BACKEND=gl
it gives an error:
C:\Users\oops\projects\rust\wgpu>cargo run --bin wgpu-examples hello
Finished dev [unoptimized + debuginfo] target(s) in 0.96s
Running `target\debug\wgpu-examples.exe hello`
[2024-01-31T09:50:29Z WARN wgpu_hal::vulkan::instance] Unable to find extension: VK_EXT_debug_utils
[2024-01-31T09:50:29Z WARN wgpu_hal::vulkan::instance] Unable to find extension: VK_EXT_swapchain_colorspace
[2024-01-31T09:50:29Z WARN wgpu_hal::vulkan::instance] InstanceFlags::VALIDATION requested, but unable to find layer: VK_LAYER_KHRONOS_validation
error: process didn't exit successfully: `target\debug\wgpu-examples.exe hello` (exit code: 0xc0000005, STATUS_ACCESS_VIOLATION)
Repro steps
set RUST_LOG=trace
set WGPU_BACKEND=gl
cargo run --bin wgpu-examples hello
Expected vs observed behavior Vulkan shouldn't crash the program if I use opengl.
Extra materials
Platform Windows 11, NVIDIA GeForce GT 730 (GF108) with 391.35 drivers (latest available), no vulkan or directx 12 support. P.S. When i use Manjaro with nvidia drivers the same problem occurs. With open source driver (forgot the name :/) everything was ok.
I think it's related #4109
Could you get a stack trace from a debugger?
Could you get a stack trace from a debugger?
0: std::backtrace_rs::backtrace::dbghelp::trace
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library\std\src\..\..\backtrace\src\backtrace\dbghelp.rs:98
1: std::backtrace_rs::backtrace::trace_unsynchronized
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library\std\src\..\..\backtrace\src\backtrace\mod.rs:66
2: std::backtrace::Backtrace::create
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library\std\src\backtrace.rs:332
3: std::backtrace::Backtrace::capture
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library\std\src\backtrace.rs:298
4: wgpu_examples::hello::main
at .\examples\src\hello\mod.rs:23
5: wgpu_examples::main
at .\examples\src\main.rs:229
6: core::ops::function::FnOnce::call_once<void (*)(),tuple$<> >
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26\library\core\src\ops\function.rs:250
7: std::sys_common::backtrace::__rust_begin_short_backtrace<void (*)(),tuple$<> >
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26\library\std\src\sys_common\backtrace.rs:135
8: std::sys_common::backtrace::__rust_begin_short_backtrace<void (*)(),tuple$<> >
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26\library\std\src\sys_common\backtrace.rs:135
9: std::rt::lang_start::closure$0<tuple$<> >
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26\library\std\src\rt.rs:166
10: std::rt::lang_start_internal::closure$2
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library\std\src\rt.rs:148
11: std::panicking::try::do_call
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library\std\src\panicking.rs:500
12: std::panicking::try
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library\std\src\panicking.rs:464
13: std::panic::catch_unwind
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library\std\src\panic.rs:142
14: std::rt::lang_start_internal
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library\std\src\rt.rs:148
15: std::rt::lang_start<tuple$<> >
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26\library\std\src\rt.rs:165
16: main
17: invoke_main
at D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:78
18: __scrt_common_main_seh
at D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288
19: BaseThreadInitThunk
20: RtlUserThreadStart
This is a backtrace of the segfault?
If not vulkan compatible, InstanceError { message: "missing Vulkan entry points", .. }
should be returned. Could it be a bug in the driver you are using?(Or related this?) No problem in my gpu.
set WGPU_ALLOW_UNDERLYING_NONCOMPLIANT_ADAPTER=0
set WGPU_BACKEND=gl
set RUST_LOG=trace
Anyway, I don't care about fixing bugs in wgpu or in my driver. I'm interested in stupid running wgpu-examples without checking vulkan. How can I do that?
The hello and hello-triangle example do not honor WGPU_BACKEND as they were trying to avoid any complexity - this is largely confusing and should likely change.
Try the cube (or any other) example. We still shouldn't be segfaulting, but that should get Vulkan ignored.
The hello and hello-triangle example do not honor WGPU_BACKEND as they were trying to avoid any complexity - this is largely confusing and should likely change.
Try the cube (or any other) example. We still shouldn't be segfaulting, but that should get Vulkan ignored.
set WGPU_BACKEND=gl
cargo run --bin wgpu-examples cube
works perfect