[−][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
fn num_attachments(&self) -> usize
Returns the number of attachments of the render pass.
fn attachment_desc(&self, num: usize) -> Option<AttachmentDescription>
Returns the description of an attachment.
Returns None
if num
is greater than or equal to num_attachments()
.
fn num_subpasses(&self) -> usize
Returns the number of subpasses of the render pass.
fn subpass_desc(&self, num: usize) -> Option<PassDescription>
Returns the description of a subpass.
Returns None
if num
is greater than or equal to num_subpasses()
.
fn num_dependencies(&self) -> usize
Returns the number of dependencies of the render pass.
fn dependency_desc(&self, num: usize) -> Option<PassDependencyDescription>
Returns the description of a dependency.
Returns None
if num
is greater than or equal to num_dependencies()
.
Provided methods
ⓘImportant traits for RenderPassDescAttachments<'a, R>fn attachment_descs(&self) -> RenderPassDescAttachments<Self> where
Self: Sized,
Self: Sized,
Returns an iterator to the list of attachments.
ⓘImportant traits for RenderPassDescSubpasses<'a, R>fn subpass_descs(&self) -> RenderPassDescSubpasses<Self> where
Self: Sized,
Self: Sized,
Returns an iterator to the list of subpasses.
ⓘImportant traits for RenderPassDescDependencies<'a, R>fn dependency_descs(&self) -> RenderPassDescDependencies<Self> where
Self: Sized,
Self: Sized,
Returns an iterator to the list of dependencies.
fn is_compatible_with<T: ?Sized>(&self, other: &T) -> bool where
Self: Sized,
T: RenderPassDesc,
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.
fn build_render_pass(
self,
device: Arc<Device>
) -> Result<RenderPass<Self>, RenderPassCreationError> where
Self: Sized,
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
.
fn num_color_attachments(&self, subpass: u32) -> Option<u32>
Returns the number of color attachments of a subpass. Returns None
if out of range.
fn num_samples(&self, subpass: u32) -> Option<u32>
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?
fn has_depth_stencil_attachment(&self, subpass: u32) -> Option<(bool, bool)>
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.
fn has_depth(&self, subpass: u32) -> Option<bool>
Returns true if a subpass has a depth attachment or a depth-stencil attachment.
fn has_writable_depth(&self, subpass: u32) -> Option<bool>
Returns true if a subpass has a depth attachment or a depth-stencil attachment whose
layout is not DepthStencilReadOnlyOptimal
.
fn has_stencil(&self, subpass: u32) -> Option<bool>
Returns true if a subpass has a stencil attachment or a depth-stencil attachment.
fn has_writable_stencil(&self, subpass: u32) -> Option<bool>
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]
fn num_attachments(&self) -> usize
[src]
fn attachment_desc(&self, _: usize) -> Option<AttachmentDescription>
[src]
fn num_subpasses(&self) -> usize
[src]
fn subpass_desc(&self, num: usize) -> Option<PassDescription>
[src]
fn num_dependencies(&self) -> usize
[src]
fn dependency_desc(&self, _: usize) -> Option<PassDependencyDescription>
[src]
fn num_color_attachments(&self, subpass: u32) -> Option<u32>
[src]
fn num_samples(&self, _: u32) -> Option<u32>
[src]
fn has_depth_stencil_attachment(&self, subpass: u32) -> Option<(bool, bool)>
[src]
fn has_depth(&self, subpass: u32) -> Option<bool>
[src]
fn has_writable_depth(&self, subpass: u32) -> Option<bool>
[src]
fn has_stencil(&self, subpass: u32) -> Option<bool>
[src]
fn has_writable_stencil(&self, subpass: u32) -> Option<bool>
[src]
impl<D> RenderPassDesc for RenderPass<D> where
D: RenderPassDesc,
[src]
D: RenderPassDesc,
fn num_attachments(&self) -> usize
[src]
fn attachment_desc(&self, num: usize) -> Option<AttachmentDescription>
[src]
fn num_subpasses(&self) -> usize
[src]
fn subpass_desc(&self, num: usize) -> Option<PassDescription>
[src]
fn num_dependencies(&self) -> usize
[src]
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,
fn num_attachments(&self) -> usize
[src]
fn attachment_desc(&self, num: usize) -> Option<AttachmentDescription>
[src]
fn num_subpasses(&self) -> usize
[src]
fn subpass_desc(&self, num: usize) -> Option<PassDescription>
[src]
fn num_dependencies(&self) -> usize
[src]
fn dependency_desc(&self, num: usize) -> Option<PassDependencyDescription>
[src]
impl<Rp, A> RenderPassDesc for Framebuffer<Rp, A> where
Rp: RenderPassDesc,
[src]
Rp: RenderPassDesc,
fn num_attachments(&self) -> usize
[src]
fn attachment_desc(&self, num: usize) -> Option<AttachmentDescription>
[src]
fn num_subpasses(&self) -> usize
[src]
fn subpass_desc(&self, num: usize) -> Option<PassDescription>
[src]
fn num_dependencies(&self) -> usize
[src]
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,