[−][src]Trait vulkano::framebuffer::RenderPassDesc
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 theRenderPass::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
pub fn num_attachments(&self) -> usize
[src]
Returns the number of attachments of the render pass.
pub fn attachment_desc(&self, num: usize) -> Option<AttachmentDescription>
[src]
Returns the description of an attachment.
Returns None
if num
is greater than or equal to num_attachments()
.
pub fn num_subpasses(&self) -> usize
[src]
Returns the number of subpasses of the render pass.
pub fn subpass_desc(&self, num: usize) -> Option<PassDescription>
[src]
Returns the description of a subpass.
Returns None
if num
is greater than or equal to num_subpasses()
.
pub fn num_dependencies(&self) -> usize
[src]
Returns the number of dependencies of the render pass.
pub fn dependency_desc(&self, num: usize) -> Option<PassDependencyDescription>
[src]
Returns the description of a dependency.
Returns None
if num
is greater than or equal to num_dependencies()
.
Provided methods
pub fn attachment_descs(&self) -> RenderPassDescAttachments<'_, Self>ⓘNotable traits for RenderPassDescAttachments<'a, R>
impl<'a, R: ?Sized + 'a> Iterator for RenderPassDescAttachments<'a, R> where
R: RenderPassDesc, type Item = AttachmentDescription;
where
Self: Sized,
[src]
Notable traits for RenderPassDescAttachments<'a, R>
impl<'a, R: ?Sized + 'a> Iterator for RenderPassDescAttachments<'a, R> where
R: RenderPassDesc, type Item = AttachmentDescription;
Self: Sized,
Returns an iterator to the list of attachments.
pub fn subpass_descs(&self) -> RenderPassDescSubpasses<'_, Self>ⓘNotable traits for RenderPassDescSubpasses<'a, R>
impl<'a, R: ?Sized + 'a> Iterator for RenderPassDescSubpasses<'a, R> where
R: RenderPassDesc, type Item = PassDescription;
where
Self: Sized,
[src]
Notable traits for RenderPassDescSubpasses<'a, R>
impl<'a, R: ?Sized + 'a> Iterator for RenderPassDescSubpasses<'a, R> where
R: RenderPassDesc, type Item = PassDescription;
Self: Sized,
Returns an iterator to the list of subpasses.
pub fn dependency_descs(&self) -> RenderPassDescDependencies<'_, Self>ⓘNotable traits for RenderPassDescDependencies<'a, R>
impl<'a, R: ?Sized + 'a> Iterator for RenderPassDescDependencies<'a, R> where
R: RenderPassDesc, type Item = PassDependencyDescription;
where
Self: Sized,
[src]
Notable traits for RenderPassDescDependencies<'a, R>
impl<'a, R: ?Sized + 'a> Iterator for RenderPassDescDependencies<'a, R> where
R: RenderPassDesc, type Item = PassDependencyDescription;
Self: Sized,
Returns an iterator to the list of dependencies.
pub fn is_compatible_with<T: ?Sized>(&self, other: &T) -> bool where
Self: Sized,
T: RenderPassDesc,
[src]
Self: Sized,
T: RenderPassDesc,
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.
pub fn build_render_pass(
self,
device: Arc<Device>
) -> Result<RenderPass<Self>, RenderPassCreationError> where
Self: Sized,
[src]
self,
device: Arc<Device>
) -> Result<RenderPass<Self>, RenderPassCreationError> where
Self: Sized,
Builds a render pass from this description.
Note: This function is just a shortcut for
RenderPass::new
.
pub fn num_color_attachments(&self, subpass: u32) -> Option<u32>
[src]
Returns the number of color attachments of a subpass. Returns None
if out of range.
pub fn num_samples(&self, subpass: u32) -> Option<u32>
[src]
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?
pub fn has_depth_stencil_attachment(&self, subpass: u32) -> Option<(bool, bool)>
[src]
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.
pub fn has_depth(&self, subpass: u32) -> Option<bool>
[src]
Returns true if a subpass has a depth attachment or a depth-stencil attachment.
pub fn has_writable_depth(&self, subpass: u32) -> Option<bool>
[src]
Returns true if a subpass has a depth attachment or a depth-stencil attachment whose
layout is not DepthStencilReadOnlyOptimal
.
pub fn has_stencil(&self, subpass: u32) -> Option<bool>
[src]
Returns true if a subpass has a stencil attachment or a depth-stencil attachment.
pub fn has_writable_stencil(&self, subpass: u32) -> Option<bool>
[src]
Returns true if a subpass has a stencil attachment or a depth-stencil attachment whose
layout is not DepthStencilReadOnlyOptimal
.
Implementors
impl RenderPassDesc for EmptySinglePassRenderPassDesc
[src]
pub fn num_attachments(&self) -> usize
[src]
pub fn attachment_desc(&self, _: usize) -> Option<AttachmentDescription>
[src]
pub fn num_subpasses(&self) -> usize
[src]
pub fn subpass_desc(&self, num: usize) -> Option<PassDescription>
[src]
pub fn num_dependencies(&self) -> usize
[src]
pub fn dependency_desc(&self, _: usize) -> Option<PassDependencyDescription>
[src]
pub fn num_color_attachments(&self, subpass: u32) -> Option<u32>
[src]
pub fn num_samples(&self, _: u32) -> Option<u32>
[src]
pub fn has_depth_stencil_attachment(&self, subpass: u32) -> Option<(bool, bool)>
[src]
pub fn has_depth(&self, subpass: u32) -> Option<bool>
[src]
pub fn has_writable_depth(&self, subpass: u32) -> Option<bool>
[src]
pub fn has_stencil(&self, subpass: u32) -> Option<bool>
[src]
pub fn has_writable_stencil(&self, subpass: u32) -> Option<bool>
[src]
impl<D> RenderPassDesc for RenderPass<D> where
D: RenderPassDesc,
[src]
D: RenderPassDesc,
pub fn num_attachments(&self) -> usize
[src]
pub fn attachment_desc(&self, num: usize) -> Option<AttachmentDescription>
[src]
pub fn num_subpasses(&self) -> usize
[src]
pub fn subpass_desc(&self, num: usize) -> Option<PassDescription>
[src]
pub fn num_dependencies(&self) -> usize
[src]
pub fn dependency_desc(&self, num: usize) -> Option<PassDependencyDescription>
[src]
impl<Mv, L, Rp> RenderPassDesc for GraphicsPipeline<Mv, L, Rp> where
Rp: RenderPassDesc,
[src]
Rp: RenderPassDesc,
pub fn num_attachments(&self) -> usize
[src]
pub fn attachment_desc(&self, num: usize) -> Option<AttachmentDescription>
[src]
pub fn num_subpasses(&self) -> usize
[src]
pub fn subpass_desc(&self, num: usize) -> Option<PassDescription>
[src]
pub fn num_dependencies(&self) -> usize
[src]
pub fn dependency_desc(&self, num: usize) -> Option<PassDependencyDescription>
[src]
impl<Rp, A> RenderPassDesc for Framebuffer<Rp, A> where
Rp: RenderPassDesc,
[src]
Rp: RenderPassDesc,
pub fn num_attachments(&self) -> usize
[src]
pub fn attachment_desc(&self, num: usize) -> Option<AttachmentDescription>
[src]
pub fn num_subpasses(&self) -> usize
[src]
pub fn subpass_desc(&self, num: usize) -> Option<PassDescription>
[src]
pub fn num_dependencies(&self) -> usize
[src]
pub fn dependency_desc(&self, num: usize) -> Option<PassDependencyDescription>
[src]
impl<T> RenderPassDesc for T where
T: SafeDeref,
T::Target: RenderPassDesc,
[src]
T: SafeDeref,
T::Target: RenderPassDesc,