766: Validate set_bind_group is within bounds of limit r=kvark a=cwfitzgerald
**Connections**
~~Don't think there are any.~~ Would provide a nicer error message for https://github.com/gfx-rs/wgpu-rs/issues/411.
**Description**
Implements checks related to our only limit.
**Testing**
Untested
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
763: Remove raw pointers from the render pipelines API r=kvark a=GabrielMajeri
**Connections**
Rust-ification of API, as part of #689
**Description**
The objective is to get rid of raw pointers in the render pipeline descriptor and associated structures.
**Testing**
Checked with `player` and the `trace` feature, and with `wgpu-rs` with the changes in https://github.com/gfx-rs/wgpu-rs/pull/425
Co-authored-by: Gabriel Majeri <gabriel.majeri6@gmail.com>
764: Remove UnsafeFeatures as we decided the top level guard is not useful r=cwfitzgerald a=kvark
**Connections**
Reverts part of #691 about unsafe extensions
**Description**
Top-level unsafe is not sound. We still need unsafety close to the spot where it's triggered.
**Testing**
untested
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
Previously the lexer would accept any alphanumeric character as part of an
identifier. The spec only allowes identifiers to consist of ASCII alphanumeric
characters though.
759: Bump the maximum bind groups to 8 r=kvark a=kvark
**Connections**
https://github.com/gfx-rs/wgpu-rs/issues/411#issuecomment-653756154
**Description**
This is the hard upper bound. It can be 4, technically, but it would make sense to raise it to at least 8.
**Testing**
Untested, should work still.
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
Until now the WGSL parser would interpret a character index as a byte index.
This could lead to a panic on invalid input strings like "\"\u{2}ПЀ\u{0}\"",
because it would use that index to slice a string without ensuring the slicing
happens on a character boundary.
One possible fix would have been to call `str::find` instead of `position`,
however by relying on `splitn` instead of slicing a str manually it is
easier to convince ourselves that this code can no longer panic.
Fixes https://github.com/gfx-rs/naga/issues/90
758: Require mapped buffers to be aligned r=cwfitzgerald a=kvark
**Connections**
Likely addresses https://github.com/gfx-rs/wgpu-rs/issues/420
**Description**
We require the size and offsets of mapping to be aligned to 4. This includes buffers mapped at creation.
It allows us to use buffer copy operations to sync the contents.
**Testing**
Not really tested
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
757: Validate Dynamic Bindings are In-Bounds r=kvark a=cwfitzgerald
**Connections**
Closes#756
**Description**
Needed to store some basic info about all dynamic bindings in the bind group.
I wasn't exactly sure where to put the validation function, so I stuck it as an inherent function on the BindGroup. Can be moved if this isn't ideal.
I also moved offset alignment validation into the validation function to help reduce duplication between render/compute.
**Testing**
None of the examples use dynamic indexing, so it's hard to test this as is.
@FlorianUekermann could you possibly test this patch with your repro case?
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
* Add initial pomelo glsl work
* Fix ref to glsl_old
* Fix idents with numbers in lexer
* Use glsl_new for .vert in convert example
Controlled by PREFER_GLSL_NEW=1 env var
Also add simple test files
* Start making parser look like spec
* Port 'old' lex.rs to glsl_new
* Apply fixes after rebasing
* Fix clippy issue
* Fix PR comments
- Make into optional feature glsl-new
- Minor code style improvements
23: Bump libloading to 0.6 r=msiglreith a=cwfitzgerald
They got rid of their typedef for their result type. Strange.
Breaking change, so can't go out in a patch release.
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
414: Implement MultiDrawIndirect Extensions r=kvark a=cwfitzgerald
The wgpu-rs component of https://github.com/gfx-rs/wgpu/pull/754.
I didn't include the modifications to the example as they are particularly awful and ugly. One of my next steps following this is to make an example of both binding indexing and these multi-draw extensions.
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>