Skip to content

Commit

Permalink
impl From<SampleCount> for u32 (#2125)
Browse files Browse the repository at this point in the history
Rua authored Jan 8, 2023
1 parent ccc50a6 commit fcb46e6
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
@@ -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 = ();

0 comments on commit fcb46e6

Please sign in to comment.