diff --git a/vulkano/src/command_buffer/std/execute.rs b/vulkano/src/command_buffer/std/execute.rs index 632178f1..c429bc88 100644 --- a/vulkano/src/command_buffer/std/execute.rs +++ b/vulkano/src/command_buffer/std/execute.rs @@ -141,7 +141,7 @@ unsafe impl CommandsList for ExecuteCommand } unsafe impl CommandsListPossibleInsideRenderPass for ExecuteCommand - where Cb: CommandsListOutput, L: CommandsListPossibleInsideRenderPass + where Cb: CommandsListOutput, L: CommandsListPossibleInsideRenderPass + CommandsListBase { type RenderPass = L::RenderPass; type Framebuffer = L::Framebuffer; @@ -169,7 +169,7 @@ unsafe impl CommandsListPossibleInsideRenderPass for ExecuteCommand CommandsListPossibleOutsideRenderPass for ExecuteCommand - where Cb: CommandsListOutput, L: CommandsListPossibleOutsideRenderPass + where Cb: CommandsListOutput, L: CommandsListPossibleOutsideRenderPass + CommandsListBase { } diff --git a/vulkano/src/command_buffer/std/mod.rs b/vulkano/src/command_buffer/std/mod.rs index fe7c9107..0de37348 100644 --- a/vulkano/src/command_buffer/std/mod.rs +++ b/vulkano/src/command_buffer/std/mod.rs @@ -227,15 +227,22 @@ unsafe impl AbstractCommandsList for C where C: CommandsList { } }*/ -/// Extension trait for `CommandsListBase` that indicates that we're possibly outside a render pass. -pub unsafe trait CommandsListPossibleOutsideRenderPass: CommandsListBase { +/// Extension trait for both `CommandsListBase` and `CommandsListOutput` that indicates that we're +/// possibly outside a render pass. +/// +/// In other words, if this trait is *not* implemented then we're guaranteed *not* to be outside +/// of a render pass. If it is implemented, then we maybe are but that's not sure. +pub unsafe trait CommandsListPossibleOutsideRenderPass { /*/// Returns `true` if we're outside a render pass. fn is_outside_render_pass(&self) -> bool;*/ } -/// Extension trait for `StdCommandsCommandsListBaseList` that indicates that we're possibly inside -/// a render pass. -pub unsafe trait CommandsListPossibleInsideRenderPass: CommandsListBase { +/// Extension trait for both `CommandsListBase` and `CommandsListOutput` that indicates that we're +/// possibly inside a render pass. +/// +/// In other words, if this trait is *not* implemented then we're guaranteed *not* to be inside +/// a render pass. If it is implemented, then we maybe are but that's not sure. +pub unsafe trait CommandsListPossibleInsideRenderPass { type RenderPass: RenderPass; type Framebuffer: Framebuffer; diff --git a/vulkano/src/command_buffer/std/update_buffer.rs b/vulkano/src/command_buffer/std/update_buffer.rs index c76afcb6..22a0df2a 100644 --- a/vulkano/src/command_buffer/std/update_buffer.rs +++ b/vulkano/src/command_buffer/std/update_buffer.rs @@ -245,6 +245,11 @@ unsafe impl CommandsListOutput for UpdateCommandCb } } +unsafe impl CommandsListPossibleOutsideRenderPass for UpdateCommandCb + where B: TrackedBuffer, L: CommandsListOutput +{ +} + #[cfg(test)] mod tests { use std::time::Duration;