blade: Crash at start on Snapdragon X elite

Vulkan sdk is installed, vkcube is working fine.

C:\Development\blade>cargo run --example bunnymark
warning: `C:\Development\blade\.cargo\config` is deprecated in favor of `config.toml`
note: if you need to support cargo 1.38 or earlier, you can symlink `config` to `config.toml`
warning: use of deprecated method `winit::event_loop::EventLoop::<T>::create_window`: use `ActiveEventLoop::create_window` instead
   --> examples\bunnymark\main.rs:371:29
    |
371 |     let window = event_loop.create_window(window_attributes).unwrap();
    |                             ^^^^^^^^^^^^^
    |
    = note: `#[warn(deprecated)]` on by default

warning: use of deprecated method `winit::event_loop::EventLoop::<T>::run`: use `EventLoop::run_app` instead
   --> examples\bunnymark\main.rs:400:10
    |
400 |         .run(|event, target| {
    |          ^^^

warning: `blade` (example "bunnymark") generated 2 warnings
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.24s
     Running `target\debug\examples\bunnymark.exe`
DeviceInformation { is_software_emulated: false, device_name: "Qualcomm(R) Adreno(TM) X1-85 GPU", driver_name: "Qualcomm Technologies Inc. Adreno Vulkan Driver", driver_info: "Driver Build: 36a15f63c3, , 1727332442\nDate: 09/26/2024\nCompiler Version: E031.47.15.00\nDriver Branch: \n" }
thread 'main' panicked at blade-graphics\src\vulkan\pipeline.rs:601:18:
called `Result::unwrap()` on an `Err` value: ([0x0], ERROR_UNKNOWN)
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
error: process didn't exit successfully: `target\debug\examples\bunnymark.exe` (exit code: 101)

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Reactions: 1
  • Comments: 18 (5 by maintainers)

Commits related to this issue

Most upvoted comments

Thank you both for the investigation! The Blender thread appears to be very relevant but unfortunately lacking details. It would be useful to read the Qualcomm driver devs take on this. Shaderc optimizations is basically spirv-opt from SPIR-V tools. Blade doesn’t use it - we have a pure-Rust shader pipeline, and we aren’t running the shader through spirv-opt since we assume the driver already doing this anyway at pipeline creation.

There appear to be multiple other threads about Adreno GPU issues with SPIR-V shaders:

It’s really hard to say what part of the shader the Qualcomm’s Vulkan driver doesn’t like, but it looks like a driver bug to me.

I’m an experienced Rust dev w/ an X1E80100 and willing to help debug this issue further if you’re interested, although I’ll need guidance as I’ve done very little graphics development.

@kvark Do you mean zed with #255 now works? I still have to give it a try.

Originally posted by @evgri243 in #19739 I assume it is more valuable here.

Just as an intro. I tried all possible combinations yesterday.

Build for: “x86_64-pc-windows-msvc” and “aarch64-pc-windows-msvc”, Executed it with “Force Physical Device Only Preset” in Portability Loader Configuration of kvconfig:

  • Qualcomm® Adreno ™ X1-85 GPU with driver: “C:\WINDOWS\System32\DriverStore\FileRepository\qcdx8380.inf_arm64_1b5d57031d8d3198.\qcvkarm64xum.dll”: fails with the error above for both build architectures: Result::unwrap() on an Err value: ([0x0], ERROR_UNKNOWN) in blade-graphics\\src\\vulkan\\pipeline.rs:614.
  • Microsoft Direct3D12 (Qualcomm® Adreno™ X1-85 GPU) with Vulkan 1.2.295 driver: fails with for both architectures with Unable to init GPU context: NoSupportedDeviceFound in crates\gpui\src\platform\windows\platform.rs:111.
  • Microsoft Direct3D12 (Qualcomm® Adreno™ X1-85 GPU) with Vulkan 1.2.295 driver: fails with for both architectures with Unable to init GPU context: NoSupportedDeviceFound in crates\gpui\src\platform\windows\platform.rs:111.

So far, no working configuration.

Direct3D version: 1.611.1-81528511 DXCore version: 10.0.26100.1-240331-1435.ge-release Windows version: 10.0.26120.3576 Graphics driver: the latest v31.0.96.0 beta OpenCL™, OpenGL®, and Vulkan® Compatibility Pack is installed, hence the Microsoft 3D12 devices. Tested with the latest master by the date Blade with minimal changes for obj2 library compatibility. vkcube works with every forced device.

Also, I tried multiple texture formats because I read somewhere that the GPU doesn’t support every format.

After a bit of testing it seems like the crash occurs when you try to access vertex properties in fs_main

Interesting, thank you for the report! Could you run with validation enabled? I.e. have the validation layers installed and do “validation: true” in the context desc.