From b6f76711f37f1236d72756a6417de1c1267f16e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roy=20Wellington=20=E2=85=A3?= Date: Sat, 14 Jan 2023 17:32:31 -0500 Subject: [PATCH 1/2] Minor touch-ups to the docs for `PrimaryCommandBufferAbstract` --- vulkano/src/command_buffer/traits.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/vulkano/src/command_buffer/traits.rs b/vulkano/src/command_buffer/traits.rs index 710c274dd7..bb80de09bb 100644 --- a/vulkano/src/command_buffer/traits.rs +++ b/vulkano/src/command_buffer/traits.rs @@ -49,8 +49,9 @@ pub unsafe trait PrimaryCommandBufferAbstract: /// /// The command buffer is not actually executed until you call `flush()` on the object. /// You are encouraged to chain together as many futures as possible before calling `flush()`, - /// and call `.then_signal_future()` before doing so. Note however that once you called - /// `execute()` there is no way to cancel the execution, even if you didn't flush yet. + /// and call `.then_signal_future()` before doing so. Note however that once you have called + /// `execute()` there is no way to cancel the execution, even if you haven't called `flush()` + /// yet. /// /// > **Note**: In the future this function may return `-> impl GpuFuture` instead of a /// > concrete type. @@ -79,8 +80,9 @@ pub unsafe trait PrimaryCommandBufferAbstract: /// /// The command buffer is not actually executed until you call `flush()` on the object. /// You are encouraged to chain together as many futures as possible before calling `flush()`, - /// and call `.then_signal_future()` before doing so. Note however that once you called - /// `execute()` there is no way to cancel the execution, even if you didn't flush yet. + /// and call `.then_signal_future()` before doing so. Note however that once you have called + /// `execute()` there is no way to cancel the execution, even if you haven't called `flush()` + /// yet. /// /// > **Note**: In the future this function may return `-> impl GpuFuture` instead of a /// > concrete type. From 64ae67c0df09f90d3b50e9079838bcb5b88f7a55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roy=20Wellington=20=E2=85=A3?= Date: Sun, 19 Feb 2023 19:06:27 -0500 Subject: [PATCH 2/2] Rewrite this passage to address the comments in #2129 --- vulkano/src/command_buffer/traits.rs | 34 ++++++++++++++++------------ 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/vulkano/src/command_buffer/traits.rs b/vulkano/src/command_buffer/traits.rs index bb80de09bb..d585f3331f 100644 --- a/vulkano/src/command_buffer/traits.rs +++ b/vulkano/src/command_buffer/traits.rs @@ -44,14 +44,17 @@ pub unsafe trait PrimaryCommandBufferAbstract: /// Executes this command buffer on a queue. /// - /// This function returns an object that implements the `GpuFuture` trait. See the - /// documentation of the `sync` module for more information. + /// This function returns an object that implements the [`GpuFuture`] trait. See the + /// documentation of the [`future`][crate::sync::future] module for more information. /// - /// The command buffer is not actually executed until you call `flush()` on the object. - /// You are encouraged to chain together as many futures as possible before calling `flush()`, - /// and call `.then_signal_future()` before doing so. Note however that once you have called - /// `execute()` there is no way to cancel the execution, even if you haven't called `flush()` - /// yet. + /// The command buffer is not actually executed until you call [`flush()`][GpuFuture::flush] on + /// the future. You are encouraged to chain together as many futures as possible prior to + /// calling [`flush()`][GpuFuture::flush]. In order to know when the future has completed, call + /// one of [`then_signal_fence()`][GpuFuture::then_signal_fence] or + /// [`then_signal_semaphore()`][GpuFuture::then_signal_semaphore]. You can do both together + /// with [`then_signal_fence_and_flush()`][GpuFuture::then_signal_fence_and_flush] or + /// [`then_signal_semaphore_and_flush()`][GpuFuture::then_signal_semaphore_and_flush], + /// respectively. /// /// > **Note**: In the future this function may return `-> impl GpuFuture` instead of a /// > concrete type. @@ -75,14 +78,17 @@ pub unsafe trait PrimaryCommandBufferAbstract: /// Executes the command buffer after an existing future. /// - /// This function returns an object that implements the `GpuFuture` trait. See the - /// documentation of the `sync` module for more information. + /// This function returns an object that implements the [`GpuFuture`] trait. See the + /// documentation of the [`future`][crate::sync::future] module for more information. /// - /// The command buffer is not actually executed until you call `flush()` on the object. - /// You are encouraged to chain together as many futures as possible before calling `flush()`, - /// and call `.then_signal_future()` before doing so. Note however that once you have called - /// `execute()` there is no way to cancel the execution, even if you haven't called `flush()` - /// yet. + /// The command buffer is not actually executed until you call [`flush()`][GpuFuture::flush] on + /// the future. You are encouraged to chain together as many futures as possible prior to + /// calling [`flush()`][GpuFuture::flush]. In order to know when the future has completed, call + /// one of [`then_signal_fence()`][GpuFuture::then_signal_fence] or + /// [`then_signal_semaphore()`][GpuFuture::then_signal_semaphore]. You can do both together + /// with [`then_signal_fence_and_flush()`][GpuFuture::then_signal_fence_and_flush] or + /// [`then_signal_semaphore_and_flush()`][GpuFuture::then_signal_semaphore_and_flush], + /// respectively. /// /// > **Note**: In the future this function may return `-> impl GpuFuture` instead of a /// > concrete type.