1274: Update naga to gfx-17 r=kvark a=kvark
**Connections**
Includes https://github.com/gfx-rs/gfx/pull/3688
**Description**
Here comes the "gfx-17" naga train!
**Testing**
Tested on wgpu-rs examples
Co-authored-by: Dzmitry Malyshau <kvark@fastmail.com>
800: Schedule event waits after redraw events are cleared r=kvark a=kvark
As @adamnemecek pointed out, our examples were busy waiting.
I investigated a bit and figured that our `WaitScheduled` was always interrupted by `RedrawEventsCleared`. So scheduling the wait in it works. Tested on Linux and macOS. CPU time of the cube example drops from 100% to single-digit.
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
1272: Add sample count to framebuffer key r=kvark a=kvark
**Connections**
Fixes#1271
**Description**
The framebuffer is created for a pass, so naturally the hashmap key for a framebuffer has to include the pass key. Otherwise, we'd be overwriting the framebuffer entry, or using a framebuffer from a different pass. The sample count was missing from our FB key.
**Testing**
Tested on a trace from #1271 that I hand-ported to latest master.
Co-authored-by: Dzmitry Malyshau <dmalyshau@mozilla.com>
799: Update naga to gfx-16 r=kvark a=kvark
Makes WGSL constants much more ergonomic to write, and fixes the issues we had with the water example.
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
1270: Update naga to gfx-16 r=kvark a=kvark
**Connections**
Picks up https://github.com/gfx-rs/gfx/pull/3684
**Description**
Just an update
**Testing**
Tested on wgpu-rs examples
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
1268: Move from `tracing` to `log` + `profiling` r=kvark a=cwfitzgerald
**Connections**
Fixes#1211. Fixes#1189.
**Description**
Moves from `tracing` to `log` + `profiling`. I also removed some of the offending spans that were only for pushing commands onto a vector of commands.
**Testing**
Tested on wgpu-rs
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
* chore: validate offset + size in get_mapped_range
This commit introduces out of bounds & offset validation for
buffer_get_mapped_range, like described in the WebGPU spec. See
https://gpuweb.github.io/gpuweb/#dom-gpubuffer-getmappedrange.
Closes#818
* review comments
* fmt
* fix test
* fix tests
* update error message
* review comment
* use wgt::BufferAddress
* clippy
* Add CONSERVATIVE_RASTERIZATION native feature
* update gfx to cd3042d8c02d9dc7fc74ac8c292099c9789f6d43
* error for polygon mode not fill +conservative raster
1258: Lint all the things r=kvark a=kvark
**Connections**
Fixes#1250
**Description**
Refactors the code to satisfy the linter, configures it, and enables on CI.
**Testing**
`cargo clippy` saves the dau
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
1254: Fix swapchain resize in the player r=kvark a=kvark
**Connections**
Fixes 1253
**Description**
I was fixing this recently, and I'm not sure how it worked, because there is a big inner `loop` that I didn't notice before 😅 .
So now we exit the inner loop upon resize.
**Testing**
Tested on the supplied API trace
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
* wgpu-core: update gfx-hal usage related to sparse resources
* wgpu-core: support naga gfx-13
* Update gfx and naga dependencies to gfx-13 tag
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
1251: Don't panic on pipeline creation errors r=kvark a=kvark
**Connections**
Related to Gecko crashes.
**Description**
We shouldn't ever panic in `wgpu`. The panic can only occur if there is internal inconsistency. For any invalid workloads, submitted by the user, we should produce errors instead.
**Testing**
Not tested
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
1247: Add license to the memory init tracker r=kvark a=kvark
**Connections**
Gecko's code lints complain...
**Description**
Add a license header like all the other files
**Testing**
should work!
Co-authored-by: Dzmitry Malyshau <dmalyshau@mozilla.com>
1246: Fix link to the "debugging tips" page r=kvark a=maroider
**Description**
The link was broken.
**Testing**
I used the link :P
Co-authored-by: Markus Røyset <maroider@protonmail.com>
781: Mark BufferMappedRange Send/Sync on native r=kvark a=cwfitzgerald
This fixes an issue reported on the matrix where this was causing things to unnecessarily be !Send. There's no reason I can see that this couldn't be Send/Sync as we only use it like one would a slice. We might also consider backporting this to 0.7.
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
1245: Trace pipeline creation before it actually happens r=kvark a=kvark
**Connections**
Fixes#1174
**Description**
We want to add descriptors to the trace before panicking if anything goes wacky.
**Testing**
tested on wgpu-rs examples
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>