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

Improve error message (and investigate causes) for unsuitable GL adapter #6581

Open
Wumpf opened this issue Jun 17, 2024 · 0 comments
Open
Labels
🪳 bug Something isn't working 🔺 re_renderer affects re_renderer itself

Comments

@Wumpf
Copy link
Member

Wumpf commented Jun 17, 2024

With wgpu 0.20 we no longer get crashes in these situations, but whenever there's no available graphics adapter we exit with a less than optimal error message.
One such instance was successfully reproduced by @02alexander:

✨ Pixi task (rerun in default): cargo run --package rerun-cli --no-default-features --features native_viewer -- --renderer gl
    Finished dev [optimized + debuginfo] target(s) in 0.18s
     Running `target/debug/rerun --renderer gl`
[2024-05-30T11:50:29Z DEBUG rerun::run] Detected 12 cores. Using 10 compute threads.
[2024-05-30T11:50:29Z DEBUG re_memory::memory_limit] Setting memory limit to 22.9 GiB, which is 75% of total available memory (30.5 GiB).
[2024-05-30T11:50:29Z INFO  re_sdk_comms::server] Hosting a SDK server over TCP at 0.0.0.0:9876. Connect with the Rerun logging SDK.
[2024-05-30T11:50:29Z INFO  re_viewer] Forcing graphics backend to Gl.
[2024-05-30T11:50:29Z DEBUG eframe] Using the wgpu renderer
[2024-05-30T11:50:29Z WARN  winit::platform_impl::platform::x11::xdisplay] error setting XSETTINGS; Xft options won't reload automatically
[2024-05-30T11:50:29Z DEBUG eframe::native::wgpu_integration] Event::Resumed
[2024-05-30T11:50:29Z DEBUG eframe::native::file_storage] Loading app state from "/home/alexander/.local/share/rerun/app.ron"…
[2024-05-30T11:50:29Z INFO  winit::platform_impl::platform::x11::window] Guessed window scale factor: 1
[2024-05-30T11:50:29Z DEBUG winit::platform_impl::platform::x11::window] Calculated physical dimensions: 1461x908
[2024-05-30T11:50:29Z WARN  wgpu_hal::gles::egl] No config found!
[2024-05-30T11:50:29Z WARN  wgpu_hal::gles::egl] EGL says it can present to the window but not natively
[2024-05-30T11:50:29Z INFO  egui_wgpu] The only available wgpu adapter was not suitable: backend: Gl, device_type: Other, name: "NVIDIA GeForce RTX 3060/PCIe/SSE2", driver: "OpenGL", driver_info: "4.6.0 NVIDIA 550.78", vendor: 0x10DE
[2024-05-30T11:50:29Z ERROR eframe::native::run] Exiting because of error: WGPU error: Failed to create wgpu adapter, no suitable adapter found. during event Resumed
[2024-05-30T11:50:29Z DEBUG eframe::native::run] Asking to exit event loop…
[2024-05-30T11:50:29Z DEBUG eframe::native::run] Received Event::LoopExiting - saving app state…
[2024-05-30T11:50:29Z DEBUG eframe::native::run] eframe window closed
Error: WGPU error: Failed to create wgpu adapter, no suitable adapter found.

This bit here is likely relevant:

[2024-05-30T11:50:29Z WARN  wgpu_hal::gles::egl] No config found!
[2024-05-30T11:50:29Z WARN  wgpu_hal::gles::egl] EGL says it can present to the window but not natively

This is the wgpu-info output for this adapter wgpu-info.txt

@Wumpf Wumpf added 🪳 bug Something isn't working 🔺 re_renderer affects re_renderer itself labels Jun 17, 2024
Wumpf added a commit that referenced this issue Jun 17, 2024
…ng together with `WGPU_BACKEND` env-var (#6582)

### What

Previously, we made the GL backend explicit opt-in (and accidentally
only via the wgpu env var, not solely via commandline). But I don't see
any reason for this as wgpu will (well, should) always prefer Vulkan
when available.

* Fixes [#5968](#5968)
* Reportedly there's still sometimes issues with he GL backend, but this
is captured now in #6581

### Checklist
* [x] I have read and agree to [Contributor
Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and
the [Code of
Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md)
* [x] I've included a screenshot or gif (if applicable)
* [x] I have tested the web demo (if applicable):
* Using examples from latest `main` build:
[rerun.io/viewer](https://rerun.io/viewer/pr/6582?manifest_url=https://app.rerun.io/version/main/examples_manifest.json)
* Using full set of examples from `nightly` build:
[rerun.io/viewer](https://rerun.io/viewer/pr/6582?manifest_url=https://app.rerun.io/version/nightly/examples_manifest.json)
* [x] The PR title and labels are set such as to maximize their
usefulness for the next release's CHANGELOG
* [x] If applicable, add a new check to the [release
checklist](https://github.com/rerun-io/rerun/blob/main/tests/python/release_checklist)!

- [PR Build Summary](https://build.rerun.io/pr/6582)
- [Recent benchmark results](https://build.rerun.io/graphs/crates.html)
- [Wasm size tracking](https://build.rerun.io/graphs/sizes.html)

To run all checks from `main`, comment on the PR with `@rerun-bot
full-check`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🪳 bug Something isn't working 🔺 re_renderer affects re_renderer itself
Projects
None yet
Development

No branches or pull requests

1 participant