966: Immediate resource destruction and freeing r=cwfitzgerald a=kvark
**Connections**
Fixes#964
**Description**
We are making it so a buffer or a texture can have their native resources freed while they are still referenced, so without waiting for GC.
In addition, the PR adds a few missing cases where error IDs should have been handled, like at render pass encoding.
**Testing**
Tested on wgpu-rs examples, see https://github.com/gfx-rs/wgpu-rs/pull/591
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
* Pass [u8] instead of [u32] for push constants
Use 2-instruction aligner
Fixed alignment
Fixed offsets
Added alignment checks and fixed size
Use semantic constants
* Replaced all magic number with constant
* Fixed type cast
963: Add repr(C) on mapping structs r=trivial a=kvark
**Connections**
Required for https://phabricator.services.mozilla.com/D92636
**Description**
Allows C clients to avoid redefining those structs.
**Testing**
No need
Co-authored-by: Dzmitry Malyshau <dmalyshau@mozilla.com>
938: Remove erroneous extra feature check r=kvark a=cwfitzgerald
**Connections**
None, found during investigation of DI issue.
**Description**
This line of code just shows up twice in a row, checking the same feature and setting the same feature.
**Testing**
Untested, but shouldn't affect anything.
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
* Allow dropping of error resources
* Unregister error resources without panic
Panic when removing Vacant element or when index is out of range
* address review comments
Purpose for this is to add more context to an error.
create_render_pipeline error is improved, by showing the action
(creating render pipeline) and the user provided label, to aid with
the investigation.
909: Add Quad play test r=kvark a=DevOrc
**Connections**
#807
**Description**
Adds a play test that renders a white quad to a texture. The texture is then copied to a buffer and checked for accuracy with a file of expected bytes (All 0xFF).
**Testing**
Cargo test succeeds
Co-authored-by: Noah Charlton <ncharlton002@gmail.com>
903: fix for mixed STORAGE_STORE and STORAGE_LOAD r=kvark a=kocsis1david
**Connections**
None
**Description**
A buffer that contains dynamic data is used for both uniforms and storage read. This was a problem for wgpu and it gave a `PendingTransition` error.
**Testing**
It's a trivial fix, but I don't know if there's an example for it in wgpu-rs that can be used for testing.
It seems that the PR "Sync changes from mozilla-central" is already solving the same issue.
Co-authored-by: Dávid Kocsis <kocsis1david@windowslive.com>
* Allow copying from depth textures
* Rename TextureFormat::is_depth_format to just is_depth
* Only allow Depth32Float format for copying, and only as source
895: Improve validation in B2B copies and RenderCommands r=kvark a=kunalmohan
**Connections**
_Link to the issues addressed by this PR, or dependent PRs in other repositories_
**Description**
_Describe what problem this is solving, and how it's solved._
Validation for the following have been added-
- Validate all parameters in B2B copy even if `copy_size == 0`.
- Check for copy operations issued within same buffer.
- `RenderPass.setViewport()`
- `RenderPass.setScissorRect()`
**Testing**
_Explain how this change is tested._
Tested with CTS in Servo. More tests pass now. Will test on wgpu-rs now.
<!--
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: Kunal Mohan <kunalmohan99@gmail.com>