-
Notifications
You must be signed in to change notification settings - Fork 947
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make compute pass end consume the pass #5575
Conversation
f2dfd02
to
e2d0458
Compare
e2d0458
to
f02fab0
Compare
…hod of compute/render pass instead of encoder
Co-Authored-By: Erich Gubler <erichdongubler@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
praise: These changes make sense to me. Glad to see them!
nitpick: I've taken the liberty of modifying history a bit here, so review is easier and that we might reasonably consider rebasing instead of squashing. I've made individual conversations where it made sense. For general changes, I've folded the following commits into parents: d781e30, e07ba12, 6315094
f02fab0
to
ecd9699
Compare
Connections
wgpu::ComputePass
methods #5570RenderPass
make it difficult to use. #1453Part of a series towards lifetime removal on compute passes:
wgpu::ComputePass
) #5432wgpu::ComputePass
methods #5570ComputePass
to its parent command encoder #5620Description
Some work in Separate out ComputeCommand id->arc resolve (a step towards no lifetimes on
wgpu::ComputePass
) #5432 highlighted that a compute pass (render pass as well, but let's ignore this for now) isn't fully consumed during pass ending which means we have to do a couple of copies despite the fact that a pass can not be consumed twice.Any operation on an ended compute pass now causes an validation error (as it should per spec!). As expected this allows to remove a few copies (including needless reference count increment + decrement!). Naturally, this means now that all operations on the compute pass are failable
Previously, ending a pass was seen as an operation on the command encoder across the api/crate layers. Now it is part of the render/compute pass in accordance with the WebGPU spec. This is relatively minor but also comes with an error check.
Compute pass errors make now use of its label
Testing
Existing tests still pass, should be enough for this one.
Checklist
cargo fmt
.cargo clippy
. If applicable, add:--target wasm32-unknown-unknown
--target wasm32-unknown-emscripten
cargo xtask test
to run tests.CHANGELOG.md
. See simple instructions inside file.