-
Notifications
You must be signed in to change notification settings - Fork 56
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
Regenerate on sdk-1.3.296.0
#251
base: master
Are you sure you want to change the base?
Conversation
#[doc = "SPIR-V operand kind: [FPEncoding](https://www.khronos.org/registry/spir-v/specs/unified1/SPIRV.html#_a_id_fp_encoding_a_fp_encoding)"] | ||
#[repr(u32)] | ||
#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] | ||
#[cfg_attr(feature = "serialize", derive(serde::Serialize))] | ||
#[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] | ||
#[allow(clippy::upper_case_acronyms)] | ||
pub enum FPEncoding { | ||
Max = 0x7fffffff, | ||
} | ||
impl FPEncoding { | ||
pub fn from_u32(n: u32) -> Option<Self> { | ||
Some(match n { | ||
_ => return None, | ||
}) | ||
} | ||
} | ||
#[allow(non_upper_case_globals)] | ||
impl FPEncoding {} | ||
impl core::str::FromStr for FPEncoding { | ||
type Err = (); | ||
fn from_str(s: &str) -> Result<Self, Self::Err> { | ||
match s { | ||
_ => Err(()), | ||
} | ||
} | ||
} |
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.
This is a new optional enum operand for OpTypeFloat
that's not yet defined to have any values/variants:
https://registry.khronos.org/SPIR-V/specs/unified1/SPIRV.html#FP_Encoding
I made some changes/hacks to autogen
to support this variant-less enum, but need more to remove these empty match
statements or decide if it should be an opaque enum (newtype struct on u32
?) altogether depending on how enum values will be defined in the future.
Specifically `rust-version = "1.58"` in the `autogen` module that I added in #223 is weird, since any developers working on and/or contributing to the repository should easily be able to run the latest stable and take advantage of newer Rust features in `autogen` code.
It looks like 1.3.280 is also set for a release (there's a branch but no tag yet) so we might want to hold out merging this until those can be incorporated.