mirror of
https://github.com/vulkano-rs/vulkano.git
synced 2024-11-25 16:25:31 +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.
|
/// Finish drawing this renderpass and get back the builder.
|
||||||
|
///
|
||||||
|
/// # Panic
|
||||||
|
///
|
||||||
|
/// - Panicks if not at the last subpass.
|
||||||
|
///
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn draw_end(mut self) -> PrimaryCommandBufferBuilder {
|
pub fn draw_end(mut self) -> PrimaryCommandBufferBuilder {
|
||||||
|
assert!(self.current_subpass + 1 == self.num_subpasses);
|
||||||
|
|
||||||
unsafe {
|
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();
|
let inner = self.inner.end_renderpass();
|
||||||
|
|
||||||
PrimaryCommandBufferBuilder {
|
PrimaryCommandBufferBuilder {
|
||||||
inner: inner,
|
inner: inner,
|
||||||
}
|
}
|
||||||
@ -410,16 +411,17 @@ impl PrimaryCommandBufferBuilderSecondaryDraw {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Finish drawing this renderpass and get back the builder.
|
/// Finish drawing this renderpass and get back the builder.
|
||||||
|
///
|
||||||
|
/// # Panic
|
||||||
|
///
|
||||||
|
/// - Panicks if not at the last subpass.
|
||||||
|
///
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn draw_end(mut self) -> PrimaryCommandBufferBuilder {
|
pub fn draw_end(mut self) -> PrimaryCommandBufferBuilder {
|
||||||
|
assert!(self.current_subpass + 1 == self.num_subpasses);
|
||||||
|
|
||||||
unsafe {
|
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();
|
let inner = self.inner.end_renderpass();
|
||||||
|
|
||||||
PrimaryCommandBufferBuilder {
|
PrimaryCommandBufferBuilder {
|
||||||
inner: inner,
|
inner: inner,
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user