mirror of
https://github.com/vulkano-rs/vulkano.git
synced 2024-11-22 06:45:23 +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,
|
||||
subpasses_remaining,
|
||||
secondary_cb,
|
||||
subpass_secondary: secondary_cb,
|
||||
subpass_secondary: false,
|
||||
flags,
|
||||
})
|
||||
}
|
||||
@ -412,12 +412,10 @@ impl<P> AutoCommandBufferBuilder<P> {
|
||||
pub fn build(self) -> Result<AutoCommandBuffer<P::Alloc>, BuildError>
|
||||
where P: CommandPoolBuilderAlloc
|
||||
{
|
||||
if self.secondary_cb {
|
||||
return Err(AutoCommandBufferBuilderContextError::ForbiddenInSecondary.into());
|
||||
if !self.secondary_cb && self.subpasses_remaining.is_some() {
|
||||
return Err(AutoCommandBufferBuilderContextError::ForbiddenInsideRenderPass.into());
|
||||
}
|
||||
|
||||
self.ensure_outside_render_pass()?;
|
||||
|
||||
let submit_state = match self.flags {
|
||||
Flags::None => {
|
||||
SubmitState::ExclusiveUse { in_use: AtomicBool::new(false) }
|
||||
|
Loading…
Reference in New Issue
Block a user