Struct vulkano::descriptor_set::layout::DescriptorSetLayout
source · [−]pub struct DescriptorSetLayout { /* private fields */ }
Expand description
Describes to the Vulkan implementation the layout of all descriptors within a descriptor set.
Implementations
sourceimpl DescriptorSetLayout
impl DescriptorSetLayout
sourcepub fn new(
device: Arc<Device>,
create_info: DescriptorSetLayoutCreateInfo
) -> Result<Arc<DescriptorSetLayout>, DescriptorSetLayoutCreationError>
pub fn new(
device: Arc<Device>,
create_info: DescriptorSetLayoutCreateInfo
) -> Result<Arc<DescriptorSetLayout>, DescriptorSetLayoutCreationError>
Creates a new DescriptorSetLayout
.
sourcepub fn bindings(&self) -> &BTreeMap<u32, DescriptorSetLayoutBinding>
pub fn bindings(&self) -> &BTreeMap<u32, DescriptorSetLayoutBinding>
Returns the bindings of the descriptor set layout.
sourcepub fn push_descriptor(&self) -> bool
pub fn push_descriptor(&self) -> bool
Returns whether the descriptor set layout is for push descriptors or regular descriptor sets.
sourcepub fn descriptor_counts(&self) -> &HashMap<DescriptorType, u32>
pub fn descriptor_counts(&self) -> &HashMap<DescriptorType, u32>
Returns the number of descriptors of each type.
The map is guaranteed to not contain any elements with a count of 0
.
sourcepub fn variable_descriptor_count(&self) -> u32
pub fn variable_descriptor_count(&self) -> u32
If the highest-numbered binding has a variable count, returns its descriptor_count
.
Otherwise returns 0
.
sourcepub fn is_compatible_with(&self, other: &DescriptorSetLayout) -> bool
pub fn is_compatible_with(&self, other: &DescriptorSetLayout) -> bool
Returns whether self
is compatible with other
.
“Compatible” in this sense is defined by the Vulkan specification under the section “Pipeline layout compatibility”: either the two are the same descriptor set layout object, or they must be identically defined to the Vulkan API.
Trait Implementations
sourceimpl Debug for DescriptorSetLayout
impl Debug for DescriptorSetLayout
sourceimpl DeviceOwned for DescriptorSetLayout
impl DeviceOwned for DescriptorSetLayout
sourceimpl Drop for DescriptorSetLayout
impl Drop for DescriptorSetLayout
sourceimpl Hash for DescriptorSetLayout
impl Hash for DescriptorSetLayout
sourceimpl VulkanObject for DescriptorSetLayout
impl VulkanObject for DescriptorSetLayout
type Object = DescriptorSetLayout
type Object = DescriptorSetLayout
The type of the object.
sourcefn internal_object(&self) -> DescriptorSetLayout
fn internal_object(&self) -> DescriptorSetLayout
Returns a reference to the object.
impl Eq for DescriptorSetLayout
Auto Trait Implementations
impl RefUnwindSafe for DescriptorSetLayout
impl Send for DescriptorSetLayout
impl Sync for DescriptorSetLayout
impl Unpin for DescriptorSetLayout
impl UnwindSafe for DescriptorSetLayout
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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