Skip to content

Commit 15ce558

Browse files
authored
Always enable OpenGL fallback backend, fix --renderer=gl only working 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`.
1 parent ba4642a commit 15ce558

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

crates/re_renderer/src/config.rs

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -223,16 +223,18 @@ pub struct RenderContextConfig {
223223
/// Other backend might work as well, but lack of support isn't regarded as a bug.
224224
pub fn supported_backends() -> wgpu::Backends {
225225
if cfg!(native) {
226-
// Native.
227-
// Only use Vulkan & Metal unless explicitly told so since this reduces surfaces and thus surprises.
228-
//
229-
// Bunch of cases where it's still useful to switch though:
230-
// * Some Windows VMs only provide DX12 drivers, observed with Parallels on Apple Silicon
231-
// * May run into Linux issues that warrant trying out the GL backend.
226+
// Native: Everything but DX12
227+
// * Wgpu's DX12 impl isn't in a great shape yet and there's now reason to add more variation
228+
// when we can just use Vulkan
229+
// So far, the main reason against it would be that some Windows VMs only provide DX12 drivers,
230+
// observed with Parallels on Apple Silicon. In the future we might want to reconsider
231+
// based on surface/presentation support which may be better with DX12.
232+
// * We'd like to exclude GL, but on Linux this can be a very useful fallback for users with
233+
// with old hardware or bad/missing drivers. Wgpu automatically prefers Vulkan over GL when possible.
232234
//
233235
// For changing the backend we use standard wgpu env var, i.e. WGPU_BACKEND.
234236
wgpu::util::backend_bits_from_env()
235-
.unwrap_or(wgpu::Backends::VULKAN | wgpu::Backends::METAL)
237+
.unwrap_or(wgpu::Backends::VULKAN | wgpu::Backends::METAL | wgpu::Backends::GL)
236238
} else {
237239
wgpu::Backends::GL | wgpu::Backends::BROWSER_WEBGPU
238240
}

0 commit comments

Comments
 (0)