-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
requirement for users to select wgpu features is undocumented & resulting errors hard to interpret #4885
Comments
Okay, I found what the problem was. So in order to get DX12 working, I had to enable the default feature flags for wgpu in [package]
name = "dx12eframe"
version = "0.1.0"
edition = "2021"
[dependencies]
eframe = { git = "https://github.com/emilk/egui", branch = "master", features = [
"wgpu",
] }
wgpu = { version = "22.0.0", default-features = true, features = [
"fragile-send-sync-non-atomic-wasm",
] }
env_logger = "0.11.5" I think this should be written somewhere in the documentation, because this behavior (for me, a newcomer to Rust) was very unclear and I spent so much time wondering what it could be, only to find out that it was just an unenabled feature flag. Alternatively, I want to propose an approach that is used in |
I think it should be possible to panic if you pass a backend to wgpu that isn't compiled in. Because actually the information is all there: But with a panic its harder to miss, and doesn't need documentation. |
PTAL @Wumpf |
Documenting the behavior would be good, yes!
Hmm yeah we should have some runtime error (would be good if it doesn't need to be panic and can be more graceful). I added wgpu::Instance::enabled_backend_features not too long ago to do this sort of check at runtime. |
Describe the bug
DirectX12 doesn't work with eframe and errors with error:
Here is minimal example:
Cargo.toml
main.rs
It's only happening for me while using DX12 (GL and Vulkan works fine). But when I use only wgpu with winit (exactly code from here) it works, so I guess it must be a bug in egui/eframe (that's why I post issue here).
Desktop:
name: "NVIDIA GeForce RTX 2070 SUPER",
vendor: 4318,
device: 7812,
device_type: DiscreteGpu,
driver: "31.0.15.4617",
driver_info: "",
backend: Dx12,
}
If there's anything else you need me to provide or check then just say :)
The text was updated successfully, but these errors were encountered: