Add RenderPass::empty_single_pass

This commit is contained in:
Pierre Krieger 2017-01-25 22:11:43 +01:00
parent dee1ef4ab0
commit ae967d267a

View File

@ -18,6 +18,7 @@ use smallvec::SmallVec;
use device::Device;
use format::ClearValue;
use framebuffer::EmptySinglePassRenderPassDesc;
use framebuffer::FramebufferCreationError;
use framebuffer::LayoutAttachmentDescription;
use framebuffer::LayoutPassDependencyDescription;
@ -277,6 +278,18 @@ impl<D> RenderPass<D> where D: RenderPassDesc {
}
}
impl RenderPass<EmptySinglePassRenderPassDesc> {
/// Builds a render pass with one subpass and no attachment.
///
/// This method is useful for quick tests.
#[inline]
pub fn empty_single_pass(device: Arc<Device>)
-> Result<RenderPass<EmptySinglePassRenderPassDesc>, RenderPassCreationError>
{
RenderPass::new(device, EmptySinglePassRenderPassDesc)
}
}
impl<D> RenderPass<D> {
/// Returns the granularity of this render pass.
///