Open ProkopRandacek opened 1 year ago
Can you run the wgpu examples - that is, clone https://github.com/gfx-rs/wgpu and execute cargo run --example boids
The error you're getting is indicating that there are no GPU devices on your system which support the surface being created.
I can run the boids example without issues from HEAD, 0.16.0 and 0.16.1
i coincidentally ran into it too, wgpu examples worked because they fallback to GL if vulkan isnt present, vello didn't reinstalling vulkan solved the problem
I can confirm that my laptop doesnt support vulkan.
GL is not a primary WGPU backend, replace ::PRIMARY with ::GL and see if it works https://github.com/linebender/vello/blob/ea224b459c48267e0e63747c9b192d62ef432ac9/src/util.rs#L43
It throws a wgpu validation error on my end, not sure how much work it would be to make vello work on GL but anyways it would be nice to have better error reporting, like if backends {} else {"You need to have a Vulkan/metal/dx12 driver to run this app"}
Chaning to ::GL
did move the issue somewhere else:
~/source/vello 101 % git d
diff --git a/src/util.rs b/src/util.rs
index 87e2d35..9a28f41 100644
--- a/src/util.rs
+++ b/src/util.rs
@@ -40,7 +40,7 @@ pub struct DeviceHandle {
impl RenderContext {
pub fn new() -> Result<Self> {
let instance = Instance::new(wgpu::InstanceDescriptor {
- backends: wgpu::Backends::PRIMARY,
+ backends: wgpu::Backends::GL,
dx12_shader_compiler: wgpu::Dx12Compiler::Fxc,
});
Ok(Self {
~/source/vello 0 % cargo run -p with_winit
Finished dev [unoptimized + debuginfo] target(s) in 0.42s
Running `target/debug/with_winit_bin`
[2023-06-01T16:53:52Z ERROR sctk_adwaita::config] XDG Settings Portal did not return response in time: timeout: 100ms, key: color-scheme
Creating renderer 0
[2023-06-01T16:53:52Z ERROR wgpu_hal::gles::egl] GLES: [ShaderCompiler/Error] ID 2 : 0:688(2): error: `return' with wrong type float[4], in function `fill_path' returning float
[2023-06-01T16:53:52Z ERROR wgpu_hal::gles::egl] GLES: [ShaderCompiler/Error] ID 3 : 0:775(2): error: `return' with wrong type float[4], in function `stroke_path' returning float
[2023-06-01T16:53:52Z ERROR wgpu_hal::gles::egl] GLES: [ShaderCompiler/Error] ID 4 : 0:850(2): error: value of type float cannot be assigned to variable of type float[4]
[2023-06-01T16:53:52Z ERROR wgpu_hal::gles::egl] GLES: [ShaderCompiler/Error] ID 5 : 0:859(2): error: value of type float cannot be assigned to variable of type float[4]
[2023-06-01T16:53:52Z ERROR wgpu::backend::direct] Handling wgpu errors as fatal by default
thread 'main' panicked at 'wgpu error: Validation Error
Caused by:
In Device::create_compute_pipeline
note: label = `fine`
Internal error: 0:688(2): error: `return' with wrong type float[4], in function `fill_path' returning float
0:775(2): error: `return' with wrong type float[4], in function `stroke_path' returning float
0:850(2): error: value of type float cannot be assigned to variable of type float[4]
0:859(2): error: value of type float cannot be assigned to variable of type float[4]
', /home/prokop/.cargo/registry/src/github.com-1ecc6299db9ec823/wgpu-0.16.1/src/backend/direct.rs:3019:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: queue 0x7f0519b54170 destroyed while proxies still attached:
xdg_wm_base@20 still attached
wl_output@14 still attached
wl_seat@13 still attached
xdg_activation_v1@12 still attached
wp_viewporter@11 still attached
zwp_text_input_manager_v3@10 still attached
zwp_pointer_constraints_v1@9 still attached
zwp_relative_pointer_manager_v1@8 still attached
zxdg_decoration_manager_v1@7 still attached
wl_subcompositor@6 still attached
wl_compositor@5 still attached
wl_shm@4 still attached
wl_registry@2 still attached
~/source/vello 101 %
Is this still an issue? We recently updated winit.
Is this not a platform/API support issue, nothing to do with winit specifically?
The initial issue is that our with_winit
error handling for not supporting Vulkan is terrible, and the later comments are discussing attempting to get downlevel OpenGL working.
Hi :D
I am getting a crash when I try to build the example from readme:
Am I doing something wrong or is this a bug? Thanks for any help! I'm on alpine linux with wayland btw.