impl From<SampleCount> for u32 (#2125)

This commit is contained in:
Rua 2023-01-08 03:38:28 +01:00 committed by GitHub
parent ccc50a6f9c
commit fcb46e6f89
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -287,6 +287,13 @@ vulkan_bitflags_enum! {
SAMPLE_64, Sample64 = TYPE_64, SAMPLE_64, Sample64 = TYPE_64,
} }
impl From<SampleCount> for u32 {
#[inline]
fn from(value: SampleCount) -> Self {
value as u32
}
}
impl TryFrom<u32> for SampleCount { impl TryFrom<u32> for SampleCount {
type Error = (); type Error = ();