Skip to content

Commit

Permalink
Implement Default for descriptor_set Id types
Browse files Browse the repository at this point in the history
  • Loading branch information
tnibler committed Feb 16, 2025
1 parent a057ab1 commit c05cda2
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions vulkano-taskgraph/src/descriptor_set.rs
Original file line number Diff line number Diff line change
Expand Up @@ -837,6 +837,12 @@ impl SamplerId {
}
}

impl Default for SamplerId {
fn default() -> Self {
Self::INVALID
}
}

#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
#[repr(C)]
pub struct SampledImageId {
Expand All @@ -859,6 +865,12 @@ impl SampledImageId {
}
}

impl Default for SampledImageId {
fn default() -> Self {
Self::INVALID
}
}

#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
#[repr(C)]
pub struct StorageImageId {
Expand All @@ -881,6 +893,12 @@ impl StorageImageId {
}
}

impl Default for StorageImageId {
fn default() -> Self {
Self::INVALID
}
}

#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
#[repr(C)]
pub struct StorageBufferId {
Expand All @@ -903,6 +921,12 @@ impl StorageBufferId {
}
}

impl Default for StorageBufferId {
fn default() -> Self {
Self::INVALID
}
}

#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
#[repr(C)]
pub struct AccelerationStructureId {
Expand All @@ -925,6 +949,12 @@ impl AccelerationStructureId {
}
}

impl Default for AccelerationStructureId {
fn default() -> Self {
Self::INVALID
}
}

struct GlobalDescriptorSetAllocator {
device: Arc<Device>,
}
Expand Down

0 comments on commit c05cda2

Please sign in to comment.