Skip to content

Commit

Permalink
Update to wgpu 0.17 & latest egui (#2980)
Browse files Browse the repository at this point in the history
### What

* Depends on emilk/egui#3253
* allows for a bit nicer callback handling on our side. Still not
amazing but quite a bit better I reckon (no more locks and additional
ref counting on our side!). I was hoping to use the new, more flexible
`shared_paint_callback_resources` to store `ViewBuilder`, but it can't
be accessed without a handle to the eframe renderer.
The end goal would be to get rid of re_renderer's
`per_frame_data_helper`. This will likely be enabled with wgpu's
"Arcanization" effort as this will eliminate `wgpu::RenderPass`'s
lifetime dependency. In that case we could store a `Mutex<ViewBuilder>`
on `ReRendererCallback` 🤔
* For the forseeable future we'll have to enable
`fragile-send-sync-non-atomic-wasm` on wgpu (luckily egui itself no
longer has this restriction). The problem is that a lot of our
infrastructure is built around assuming `Send`/`Sync` whereas in
actuality webgpu rendering resources can't be shared accross threads
easily.
* Had to (discover and) work around
https://github.com/gfx-rs/naga/issues/2436

### 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 [demo.rerun.io](https://demo.rerun.io/pr/2980) (if
applicable)
* [x] Test WebGPU build

- [PR Build Summary](https://build.rerun.io/pr/2980)
- [Docs
preview](https://rerun.io/preview/pr%3Aandreas%2Fupdate-wgpu/docs)
- [Examples
preview](https://rerun.io/preview/pr%3Aandreas%2Fupdate-wgpu/examples)
  • Loading branch information
Wumpf authored Aug 16, 2023
1 parent ee7e624 commit a0ac010
Show file tree
Hide file tree
Showing 21 changed files with 238 additions and 270 deletions.
128 changes: 72 additions & 56 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit a0ac010

Please sign in to comment.