mirror of
https://github.com/vulkano-rs/vulkano.git
synced 2024-11-26 00:34:19 +00:00
Merge pull request #653 from tomaka/secondary-cb-fixes
Misc fixes to make secondary command buffers usable
This commit is contained in:
commit
ea7a1d30c0
@ -375,7 +375,7 @@ impl AutoCommandBufferBuilder<StandardCommandPoolBuilder> {
|
|||||||
compute_allowed,
|
compute_allowed,
|
||||||
subpasses_remaining,
|
subpasses_remaining,
|
||||||
secondary_cb,
|
secondary_cb,
|
||||||
subpass_secondary: secondary_cb,
|
subpass_secondary: false,
|
||||||
flags,
|
flags,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -412,12 +412,10 @@ impl<P> AutoCommandBufferBuilder<P> {
|
|||||||
pub fn build(self) -> Result<AutoCommandBuffer<P::Alloc>, BuildError>
|
pub fn build(self) -> Result<AutoCommandBuffer<P::Alloc>, BuildError>
|
||||||
where P: CommandPoolBuilderAlloc
|
where P: CommandPoolBuilderAlloc
|
||||||
{
|
{
|
||||||
if self.secondary_cb {
|
if !self.secondary_cb && self.subpasses_remaining.is_some() {
|
||||||
return Err(AutoCommandBufferBuilderContextError::ForbiddenInSecondary.into());
|
return Err(AutoCommandBufferBuilderContextError::ForbiddenInsideRenderPass.into());
|
||||||
}
|
}
|
||||||
|
|
||||||
self.ensure_outside_render_pass()?;
|
|
||||||
|
|
||||||
let submit_state = match self.flags {
|
let submit_state = match self.flags {
|
||||||
Flags::None => {
|
Flags::None => {
|
||||||
SubmitState::ExclusiveUse { in_use: AtomicBool::new(false) }
|
SubmitState::ExclusiveUse { in_use: AtomicBool::new(false) }
|
||||||
|
Loading…
Reference in New Issue
Block a user