Skip to content
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

Support NonZero and Option<NonZero> types #10

Open
kvark opened this issue Jun 19, 2020 · 2 comments
Open

Support NonZero and Option<NonZero> types #10

kvark opened this issue Jun 19, 2020 · 2 comments

Comments

@kvark
Copy link

kvark commented Jun 19, 2020

Things such as NonZeroU32 are useful!

bors bot added a commit to gfx-rs/wgpu that referenced this issue Jun 20, 2020
739: Remove Peek-Poke r=cwfitzgerald a=kvark

**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

Co-authored-by: Dzmitry Malyshau <[email protected]>
@djg
Copy link
Owner

djg commented Jun 22, 2020

These should be pretty easy to add.

@kvark
Copy link
Author

kvark commented Jun 22, 2020

Fwiw, we are no longer blocked on this. We decided to avoid the unsafety of peek-poke altogether in wgpu.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants