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>
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>
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>
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>
1243: Force-drop the token before calling fire_map_callbacks r=kvark a=kvark
**Connections**
Related to WebGPU update in Gecko
**Description**
Since the token was alive, technically, we saw an assertion firing up about concurrent access to the token root.
**Testing**
Tested in Gecko
Co-authored-by: Dzmitry Malyshau <dmalyshau@mozilla.com>
1240: Fix issue with multiple queued mappings where the last one is not cancelled r=kvark a=Imberflur
**Connections**
Follow up from #1239
**Description**
In #1239 I missed the case where there are multiple rounds of mapping/unmapping with the last map not being cancelled. In practice it doesn't occur very often, but I did encounter it with settings/a scene that created a heavy GPU load.
Sorry for not catching this earlier!
**Testing**
Using `wgpu-rs` capture example, after the first `map_async` I added in an `unmap` followed by another `map_async`.
<!--
Non-trivial functional changes would need to be tested through:
- [wgpu-rs](https://github.com/gfx-rs/wgpu-rs) - test the examples.
- [wgpu-native](https://github.com/gfx-rs/wgpu-native/) - check the generated C header for sanity.
Ideally, a PR needs to link to the draft PRs in these projects with relevant modifications.
See https://github.com/gfx-rs/wgpu/pull/666 for an example.
If you can add a unit/integration test here in `wgpu`, that would be best.
-->
Co-authored-by: Imbris <imbrisf@gmail.com>
1239: Avoid panic when requesting to unmap a buffer that is pending mapping r=kvark a=Imberflur
**Connections**
Fix for #1238
**Description**
This might not be the cleanest fix but it is quite minimal. I'm not sure what the exact intent is with the organization of things and with the async status enum, would be happy to hear critiques.
**Testing**
Tested against example in #1238
<!--
Non-trivial functional changes would need to be tested through:
- [wgpu-rs](https://github.com/gfx-rs/wgpu-rs) - test the examples.
- [wgpu-native](https://github.com/gfx-rs/wgpu-native/) - check the generated C header for sanity.
Ideally, a PR needs to link to the draft PRs in these projects with relevant modifications.
See https://github.com/gfx-rs/wgpu/pull/666 for an example.
If you can add a unit/integration test here in `wgpu`, that would be best.
-->
Co-authored-by: Imbris <imbrisf@gmail.com>
1237: Move `#[error]` attributes after the corresponding `#[derive]` r=kvark a=Aaron1011
**Connections**
See https://github.com/rust-lang/rust/issues/79202
**Description**
Fixes Nightly future-incompat warnings
**Testing**
There are no behavior changes intended.
Co-authored-by: Aaron Hill <aa1ronham@gmail.com>