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

Add a way to force WebGPU / WebGL #4898

Closed
Wumpf opened this issue Jan 24, 2024 · 1 comment · Fixed by #4981
Closed

Add a way to force WebGPU / WebGL #4898

Wumpf opened this issue Jan 24, 2024 · 1 comment · Fixed by #4981
Assignees
Labels
enhancement New feature or request 🕸️ web regarding running the viewer in a browser
Milestone

Comments

@Wumpf
Copy link
Member

Wumpf commented Jan 24, 2024

Recently, we flipped the switch on main to pick automatically WebGPU when available now that wgpu supports this 🥳
However, WebGPU is still experimental and Chrome only, so it's likely that it may break when we least expect it.

Therefore, there should be an easy way to switch to either and offer so when we detect a crash in the browser!

@Wumpf Wumpf added enhancement New feature or request 🕸️ web regarding running the viewer in a browser labels Jan 24, 2024
@Wumpf Wumpf added this to the 0.13 milestone Jan 24, 2024
@Wumpf Wumpf changed the title Add a way to force WebGPU / WebGL on the web Add a way to force WebGPU / WebGL Jan 24, 2024
@Wumpf Wumpf self-assigned this Jan 29, 2024
@emilk
Copy link
Member

emilk commented Jan 30, 2024

At least make sure there is a ?renderer=webgl query parameter or similar that we can tell users to set

Wumpf added a commit that referenced this issue Feb 1, 2024
…nt to force graphics backend (#4981)

### What

* Fixes #4898

Bunch of related things that go in here:
* url parameter to force webgl/webgpu: `&renderer=webgpu` or
`&renderer=webgl`
* command line argument with similar syntax, can be used both for web
player and native e.g. `--renderer gl`, `--web-viewer --renderer webgpu`
* show webgpu/webgl url on crash
* ui action for reloading webpage with webgpu or webl
* updated trouble shooting docs on


Parsing of backend is actually fairly fuzzy but in docs I stick with
wgpu names. Front facing we talk usually about "renderer" but internally
we're more correct and call it "wgpu backend" which requires knowing a
bit more about how things work.



https://github.com/rerun-io/rerun/assets/1220815/ae83d405-2541-4cc5-8a8f-59478a2437e9

Screen on crash:

![image](https://github.com/rerun-io/rerun/assets/1220815/bf373567-02cf-4834-9b32-07d4d2e514e8)

### 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 newly built examples:
[app.rerun.io](https://app.rerun.io/pr/4981/index.html)
* Using examples from latest `main` build:
[app.rerun.io](https://app.rerun.io/pr/4981/index.html?manifest_url=https://app.rerun.io/version/main/examples_manifest.json)
* Using full set of examples from `nightly` build:
[app.rerun.io](https://app.rerun.io/pr/4981/index.html?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

- [PR Build Summary](https://build.rerun.io/pr/4981)
- [Docs
preview](https://rerun.io/preview/7d50a7f256f9144a5340c896b56d4e64c7beeb74/docs)
<!--DOCS-PREVIEW-->
- [Examples
preview](https://rerun.io/preview/7d50a7f256f9144a5340c896b56d4e64c7beeb74/examples)
<!--EXAMPLES-PREVIEW-->
- [Recent benchmark results](https://build.rerun.io/graphs/crates.html)
- [Wasm size tracking](https://build.rerun.io/graphs/sizes.html)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request 🕸️ web regarding running the viewer in a browser
Projects
None yet
2 participants