-
Notifications
You must be signed in to change notification settings - Fork 990
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
Remove Peek-Poke #739
Merged
Merged
Remove Peek-Poke #739
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
There was a lot of highly unsafe use of serialization based on peek-poke that we weren't entirely happy with. It's replaced by just serializing the passes now. Also, switch BufferSize to Option<NonZero>.
@cwfitzgerald this is ready for reviewing! Do you think you can rebase on top of this? |
cwfitzgerald
approved these changes
Jun 20, 2020
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.
LVGTM! This is amazing, so much unsafe code, vanished into the ether!
bors r+
bors bot
added a commit
to gfx-rs/wgpu-rs
that referenced
this pull request
Jun 20, 2020
396: Update wgpu without peek-poke r=cwfitzgerald a=kvark Depends on gfx-rs/wgpu#739 Everything works, however I think it's worth changing the render pass color/depth/stencil descriptors to be more rusty, e.g. ```rust struct ColorAttachmentDescriptor { attachment: &'a TextureView, resolve_target: Option<&'a TextureView>, clear_color: Option<Color>, store_result: bool, } enum DepthStencilChannel<T> { ReadOnly, Mutable { clear_value: Option<T>, store_result: bool }, } struct DepthStencilAttachmentDescriptor { } ``` This would also involve wgpu-type/wgpu-core changes, but can be done as a follow-up (don't want to block on them). There is a value in doing it in this PR, so that end users don't get multiple disruptions, but we need to find a proper shape first. Co-authored-by: Dzmitry Malyshau <[email protected]>
kvark
added a commit
to kvark/wgpu
that referenced
this pull request
Jun 3, 2021
396: Update wgpu without peek-poke r=cwfitzgerald a=kvark Depends on gfx-rs#739 Everything works, however I think it's worth changing the render pass color/depth/stencil descriptors to be more rusty, e.g. ```rust struct ColorAttachmentDescriptor { attachment: &'a TextureView, resolve_target: Option<&'a TextureView>, clear_color: Option<Color>, store_result: bool, } enum DepthStencilChannel<T> { ReadOnly, Mutable { clear_value: Option<T>, store_result: bool }, } struct DepthStencilAttachmentDescriptor { } ``` This would also involve wgpu-type/wgpu-core changes, but can be done as a follow-up (don't want to block on them). There is a value in doing it in this PR, so that end users don't get multiple disruptions, but we need to find a proper shape first. Co-authored-by: Dzmitry Malyshau <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Related to #738
Related to djg/peek-poke#10
Description
As of #726 , the buffers have a minimum binding size that has to include the shader struct size. It, therefore, can't be zero.
We can remove the hacks we had previously and switch fully to the idiomatic
Option<NonZeroU64>
.Peek-poke doesn't
NonZeroU64
and friends, so this made me reconsider the user of it entirely. Today, render bundles as well as the Player already represent command streams using a much rustier method. I tried to move everything to this method now, and I think this is going to work much better, and safer.Testing
wgpu-rs works - gfx-rs/wgpu-rs#396