diff --git a/vulkano-shaders/src/descriptor_sets.rs b/vulkano-shaders/src/descriptor_sets.rs index df237242..845b2be2 100644 --- a/vulkano-shaders/src/descriptor_sets.rs +++ b/vulkano-shaders/src/descriptor_sets.rs @@ -134,7 +134,7 @@ pub fn write_descriptor_sets(doc: &parse::Spirv) -> String { binding: {binding}, ty: {desc_ty}, array_count: 1, - stages: ::vulkano::descriptor_set::ShaderStages::all_graphics(), // TODO: + stages: ::vulkano::descriptor_set::ShaderStages::all(), // TODO: }}", binding = d.binding, desc_ty = d.desc_ty) }) .collect::>(); diff --git a/vulkano/src/descriptor_set/layout_def.rs b/vulkano/src/descriptor_set/layout_def.rs index 81fac6dc..5b2b4963 100644 --- a/vulkano/src/descriptor_set/layout_def.rs +++ b/vulkano/src/descriptor_set/layout_def.rs @@ -174,6 +174,19 @@ pub struct ShaderStages { } impl ShaderStages { + /// Creates a `ShaderStages` struct will all stages set to `true`. + #[inline] + pub fn all() -> ShaderStages { + ShaderStages { + vertex: true, + tessellation_control: true, + tessellation_evaluation: true, + geometry: true, + fragment: true, + compute: true, + } + } + /// Creates a `ShaderStages` struct will all graphics stages set to `true`. #[inline] pub fn all_graphics() -> ShaderStages {