Add naga-types crate#9434
Conversation
d106f29 to
14c7430
Compare
atlv24
left a comment
There was a problem hiding this comment.
Looks good overall, thanks for breaking it up into a bunch of reviewable commits!
Why the glsl::Version -> GlslVersion rename? (Also that could have been a separate commit from the move)
|
@atlv24 I just figured it would be more clear and easy to understand, also since I added ApiVersion. |
|
|
||
| extern crate alloc; | ||
|
|
||
| extern crate naga_types as nt; |
There was a problem hiding this comment.
IIRC we previously talked about reducing these kind of aliases. But I don't exactly remember if that was the outcome.
There was a problem hiding this comment.
I found the issue: #6975
We were planning to rename wgpu-types to types but now with naga-types that seems problematic.
| #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] | ||
| #[cfg_attr(feature = "serialize", derive(serde::Serialize))] | ||
| #[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] | ||
| pub enum GlslScalarKind { |
There was a problem hiding this comment.
I think we should remove the GLSL prefix, these are already in the GLSL module.
There was a problem hiding this comment.
I just wanted to differentiate them from the types with the exact same name in naga, especially since this is intended to be primarily a naga subcrate
| #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] | ||
| #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] | ||
| #[cfg_attr(feature = "serde", serde(rename_all = "camelCase"))] | ||
| pub struct VertexAttribute { |
There was a problem hiding this comment.
Why are we moving VertexAttribute?
| #[derive(Copy, Clone, Debug, Default, Hash, Eq, PartialEq)] | ||
| #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] | ||
| #[cfg_attr(feature = "serde", serde(rename_all = "kebab-case"))] | ||
| pub enum VertexStepMode { |
There was a problem hiding this comment.
Why are we moving VertexStepMode?
Connections
Part of #8842
Sorta replaces part of #9080
Description
Add a naga-types crate so that naga can be made into an optional dependency.
Testing
Existing testing
Squash or Rebase?
Squash
Checklist
cargo fmt.taplo format.cargo clippy --tests. If applicable, add:--target wasm32-unknown-unknowncargo xtask testto run tests.CHANGELOG.mdentry.