mirror of
https://github.com/vulkano-rs/vulkano.git
synced 2024-11-22 06:45:23 +00:00
Now panicking if not all subpasses have been used
This commit is contained in:
parent
a5c3a8e32f
commit
6b06fdd693
@ -320,16 +320,17 @@ impl PrimaryCommandBufferBuilderInlineDraw {
|
||||
}
|
||||
|
||||
/// Finish drawing this renderpass and get back the builder.
|
||||
///
|
||||
/// # Panic
|
||||
///
|
||||
/// - Panicks if not at the last subpass.
|
||||
///
|
||||
#[inline]
|
||||
pub fn draw_end(mut self) -> PrimaryCommandBufferBuilder {
|
||||
assert!(self.current_subpass + 1 == self.num_subpasses);
|
||||
|
||||
unsafe {
|
||||
// skipping the remaining subpasses
|
||||
for _ in 0 .. (self.num_subpasses - self.current_subpass - 1) {
|
||||
self.inner = self.inner.next_subpass(false);
|
||||
}
|
||||
|
||||
let inner = self.inner.end_renderpass();
|
||||
|
||||
PrimaryCommandBufferBuilder {
|
||||
inner: inner,
|
||||
}
|
||||
@ -410,16 +411,17 @@ impl PrimaryCommandBufferBuilderSecondaryDraw {
|
||||
}
|
||||
|
||||
/// Finish drawing this renderpass and get back the builder.
|
||||
///
|
||||
/// # Panic
|
||||
///
|
||||
/// - Panicks if not at the last subpass.
|
||||
///
|
||||
#[inline]
|
||||
pub fn draw_end(mut self) -> PrimaryCommandBufferBuilder {
|
||||
assert!(self.current_subpass + 1 == self.num_subpasses);
|
||||
|
||||
unsafe {
|
||||
// skipping the remaining subpasses
|
||||
for _ in 0 .. (self.num_subpasses - self.current_subpass - 1) {
|
||||
self.inner = self.inner.next_subpass(false);
|
||||
}
|
||||
|
||||
let inner = self.inner.end_renderpass();
|
||||
|
||||
PrimaryCommandBufferBuilder {
|
||||
inner: inner,
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user