Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

thread panic when creating surface #663

Open
SuperSimon81 opened this issue Jan 16, 2025 · 4 comments
Open

thread panic when creating surface #663

SuperSimon81 opened this issue Jan 16, 2025 · 4 comments

Comments

@SuperSimon81
Copy link

Hi I have been enjoying wgpu and wgpu-py for a while. Recently getting back to it I'm unable to run it. Any time I try to run any example (except compute_noop.py which doesn't use surface) I get the following:

thread` '<unnamed>' panicked at src/lib.rs:582:5:
Error in wgpuSurfaceConfigure: Validation Error

Caused by:
  Surface does not support the adapter's queue family

stack backtrace:
   0: _rust_begin_unwind
   1: core::panicking::panic_fmt
   2: wgpu_native::handle_error_fatal
   3: _wgpuSurfaceConfigure
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
fatal runtime error: failed to initiate panic, error 5

I´m running a Mac M1 if that makes any difference. Anyone familiar with this issue?

@SuperSimon81
Copy link
Author

Forcing WGPU_BACKEND_TYPE=Metal fixed the issue. Do not know why.

@almarklein
Copy link
Member

Interesting. Thanks for reporting this.

What does wgpu.gpu.request_adapter_sync().info give when you don't set WGPU_BACKEND_TYPE?

@SuperSimon81
Copy link
Author

SuperSimon81 commented Jan 17, 2025

I recently played around with Vulkan in Rust so I think the issue is that installing MoltenVK or Vulkan SDK made WGPU default to Vulkan which causes the error. Here is the .info without forcing Metal.

{'vendor':` 'MoltenVK', 'architecture': '', 'device': 'Apple M1', 'description': '1.2.11', 'vendor_id': 4203, 'device_id': 235340295, 'adapter_type': 'IntegratedGPU', 'backend_type': 'Vulkan'}

And here is with forcing Metal:

{'vendor': '', 'architecture': '', 'device': 'Apple M1', 'description': '', 'vendor_id': 0, 'device_id': 0, 'adapter_type': 'IntegratedGPU', 'backend_type': 'Metal'}

I can't understand why Vulkan wouldn't work, though.

@almarklein
Copy link
Member

Interesting that Vulkan is preferred over Metal on MacOS. I wonder whether that's intentional.

I can't understand why Vulkan wouldn't work, though.

No, that looks like a bug to me too. We're a bit behind wgpu-core now though, so it may have been fixed upstream.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants