mirror of
https://github.com/vulkano-rs/vulkano.git
synced 2024-11-22 06:45:23 +00:00
Define descriptor set layouts for all pipeline stages
This commit is contained in:
parent
69d6b9025f
commit
090a04f6cd
@ -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::<Vec<_>>();
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user