Struct vulkano::descriptor_set::WriteDescriptorSet
source · [−]pub struct WriteDescriptorSet { /* private fields */ }
Expand description
Represents a single write operation to the binding of a descriptor set.
WriteDescriptorSet
specifies the binding number and target array index, and includes one or
more resources of a given type that need to be written to that location. Two constructors are
provided for each resource type:
- The basic constructor variant writes a single element to array index 0. It is intended for
non-arrayed bindings, where
descriptor_count
in the descriptor set layout is 1. - The
_array
variant writes several elements and allows specifying the target array index. At least one element must be provided; a panic results if the provided iterator is empty.
Implementations
Write an empty element to array element 0.
See none_array
for more information.
Write a number of consecutive empty elements.
This is used for push descriptors in combination with Sampler
descriptors that have
immutable samplers in the layout. The Vulkan spec requires these elements to be explicitly
written, but since there is no data to write, a dummy write is provided instead.
For regular descriptor sets, the data for such descriptors is automatically valid, and dummy writes are not allowed.
Write a single buffer to array element 0.
pub fn buffer_array(
binding: u32,
first_array_element: u32,
elements: impl IntoIterator<Item = Arc<dyn BufferAccess>>
) -> Self
pub fn buffer_array(
binding: u32,
first_array_element: u32,
elements: impl IntoIterator<Item = Arc<dyn BufferAccess>>
) -> Self
Write a number of consecutive buffer elements.
Write a single buffer view to array element 0.
pub fn buffer_view_array(
binding: u32,
first_array_element: u32,
elements: impl IntoIterator<Item = Arc<dyn BufferViewAbstract>>
) -> Self
pub fn buffer_view_array(
binding: u32,
first_array_element: u32,
elements: impl IntoIterator<Item = Arc<dyn BufferViewAbstract>>
) -> Self
Write a number of consecutive buffer view elements.
Write a single image view to array element 0.
pub fn image_view_array(
binding: u32,
first_array_element: u32,
elements: impl IntoIterator<Item = Arc<dyn ImageViewAbstract>>
) -> Self
pub fn image_view_array(
binding: u32,
first_array_element: u32,
elements: impl IntoIterator<Item = Arc<dyn ImageViewAbstract>>
) -> Self
Write a number of consecutive image view elements.
pub fn image_view_sampler(
binding: u32,
image_view: Arc<dyn ImageViewAbstract>,
sampler: Arc<Sampler>
) -> Self
pub fn image_view_sampler(
binding: u32,
image_view: Arc<dyn ImageViewAbstract>,
sampler: Arc<Sampler>
) -> Self
Write a single image view and sampler to array element 0.
pub fn image_view_sampler_array(
binding: u32,
first_array_element: u32,
elements: impl IntoIterator<Item = (Arc<dyn ImageViewAbstract>, Arc<Sampler>)>
) -> Self
pub fn image_view_sampler_array(
binding: u32,
first_array_element: u32,
elements: impl IntoIterator<Item = (Arc<dyn ImageViewAbstract>, Arc<Sampler>)>
) -> Self
Write a number of consecutive image view and sampler elements.
Write a single sampler to array element 0.
pub fn sampler_array(
binding: u32,
first_array_element: u32,
elements: impl IntoIterator<Item = Arc<Sampler>>
) -> Self
pub fn sampler_array(
binding: u32,
first_array_element: u32,
elements: impl IntoIterator<Item = Arc<Sampler>>
) -> Self
Write a number of consecutive sampler elements.
Returns the binding number that is updated by this descriptor write.
Returns the first array element in the binding that is updated by this descriptor write.
Returns a reference to the elements held by this descriptor write.
Auto Trait Implementations
impl !RefUnwindSafe for WriteDescriptorSet
impl Send for WriteDescriptorSet
impl Sync for WriteDescriptorSet
impl Unpin for WriteDescriptorSet
impl !UnwindSafe for WriteDescriptorSet
Blanket Implementations
Mutably borrows from an owned value. Read more
Builds a pointer to this type from a raw pointer.
Returns true if the size is suitable to store a type like this.
Returns the size of an individual element.