fix: handle Queue::submit
non-fatally
#6318
Merged
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.
Connections
Fixes #6317, unblocks #5714.
Description
wgpu_core::Global::queue_submit
to return a(SubmissionIndex, …)
in addition to its current error type.Queue::submit
to break to the end of a block. This is similar to what we already do in many APIs inwgpu_core
.submit_index
binding so it can be used at the point where we need to convert current error paths to also return the submission index.Later, we will likely want to avoid actually retrieving a new submission index so we can minimize the critical section of code. We'll need to figure out a strategy for returning a valid (but not necessarily unique) index in the case of failures that prevent successful submission.
It is strongly recommended that a reviewer review this diff with whitespace changes ignored.
Testing
Exercised by #6317. If a reviewer feels strongly, we can take the example from #5714 and turn it into a test.
Checklist
cargo fmt
.cargo clippy
. If applicable, add:--target wasm32-unknown-unknown
--target wasm32-unknown-emscripten
cargo xtask test
to run tests.Add change toI don't think that this is necessary, since we haven't shipped this defect to Crates.io.CHANGELOG.md
. See simple instructions inside file.