[deno] Fix dropping of command encoders/buffers, and an enum typo #7808
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #7797, a double-free error in deno. Command encoders, since they are the same wgpu object as the command buffer they become, should not be dropped after a buffer has been created from that encoder. Separately, I think command buffers should be explicitly dropped, even after they have been submitted.
Also fixes a typo in the GPUTextureFormat conversion.
This resolves a crash in the
copyTextureToTexture
tests, but they are still failing due to #7391, so they cannot be added to the regression until that is fixed.Testing
Enables some CTS tests related to
Queue.submit
. As noted in a comment, the error reported ifCommandEncoder.finish
is called twice is not right, and I would not expect a CTS test for that to pass, but I also can't find one, so I made a note in gpuweb/cts#4401 to add it.Squash or Rebase? Squash
Checklist
cargo fmt
.taplo format
.cargo clippy --tests
. If applicable, add:--target wasm32-unknown-unknown
cargo xtask test
to run tests.cargo xtask cts
.CHANGELOG.md
entry.