Skip to content

Commit

Permalink
impl From<SampleCount> for u32 (vulkano-rs#2125)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rua authored and hakolao committed Feb 20, 2024
1 parent 4748222 commit 628b3d2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions vulkano/src/image/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,13 @@ vulkan_bitflags_enum! {
SAMPLE_64, Sample64 = TYPE_64,
}

impl From<SampleCount> for u32 {
#[inline]
fn from(value: SampleCount) -> Self {
value as u32
}
}

impl TryFrom<u32> for SampleCount {
type Error = ();

Expand Down

0 comments on commit 628b3d2

Please sign in to comment.