mirror of
https://github.com/vulkano-rs/vulkano.git
synced 2024-11-26 16:54:16 +00:00
Add small test for EmptyRenderPass
This commit is contained in:
parent
39d802d242
commit
9542c2a097
@ -14,7 +14,6 @@ use std::sync::Arc;
|
||||
|
||||
use device::Device;
|
||||
use format::ClearValue;
|
||||
use framebuffer::framebuffer::FramebufferCreationError;
|
||||
use framebuffer::sys::UnsafeRenderPass;
|
||||
use framebuffer::traits::RenderPass;
|
||||
use framebuffer::traits::RenderPassDesc;
|
||||
@ -65,7 +64,6 @@ unsafe impl RenderPass for EmptySinglePassRenderPass {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
unsafe impl RenderPassDesc for EmptySinglePassRenderPass {
|
||||
type AttachmentsIter = EmptyIter<LayoutAttachmentDescription>;
|
||||
type PassesIter = OptionIntoIter<LayoutPassDescription>;
|
||||
@ -105,6 +103,11 @@ unsafe impl RenderPassDesc for EmptySinglePassRenderPass {
|
||||
None
|
||||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn num_samples(&self, subpass: u32) -> Option<u32> {
|
||||
None
|
||||
}
|
||||
}
|
||||
|
||||
unsafe impl RenderPassAttachmentsList<()> for EmptySinglePassRenderPass {
|
||||
@ -124,3 +127,14 @@ unsafe impl RenderPassClearValues<()> for EmptySinglePassRenderPass {
|
||||
iter::empty()
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use framebuffer::EmptySinglePassRenderPass;
|
||||
|
||||
#[test]
|
||||
fn create() {
|
||||
let (device, _) = gfx_dev_and_queue!();
|
||||
let _ = EmptySinglePassRenderPass::new(&device).unwrap();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user