| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Graphics.Vulkan.Core10.Fence
- newtype VkFenceCreateFlagBits = VkFenceCreateFlagBits VkFlags
- pattern VK_FENCE_CREATE_SIGNALED_BIT :: VkFenceCreateFlagBits
- vkCreateFence :: ("device" ::: VkDevice) -> ("pCreateInfo" ::: Ptr VkFenceCreateInfo) -> ("pAllocator" ::: Ptr VkAllocationCallbacks) -> ("pFence" ::: Ptr VkFence) -> IO VkResult
- vkDestroyFence :: ("device" ::: VkDevice) -> ("fence" ::: VkFence) -> ("pAllocator" ::: Ptr VkAllocationCallbacks) -> IO ()
- vkResetFences :: ("device" ::: VkDevice) -> ("fenceCount" ::: Word32) -> ("pFences" ::: Ptr VkFence) -> IO VkResult
- vkGetFenceStatus :: ("device" ::: VkDevice) -> ("fence" ::: VkFence) -> IO VkResult
- vkWaitForFences :: ("device" ::: VkDevice) -> ("fenceCount" ::: Word32) -> ("pFences" ::: Ptr VkFence) -> ("waitAll" ::: VkBool32) -> ("timeout" ::: Word64) -> IO VkResult
- data VkFenceCreateInfo = VkFenceCreateInfo {
- vkSType :: VkStructureType
- vkPNext :: Ptr ()
- vkFlags :: VkFenceCreateFlags
- type VkFenceCreateFlags = VkFenceCreateFlagBits
Documentation
newtype VkFenceCreateFlagBits Source #
VkFenceCreateFlagBits - Bitmask specifying initial state and behavior of a fence
See Also
Constructors
| VkFenceCreateFlagBits VkFlags |
pattern VK_FENCE_CREATE_SIGNALED_BIT :: VkFenceCreateFlagBits Source #
VK_FENCE_CREATE_SIGNALED_BIT specifies that the fence object is
created in the signaled state. Otherwise, it is created in the
unsignaled state.
vkCreateFence :: ("device" ::: VkDevice) -> ("pCreateInfo" ::: Ptr VkFenceCreateInfo) -> ("pAllocator" ::: Ptr VkAllocationCallbacks) -> ("pFence" ::: Ptr VkFence) -> IO VkResult Source #
vkCreateFence - Create a new fence object
Parameters
deviceis the logical device that creates the fence.
pCreateInfois a pointer to an instance of theVkFenceCreateInfostructure which contains information about how the fence is to be created.pAllocatorcontrols host memory allocation as described in the Memory Allocation chapter.pFencepoints to a handle in which the resulting fence object is returned.
Description
Valid Usage (Implicit)
devicemust be a validVkDevicehandle
pCreateInfomust be a valid pointer to a validVkFenceCreateInfostructure- If
pAllocatoris notNULL,pAllocatormust be a valid pointer to a validVkAllocationCallbacksstructure pFencemust be a valid pointer to aVkFencehandle
Return Codes
- Success
- -
VK_SUCCESS
- Failure
- -
VK_ERROR_OUT_OF_HOST_MEMORYVK_ERROR_OUT_OF_DEVICE_MEMORY
See Also
vkDestroyFence :: ("device" ::: VkDevice) -> ("fence" ::: VkFence) -> ("pAllocator" ::: Ptr VkAllocationCallbacks) -> IO () Source #
vkDestroyFence - Destroy a fence object
Parameters
deviceis the logical device that destroys the fence.
fenceis the handle of the fence to destroy.pAllocatorcontrols host memory allocation as described in the Memory Allocation chapter.
Description
Valid Usage
- All queue submission
commands that refer to
fencemust have completed execution
- If
VkAllocationCallbackswere provided whenfencewas created, a compatible set of callbacks must be provided here - If no
VkAllocationCallbackswere provided whenfencewas created,pAllocatormust beNULL
Valid Usage (Implicit)
devicemust be a validVkDevicehandle
- If
fenceis notVK_NULL_HANDLE,fencemust be a validVkFencehandle - If
pAllocatoris notNULL,pAllocatormust be a valid pointer to a validVkAllocationCallbacksstructure - If
fenceis a valid handle, it must have been created, allocated, or retrieved fromdevice
Host Synchronization
- Host access to
fencemust be externally synchronized
See Also
vkResetFences :: ("device" ::: VkDevice) -> ("fenceCount" ::: Word32) -> ("pFences" ::: Ptr VkFence) -> IO VkResult Source #
vkResetFences - Resets one or more fence objects
Parameters
deviceis the logical device that owns the fences.
fenceCountis the number of fences to reset.pFencesis a pointer to an array of fence handles to reset.
Description
If any member of pFences currently has its
payload imported
with temporary permanence, that fence’s prior permanent payload is first
restored. The remaining operations described therefore operate on the
restored payload.
When vkResetFences is executed on the host, it defines a /fence
unsignal operation/ for each fence, which resets the fence to the
unsignaled state.
If any member of pFences is already in the unsignaled state when
vkResetFences is executed, then vkResetFences has no effect on that
fence.
Valid Usage
- Each element of
pFencesmust not be currently associated with any queue command that has not yet completed execution on that queue
Valid Usage (Implicit)
devicemust be a validVkDevicehandle
pFencesmust be a valid pointer to an array offenceCountvalidVkFencehandlesfenceCountmust be greater than0- Each element of
pFencesmust have been created, allocated, or retrieved fromdevice
Host Synchronization
- Host access to each member of
pFencesmust be externally synchronized
Return Codes
- Success
- -
VK_SUCCESS
- Failure
- -
VK_ERROR_OUT_OF_HOST_MEMORYVK_ERROR_OUT_OF_DEVICE_MEMORY
See Also
vkGetFenceStatus :: ("device" ::: VkDevice) -> ("fence" ::: VkFence) -> IO VkResult Source #
vkGetFenceStatus - Return the status of a fence
Parameters
deviceis the logical device that owns the fence.
fenceis the handle of the fence to query.
Description
Upon success, vkGetFenceStatus returns the status of the fence object,
with the following return codes:
+-----------------------------------+-----------------------------------+
| Status | Meaning |
+===================================+===================================+
| @VK_SUCCESS@ | The fence specified by @fence@ is |
| | signaled. |
+-----------------------------------+-----------------------------------+
| @VK_NOT_READY@ | The fence specified by @fence@ is |
| | unsignaled. |
+-----------------------------------+-----------------------------------+
| @VK_ERROR_DEVICE_LOST@ | The device has been lost. See |
| | <{html_spec_relative}#devsandqueu |
| | es-lost-device Lost Device>. |
+-----------------------------------+-----------------------------------+
Fence Object Status CodesIf a queue submission command is pending execution, then the value returned by this command may immediately be out of date.
If the device has been lost (see
Lost Device),
vkGetFenceStatus may return any of the above status codes. If the
device has been lost and vkGetFenceStatus is called repeatedly, it
will eventually return either VK_SUCCESS or VK_ERROR_DEVICE_LOST.
Valid Usage (Implicit)
devicemust be a validVkDevicehandle
fencemust be a validVkFencehandlefencemust have been created, allocated, or retrieved fromdevice
Return Codes
- Success
- -
VK_SUCCESSVK_NOT_READY
- Failure
- -
VK_ERROR_OUT_OF_HOST_MEMORYVK_ERROR_OUT_OF_DEVICE_MEMORY
VK_ERROR_DEVICE_LOST
See Also
vkWaitForFences :: ("device" ::: VkDevice) -> ("fenceCount" ::: Word32) -> ("pFences" ::: Ptr VkFence) -> ("waitAll" ::: VkBool32) -> ("timeout" ::: Word64) -> IO VkResult Source #
vkWaitForFences - Wait for one or more fences to become signaled
Parameters
deviceis the logical device that owns the fences.
fenceCountis the number of fences to wait on.pFencesis a pointer to an array offenceCountfence handles.waitAllis the condition that must be satisfied to successfully unblock the wait. IfwaitAllisVK_TRUE, then the condition is that all fences inpFencesare signaled. Otherwise, the condition is that at least one fence inpFencesis signaled.timeoutis the timeout period in units of nanoseconds.timeoutis adjusted to the closest value allowed by the implementation-dependent timeout accuracy, which may be substantially longer than one nanosecond, and may be longer than the requested period.
Description
If the condition is satisfied when vkWaitForFences is called, then
vkWaitForFences returns immediately. If the condition is not satisfied
at the time vkWaitForFences is called, then vkWaitForFences will
block and wait up to timeout nanoseconds for the condition to become
satisfied.
If timeout is zero, then vkWaitForFences does not wait, but simply
returns the current state of the fences. VK_TIMEOUT will be returned
in this case if the condition is not satisfied, even though no actual
wait was performed.
If the specified timeout period expires before the condition is
satisfied, vkWaitForFences returns VK_TIMEOUT. If the condition is
satisfied before timeout nanoseconds has expired, vkWaitForFences
returns VK_SUCCESS.
If device loss occurs (see
Lost Device) before the
timeout has expired, vkWaitForFences must return in finite time with
either VK_SUCCESS or VK_ERROR_DEVICE_LOST.
Note
While we guarantee that vkWaitForFences must return in finite time,
no guarantees are made that it returns immediately upon device loss.
However, the client can reasonably expect that the delay will be on the
order of seconds and that calling vkWaitForFences will not result in a
permanently (or seemingly permanently) dead process.
Valid Usage (Implicit)
devicemust be a validVkDevicehandle
pFencesmust be a valid pointer to an array offenceCountvalidVkFencehandlesfenceCountmust be greater than0- Each element of
pFencesmust have been created, allocated, or retrieved fromdevice
Return Codes
- Success
- -
VK_SUCCESSVK_TIMEOUT
- Failure
- -
VK_ERROR_OUT_OF_HOST_MEMORYVK_ERROR_OUT_OF_DEVICE_MEMORY
VK_ERROR_DEVICE_LOST
See Also
data VkFenceCreateInfo Source #
VkFenceCreateInfo - Structure specifying parameters of a newly created fence
Description
Valid Usage (Implicit)
sTypemust beVK_STRUCTURE_TYPE_FENCE_CREATE_INFO
- Each
pNextmember of any structure (including this one) in thepNextchain must be eitherNULLor a pointer to a valid instance ofVkExportFenceCreateInfoorVkExportFenceWin32HandleInfoKHR - Each
sTypemember in thepNextchain must be unique flagsmust be a valid combination ofVkFenceCreateFlagBitsvalues
See Also
Constructors
| VkFenceCreateInfo | |
Fields
| |
type VkFenceCreateFlags = VkFenceCreateFlagBits Source #
VkFenceCreateFlags - Bitmask of VkFenceCreateFlagBits
Description
VkFenceCreateFlags is a bitmask type for setting a mask of zero or
more VkFenceCreateFlagBits.