#Wgpu error messages

73 messages · Page 1 of 1 (latest)

hexed agate
#

Im trying to run the 3d gizmos demo from v0.15.3, but I keep getting errors. The photo are the errors, and here is my toml:

[package]
name = "project"
version = "0.1.0"
edition = "2024"

[workspace]
resolver = "2"

# Enable a small amount of optimization in the dev profile.
[profile.dev]
opt-level = 1

# Enable a large amount of optimization in the dev profile for dependencies.
[profile.dev.package."*"]
opt-level = 3

[dependencies.bevy]
version = "0.15.3"
default-features=false
features = [
    #"android-game-activity",
    #"android_shared_stdcxx",
    "animation",
    "bevy_asset",
    "bevy_audio",
    "bevy_color",
    "bevy_core_pipeline",
    "bevy_gilrs",
    "bevy_gizmos",
    "bevy_gltf",
    "bevy_mesh_picking_backend",
    "bevy_pbr",
    "bevy_picking",
    "bevy_render",
    "bevy_scene",
    "bevy_sprite",
    "bevy_sprite_picking_backend",
    "bevy_state",
    "bevy_text",
    "bevy_ui",
    "bevy_ui_picking_backend",
    "bevy_window",
    "bevy_winit",
    "custom_cursor",
    "default_font",
    "hdr",
    "multi_threaded",
    "png",
    "smaa_luts",
    "sysinfo_plugin",
    "tonemapping_luts",
    "vorbis",
    "webgl2",
    "x11",
]
keen oracle
#

OpenGL is only like, barely supported for 3d in bevy. What GPU do you have? Please paste your system info that bevy logs on startup

hexed agate
#

wait opengl? I wanted to do this with vulkan. I was just testing the gizmo exmaple

#

the example does work, just has a bunch of stuff like this popping off

keen oracle
#

The errors are coming from wgpu_hal::gles, so you're not using the vulkan backend

hexed agate
#
   Compiling bevy-yurrgoht v0.1.0 (/home/mk/Documents/bevy-yurrgoht)
    Finished `dev` profile [optimized + debuginfo] target(s) in 9.80s
     Running `target/debug/bevy-yurrgoht`
2025-03-02T06:01:58.205032Z  INFO bevy_diagnostic::system_information_diagnostics_plugin::internal: SystemInfo { os: "Linux rolling EndeavourOS", kernel: "6.13.5-arch1-1", cpu: "12th Gen Intel(R) Core(TM) i7-12700F", core_count: "12", memory: "31.2 GiB" }
2025-03-02T06:01:58.238450Z ERROR wgpu_hal::vulkan::instance: GENERAL [Loader Message (0x0)]
        /usr/lib/libVkLayer_khronos_validation.so: undefined symbol: _ZN3vku42safe_VkVideoSessionParametersCreateInfoKHR10initializeEPK37VkVideoSessionParametersCreateInfoKHRPNS_14PNextCopyStateE    
2025-03-02T06:01:58.238462Z ERROR wgpu_hal::vulkan::instance:   objects: (type: INSTANCE, hndl: 0x56d655fa83d0, name: ?)    
2025-03-02T06:01:58.238465Z ERROR wgpu_hal::vulkan::instance: GENERAL [Loader Message (0x0)]
        Requested layer "VK_LAYER_KHRONOS_validation" failed to load!    
2025-03-02T06:01:58.238468Z ERROR wgpu_hal::vulkan::instance:   objects: (type: INSTANCE, hndl: 0x56d655fa83d0, name: ?)    
error: XDG_RUNTIME_DIR is invalid or not set in the environment.
2025-03-02T06:01:58.273205Z  INFO bevy_render::renderer: AdapterInfo { name: "AMD Radeon RX 6900 XT (radeonsi, navi21, LLVM 19.1.7, DRM 3.61, 6.13.5-arch1-1)", vendor: 4098, device: 0, device_type: Other, driver: "", driver_info: "4.6 (Core Profile) Mesa 24.3.4-arch1.1", backend: Gl }
2025-03-02T06:01:58.575223Z  WARN bevy_pbr::ssao: ScreenSpaceAmbientOcclusionPlugin not loaded. GPU lacks support: TextureFormat::R16Float does not support TextureUsages::STORAGE_BINDING.
2025-03-02T06:01:58.575686Z  INFO bevy_winit::system: Creating new window "App" (0v1#4294967296)
2025-03-02T06:01:58.575771Z  INFO winit::platform_impl::linux::x11::window: Guessed window scale factor: 2
2025-03-02T06:01:58.577659Z  INFO bevy_yurrgoht::camera_controller: 
keen oracle
#

Backend: Gl

#

It's not using vulkan

#

Possibly because you have the webgl2 feature enabled

hexed agate
#

even when I disabled it it shows this exact thing

keen oracle
#

I think you're only supposed to enable that when compiling for web? Idr tbh

#

Set WGPU_BACKEND=VK as an env variable

hexed agate
#

okay, so for some reason bevy default to x11, and that lead to opengl?

#

I tried to removed x11, and that is causing different issues

#

I am now testing with wayland

keen oracle
#

X11/wayland has nothing to do with it

#

For some reason wgpu isin't using the vulkan backend

#

You might need to install VK drivers if you haven't done so

hexed agate
#

I do have them installed

#

I just do not understand why the validation layers are not passing

hexed agate
#

okay, I have tried to force vulkan, and that just makes things crash:

    Finished `dev` profile [optimized + debuginfo] target(s) in 0.14s
     Running `target/debug/bevy-yurrgoht`
2025-03-02T07:04:31.842625Z  INFO bevy_diagnostic::system_information_diagnostics_plugin::internal: SystemInfo { os: "Linux rolling EndeavourOS", kernel: "6.13.5-arch1-1", cpu: "12th Gen Intel(R) Core(TM) i7-12700F", core_count: "12", memory: "31.2 GiB" }
2025-03-02T07:04:31.868629Z ERROR wgpu_hal::vulkan::instance: GENERAL [Loader Message (0x0)]
        /usr/lib/libVkLayer_khronos_validation.so: undefined symbol: _ZN3vku42safe_VkVideoSessionParametersCreateInfoKHR10initializeEPK37VkVideoSessionParametersCreateInfoKHRPNS_14PNextCopyStateE    
2025-03-02T07:04:31.868642Z ERROR wgpu_hal::vulkan::instance:   objects: (type: INSTANCE, hndl: 0x580c6529f780, name: ?)    
2025-03-02T07:04:31.868645Z ERROR wgpu_hal::vulkan::instance: GENERAL [Loader Message (0x0)]
        Requested layer "VK_LAYER_KHRONOS_validation" failed to load!    
2025-03-02T07:04:31.868648Z ERROR wgpu_hal::vulkan::instance:   objects: (type: INSTANCE, hndl: 0x580c6529f780, name: ?)    

thread 'main' panicked at /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/bevy_render-0.15.3/src/renderer/mod.rs:196:10:
Unable to find a GPU! Make sure you have installed required drivers! For extra information, see: https://github.com/bevyengine/bevy/blob/latest/docs/linux_dependencies.md
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
spring gulch
#

it feels like it is ignoring VK when loading with the default because you don't have the loaders installed

vague tulip
#

im getting this aswell:

/usr/lib/libVkLayer_khronos_validation.so: undefined symbol: _ZN3vku42safe_VkVideoSessionParametersCreateInfoKHR10initializeEPK37VkVideoSessionParametersCreateInfoKHRPNS_14PNextCopyStateE

wayland and non-wayland.
youre probably on archlinux aswell right?

spring gulch
#
SystemInfo { os: "Linux rolling EndeavourOS", kernel: "6.13.5-arch1-1", 

from their comment

#
Depending on your graphics card, you may have to install one of the following: vulkan-radeon, vulkan-intel, or mesa-vulkan-drivers
vague tulip
#

i do have all deps i just checked

#

and double checked

#

it runs in release mode because validation is disabled there

#

im having this exact problem and i bet @hexed agate does aswell

#

yepp

#

i just used vkconfig to disable validation and it works without issue.

  • install vulkan-extra-tools
  • launch vkconfig-gui
  • in the first tab for validation and synchronization set VK_LAYER_KHRONOS_validation to disabled

i think this is a vulkan-validation-layers issue not a bevy issue but im very confused because that issue i sent is super old and has already been solved

spring gulch
#

they can't even start the application because wgpu can't find a vulkan capable GPU

vague tulip
#

The issue is here:

/usr/lib/libVkLayer_khronos_validation.so: undefined symbol: _ZN3vku42safe_VkVideoSessionParametersCreateInfoKHR10initializeEPK37VkVideoSessionParametersCreateInfoKHRPNS_14PNextCopyStateE

#

If they run and build the game in release mode (with vulkan enabled ofc) im quite certain it will work

vague tulip
vague tulip
#

yepp, same exact error:

    Finished `dev` profile [optimized + debuginfo] target(s) in 0.29s
     Running `target/debug/cyberspace3`
2025-03-02T15:21:09.624826Z ERROR wgpu_hal::vulkan::instance: GENERAL [Loader Message (0x0)]
    /usr/lib/libVkLayer_khronos_validation.so: undefined symbol: _ZN3vku42safe_VkVideoSessionParametersCreateInfoKHR10initializeEPK37VkVideoSessionParametersCreateInfoKHRPNS_14PNextCopyStateE
2025-03-02T15:21:09.624844Z ERROR wgpu_hal::vulkan::instance:     objects: (type: INSTANCE, hndl: 0x5a0caa095690, name: ?)
2025-03-02T15:21:09.624853Z ERROR wgpu_hal::vulkan::instance: GENERAL [Loader Message (0x0)]
    Requested layer "VK_LAYER_KHRONOS_validation" failed to load!
2025-03-02T15:21:09.624857Z ERROR wgpu_hal::vulkan::instance:     objects: (type: INSTANCE, hndl: 0x5a0caa095690, name: ?)
2025-03-02T15:21:09.641317Z  INFO bevy_render::renderer: AdapterInfo { name: "AMD Radeon RX 6900 XT (radeonsi, navi21, LLVM 19.1.7, DRM 3.61, 6.13.5-arch1-1)", vendor: 4098, device: 0, device_type: Other, driver: "", driver_info: "4.6 (Core Profile) Mesa 24.3.4-arch1.1", backend: Gl }
2025-03-02T15:21:09.709013Z  INFO gilrs_core::platform::platform::gamepad: Gamepad /dev/input/event30 (Boardsource boardsource/unicorne System Control) connected.
2025-03-02T15:21:09.723477Z  WARN bevy_pbr::ssao: ScreenSpaceAmbientOcclusionPlugin not loaded. GPU lacks support: TextureFormat::R16Float does not support TextureUsages::STORAGE_BINDING.
2025-03-02T15:21:09.723704Z  INFO bevy_winit::system: Creating new window "App" (0v1#4294967296)
2025-03-02T15:21:09.727932Z  INFO bevy_input::gamepad: Gamepad 14v1#4294967310 connected.
2025-03-02T15:21:09.763758Z ERROR wgpu_hal::gles::egl: EGL 'eglMakeCurrent' code 0x3008: eglMakeCurrent

my gpu is also suddenly detected with driver "" backend: Gl

#

and if i run it in release mode:

2025-03-02T15:23:18.047235Z INFO bevy_render::renderer: AdapterInfo { name: "AMD Radeon RX 6900 XT", vendor: 4098, device: 29631, device_type: DiscreteGpu, driver: "AMD open-source driver", driver_info: "2025.Q1.2 (LLPC)", backend: Vulkan }

#

is it possible that its falling back to using opengl because the vulkan checks didnt pass?

hexed agate
#

At least it's not something I did

vague tulip
hexed agate
#

it most certainly does

#

so it is validation layers that are causing issues

#

ironic

vague tulip
#

because i get this aswell:

Running ldd -d /usr/lib/libVkLayer_khronos_validation.so I actually see a whole bunch of undefined symbols.

hexed agate
#

apparently it helps to download the official SDK and no packages

vague tulip
#

oh? how do you mean?

hexed agate
vague tulip
#

oh perfect thank you!

#

its so new google didnt find it :'D

#

ech ill just build in release until arch resolves this

hexed agate
#

I uninstalled the validation layers

#

works fine now

vague tulip
#

o

hexed agate
#

just the validation layer package

#

and the extra layeer package

#

I figured a situation like this would happen to me one day, I just didnt know when. I've been on an arch based system with no major issues for too long

vague tulip
#

it probably just doesnt do validation anymore if you uninstall it right?

hexed agate
#

I think so

vague tulip
#

yet works haha

#

love it

hexed agate
#

In the long run, we should want to have validation layers, but for now, this is a good temp fix

vague tulip
#

ech who needs validation :p

hexed agate
vague tulip
#

i think bevy should let you know that its doing some crazy fallback stuff because all the people in this thread have been very much misled by the errors bevy outputs

vague tulip
hexed agate