pub struct DescriptorSetLayoutCreateInfo {
pub bindings: BTreeMap<u32, DescriptorSetLayoutBinding>,
pub push_descriptor: bool,
pub _ne: NonExhaustive,
}
Expand description
Parameters to create a new DescriptorSetLayout
.
Fields
bindings: BTreeMap<u32, DescriptorSetLayoutBinding>
The bindings of the desriptor set layout. These are specified according to binding number.
It is generally advisable to keep the binding numbers low. Higher binding numbers may use more memory inside Vulkan.
The default value is empty.
push_descriptor: bool
Whether the descriptor set layout should be created for push descriptors.
If true
, the layout can only be used for push descriptors, and if false
, it can only
be used for regular descriptor sets.
If set to true
, the
khr_push_descriptor
extension must
be enabled on the device, and there are several restrictions:
- There must be no bindings with a type of
DescriptorType::UniformBufferDynamic
orDescriptorType::StorageBufferDynamic
. - There must be no bindings with
variable_descriptor_count
enabled. - The total number of descriptors across all bindings must be less than the
max_push_descriptors
limit.
The default value is false
.
_ne: NonExhaustive
Implementations
sourceimpl DescriptorSetLayoutCreateInfo
impl DescriptorSetLayoutCreateInfo
sourcepub fn from_requirements<'a>(
descriptor_requirements: impl IntoIterator<Item = ((u32, u32), &'a DescriptorRequirements)>
) -> Vec<Self>
pub fn from_requirements<'a>(
descriptor_requirements: impl IntoIterator<Item = ((u32, u32), &'a DescriptorRequirements)>
) -> Vec<Self>
Builds a list of DescriptorSetLayoutCreateInfo
from an iterator of DescriptorRequirement
originating from a shader.
Trait Implementations
sourceimpl Clone for DescriptorSetLayoutCreateInfo
impl Clone for DescriptorSetLayoutCreateInfo
sourcefn clone(&self) -> DescriptorSetLayoutCreateInfo
fn clone(&self) -> DescriptorSetLayoutCreateInfo
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for DescriptorSetLayoutCreateInfo
impl Debug for DescriptorSetLayoutCreateInfo
Auto Trait Implementations
impl !RefUnwindSafe for DescriptorSetLayoutCreateInfo
impl Send for DescriptorSetLayoutCreateInfo
impl Sync for DescriptorSetLayoutCreateInfo
impl Unpin for DescriptorSetLayoutCreateInfo
impl !UnwindSafe for DescriptorSetLayoutCreateInfo
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more