mirror of
https://github.com/vulkano-rs/vulkano.git
synced 2025-02-18 18:12:32 +00:00
Describe push constants in PipelineLayoutDesc
This commit is contained in:
parent
ba2102c011
commit
883e5bcaed
@ -12,6 +12,7 @@ use std::sync::Arc;
|
||||
|
||||
use device::Device;
|
||||
use descriptor::descriptor::DescriptorDesc;
|
||||
use descriptor::descriptor::ShaderStages;
|
||||
use descriptor::pipeline_layout::PipelineLayoutRef;
|
||||
use descriptor::pipeline_layout::PipelineLayoutDesc;
|
||||
use descriptor::pipeline_layout::PipelineLayout;
|
||||
@ -57,6 +58,16 @@ unsafe impl PipelineLayoutDesc for EmptyPipeline {
|
||||
fn descriptor(&self, set: usize, binding: usize) -> Option<DescriptorDesc> {
|
||||
None
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn num_push_constants_ranges(&self) -> usize {
|
||||
0
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn push_constant_range(&self, num: usize) -> Option<(usize, usize, ShaderStages)> {
|
||||
None
|
||||
}
|
||||
}
|
||||
|
||||
/// Description of an empty pipeline layout.
|
||||
@ -78,6 +89,16 @@ unsafe impl PipelineLayoutDesc for EmptyPipelineDesc {
|
||||
fn descriptor(&self, set: usize, binding: usize) -> Option<DescriptorDesc> {
|
||||
None
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn num_push_constants_ranges(&self) -> usize {
|
||||
0
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn push_constant_range(&self, num: usize) -> Option<(usize, usize, ShaderStages)> {
|
||||
None
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -8,6 +8,7 @@
|
||||
// according to those terms.
|
||||
|
||||
use descriptor::descriptor::DescriptorDesc;
|
||||
use descriptor::descriptor::ShaderStages;
|
||||
use descriptor::descriptor_set::DescriptorSetsCollection;
|
||||
use descriptor::pipeline_layout::PipelineLayout;
|
||||
|
||||
@ -39,7 +40,9 @@ pub unsafe trait PipelineLayoutDesc {
|
||||
|
||||
fn descriptor(&self, set: usize, binding: usize) -> Option<DescriptorDesc>;
|
||||
|
||||
// TODO: describe push constants
|
||||
fn num_push_constants_ranges(&self) -> usize;
|
||||
|
||||
fn push_constant_range(&self, num: usize) -> Option<(usize, usize, ShaderStages)>;
|
||||
}
|
||||
|
||||
/// Traits that allow determining whether a pipeline layout is a superset of another one.
|
||||
|
Loading…
Reference in New Issue
Block a user