pub struct Fence {
pub device: Device,
pub handle: Fence,
pub timestamps: TimestampQueryPool,
/* private fields */
}Expand description
Represents a Vulkan fence used to track queue submission completion.
See VkFence.
Fields§
§device: DeviceThe device which owns this fence resource.
Note: This field is read-only.
handle: FenceThe native Vulkan fence handle.
Note: This field is read-only.
timestamps: TimestampQueryPoolTimestamp query results for queued work once this fence has signaled.
Note: This field is read-only.
Implementations§
Source§impl Fence
impl Fence
Sourcepub fn create(device: &Device, signaled: bool) -> Result<Self, DriverError>
pub fn create(device: &Device, signaled: bool) -> Result<Self, DriverError>
Creates a Vulkan fence owned by device.
See vkCreateFence.
Sourcepub fn status(&self) -> Result<bool, DriverError>
pub fn status(&self) -> Result<bool, DriverError>
Returns true if this fence is signaled.
Signaled deferred payloads are released before this returns Ok(true).
See vkGetFenceStatus.
Sourcepub fn reset(&mut self) -> Result<&mut Self, DriverError>
pub fn reset(&mut self) -> Result<&mut Self, DriverError>
Resets this fence to the unsignaled state.
If queued work has already signaled, deferred payloads are released before the fence is reset.
See vkResetFences.
Sourcepub fn wait(&mut self) -> Result<&mut Self, DriverError>
pub fn wait(&mut self) -> Result<&mut Self, DriverError>
Waits for this fence to signal, then releases deferred payloads.
See vkWaitForFences.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Fence
impl !RefUnwindSafe for Fence
impl !Sync for Fence
impl !UnwindSafe for Fence
impl Send for Fence
impl Unpin for Fence
impl UnsafeUnpin for Fence
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more