1291: Add color blend modes r=kvark a=cwfitzgerald
Continuation of #1289, because apparently you can't re-open an accidentally closed pull request if you force pushed...
Should be GTG.
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
1281: Rename `level_count` to `mip_level_count` r=kvark a=grovesNL
**Description**
This PR renames `level_count` to `mip_level_count` on `TextureViewDescriptor`. This follows the naming in the specification, located at https://gpuweb.github.io/gpuweb/#texture-view-creation
**Testing**
`cargo build` and `cargo test` only, naming changes will be made downstream in wgpu-rs too.
Co-authored-by: Joshua Groves <josh@joshgroves.com>
1276: Align create_swap_chain function signature r=cwfitzgerald a=kvark
**Connections**
Follow-up to #1034
**Description**
Swapchains are a bit special. Browsers don't use wgpu-core's swapchains, so we never bothered to convert them into the error model. But we still need this for Deno and webgpu-headers.
**Testing**
Untested, but also harmless
Co-authored-by: Dzmitry Malyshau <kvark@fastmail.com>
1280: Rename color/depth attachments to match spec r=kvark a=grovesNL
**Description**
- Rename `ColorAttachmentDescriptor` to `RenderPassColorAttachment` (https://gpuweb.github.io/gpuweb/#color-attachments)
- Rename `DepthStencilAttachmentDescriptor` to `RenderPassDepthStencilAttachment` (https://gpuweb.github.io/gpuweb/#depth-stencil-attachments)
- Rename `attachment` fields on both attachments to `view`
**Testing**
None (just `cargo build`) because the renaming downstream should be trivial.
Co-authored-by: Joshua Groves <josh@joshgroves.com>
- Rename `ColorAttachmentDescriptor` to `RenderPassColorAttachment`
- Rename `DepthStencilAttachmentDescriptor` to `RenderPassDepthStencilAttachment`
- Rename `attachment` fields on both attachments to `view`
1279: Fix some typos r=kvark a=grovesNL
**Description**
Fix a few small typos in doc comments
**Testing**
None
Co-authored-by: Joshua Groves <josh@joshgroves.com>
1278: Rename copy views and layout to match spec r=kvark a=grovesNL
**Description**
Match the specification naming changes from https://github.com/gpuweb/gpuweb/pull/1375
**Testing**
None because the changes downstream to wgpu-rs and wgpu-native should be trivial (renaming only)
Co-authored-by: Joshua Groves <josh@joshgroves.com>
1275: rows_per_image & rows_per_image are now optional r=kvark a=Wumpf
Fixes#988
Was surprisingly hard, hope it's correct; testing could be more extensive...
Ideas for more elegant handling very welcome.
**Testing**
Tested against wgpu-rs samples
Co-authored-by: Andreas Reich <r_andreas2@web.de>
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>