-
Notifications
You must be signed in to change notification settings - Fork 977
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
Example hello fails on MS Windows #4109
Comments
The error comes from here: https://chromium.googlesource.com/angle/angle/+/4b94d7bb4fbed9018d198dfdc50c3aa5f9be3ddf/src/libEGL/libEGL.cpp#47. I'm not sure why though and it doesn't seem there is a way to catch and deal with this error. |
I think we've seen this before, if you get a weird version of angle in your path first you'll get this problem. I'm really not sure why it happens, but putting a normally built angle in path fixes it. |
It's also odd that the cube example works but not the hello. @tigerwings do the other examples work?
It might have to do with the |
Stepping a bit back: The examples don't require any additional feature flags and the What we probably want to do is enable |
under v0.16 and in those I tried: under v0.17: none of them work. the new error shows:
|
Could you show the whole issue - likely you're missing a C compiler? |
I was able to reproduce it, this error occurs when libEGL is not found when using the GL backend. The cause of this problem is that the environment variable |
reproducible minimum source code.
async fn run() {
let instance = wgpu::Instance::new(wgpu::InstanceDescriptor {
backends: wgpu::Backends::GL,
flags: wgpu::InstanceFlags::default(),
dx12_shader_compiler: wgpu::Dx12Compiler::default(),
gles_minor_version: wgpu::Gles3MinorVersion::default(),
});
instance
.request_adapter(&wgpu::RequestAdapterOptions::default())
.await
.unwrap();
}
fn main() {
env_logger::init();
pollster::block_on(run());
} important line is DEBUG wgpu_core::instance] Instance::new: failed to create Gl backend in the log, so do not forget to |
This explains why some of the examples were working and some were not. |
With #4185 merged, the GLES backend is now disabled by default on Windows. I think we can close this issue and open a new one to track moving the examples over to use the example framework (which takes into account env variables). @cwfitzgerald thoughts on this? |
The |
We are done here then 🎉 |
I have the same problem even after you merged #4185 |
What is the exact error you're getting? |
My gpu does not support DirectX 12 or Vulkan. To be sure that OpenGL was used instead of any other API, I tried replacing |
Could you post a stack trace on a new issue, using latest trunk? |
Description
Run hello on Microsoft Windows 10
while
cargo run --example cube
works.Repro steps
After tracing down the issue, it seems this line is the root cause. And the stack trace is the following:
Expected vs observed behavior
The example should run successfully on Windows.
Extra materials
Screenshots to help explain your problem.
Validation logs can be attached in case there are warnings and errors.
Zip-compressed API traces and GPU captures can also land here.
Platform
Information about your OS, version of
wgpu
, your tech stack, etc.OS: Microsoft Windows 10
wgpu: trunk
The text was updated successfully, but these errors were encountered: