pub unsafe trait RenderPassDesc: RenderPassDescClearValues<Vec<ClearValue>> {
Show 18 methods fn num_attachments(&self) -> usize; fn attachment_desc(&self, num: usize) -> Option<AttachmentDescription>; fn num_subpasses(&self) -> usize; fn subpass_desc(&self, num: usize) -> Option<PassDescription>; fn num_dependencies(&self) -> usize; fn dependency_desc(&self, num: usize) -> Option<PassDependencyDescription>; fn attachment_descs(&self) -> RenderPassDescAttachments<'_, Self>
    where
        Self: Sized
, { ... } fn subpass_descs(&self) -> RenderPassDescSubpasses<'_, Self>
    where
        Self: Sized
, { ... } fn dependency_descs(&self) -> RenderPassDescDependencies<'_, Self>
    where
        Self: Sized
, { ... } fn is_compatible_with<T>(&self, other: &T) -> bool
    where
        Self: Sized,
        T: ?Sized + RenderPassDesc
, { ... } fn build_render_pass(
        self,
        device: Arc<Device>
    ) -> Result<RenderPass<Self>, RenderPassCreationError>
    where
        Self: Sized
, { ... } fn num_color_attachments(&self, subpass: u32) -> Option<u32> { ... } fn num_samples(&self, subpass: u32) -> Option<u32> { ... } fn has_depth_stencil_attachment(&self, subpass: u32) -> Option<(bool, bool)> { ... } fn has_depth(&self, subpass: u32) -> Option<bool> { ... } fn has_writable_depth(&self, subpass: u32) -> Option<bool> { ... } fn has_stencil(&self, subpass: u32) -> Option<bool> { ... } fn has_writable_stencil(&self, subpass: u32) -> Option<bool> { ... }
}
Expand description

Trait for objects that contain the description of a render pass.

See also all the traits whose name start with RenderPassDesc (eg. RenderPassDescAttachments or TODO: rename existing traits to match this). They are extensions to this trait.

Safety

TODO: finish this section

  • All color and depth/stencil attachments used by any given subpass must have the same number of samples.
  • The trait methods should always return the same values, unless you modify the description through a mutable borrow. Once you pass the RenderPassDesc object to vulkano, you can still access it through the RenderPass::desc() method that returns a shared borrow to the description. It must not be possible for a shared borrow to modify the description in such a way that the description changes.
  • The provided methods shouldn’t be overridden with fancy implementations. For example build_render_pass must build a render pass from the description and not a different one.

Required Methods

Returns the number of attachments of the render pass.

Returns the description of an attachment.

Returns None if num is greater than or equal to num_attachments().

Returns the number of subpasses of the render pass.

Returns the description of a subpass.

Returns None if num is greater than or equal to num_subpasses().

Returns the number of dependencies of the render pass.

Returns the description of a dependency.

Returns None if num is greater than or equal to num_dependencies().

Provided Methods

Returns an iterator to the list of attachments.

Returns an iterator to the list of subpasses.

Returns an iterator to the list of dependencies.

Returns true if this render pass is compatible with another render pass.

Two render passes that contain one subpass are compatible if they are identical. Two render passes that contain more than one subpass are compatible if they are identical except for the load/store operations and the image layouts.

This function is just a shortcut for the RenderPassCompatible trait.

Builds a render pass from this description.

Note: This function is just a shortcut for RenderPass::new.

Returns the number of color attachments of a subpass. Returns None if out of range.

Returns the number of samples of the attachments of a subpass. Returns None if out of range or if the subpass has no attachment. TODO: return an enum instead?

Returns a tuple whose first element is true if there’s a depth attachment, and whose second element is true if there’s a stencil attachment. Returns None if out of range.

Returns true if a subpass has a depth attachment or a depth-stencil attachment.

Returns true if a subpass has a depth attachment or a depth-stencil attachment whose layout is not DepthStencilReadOnlyOptimal.

Returns true if a subpass has a stencil attachment or a depth-stencil attachment.

Returns true if a subpass has a stencil attachment or a depth-stencil attachment whose layout is not DepthStencilReadOnlyOptimal.

Implementors