Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- newtype VkSwapchainCreateFlagBitsKHR = VkSwapchainCreateFlagBitsKHR VkFlags
- newtype VkDeviceGroupPresentModeFlagBitsKHR = VkDeviceGroupPresentModeFlagBitsKHR VkFlags
- pattern VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_BIT_KHR :: VkDeviceGroupPresentModeFlagBitsKHR
- pattern VK_DEVICE_GROUP_PRESENT_MODE_REMOTE_BIT_KHR :: VkDeviceGroupPresentModeFlagBitsKHR
- pattern VK_DEVICE_GROUP_PRESENT_MODE_SUM_BIT_KHR :: VkDeviceGroupPresentModeFlagBitsKHR
- pattern VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_MULTI_DEVICE_BIT_KHR :: VkDeviceGroupPresentModeFlagBitsKHR
- pattern VK_IMAGE_LAYOUT_PRESENT_SRC_KHR :: VkImageLayout
- pattern VK_SUBOPTIMAL_KHR :: VkResult
- pattern VK_ERROR_OUT_OF_DATE_KHR :: VkResult
- pattern VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR :: VkStructureType
- pattern VK_STRUCTURE_TYPE_PRESENT_INFO_KHR :: VkStructureType
- pattern VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_CAPABILITIES_KHR :: VkStructureType
- pattern VK_STRUCTURE_TYPE_IMAGE_SWAPCHAIN_CREATE_INFO_KHR :: VkStructureType
- pattern VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHR :: VkStructureType
- pattern VK_STRUCTURE_TYPE_ACQUIRE_NEXT_IMAGE_INFO_KHR :: VkStructureType
- pattern VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_INFO_KHR :: VkStructureType
- pattern VK_STRUCTURE_TYPE_DEVICE_GROUP_SWAPCHAIN_CREATE_INFO_KHR :: VkStructureType
- pattern VK_OBJECT_TYPE_SWAPCHAIN_KHR :: VkObjectType
- pattern VK_SWAPCHAIN_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT_KHR :: VkSwapchainCreateFlagBitsKHR
- pattern VK_SWAPCHAIN_CREATE_PROTECTED_BIT_KHR :: VkSwapchainCreateFlagBitsKHR
- pattern VK_KHR_SWAPCHAIN_SPEC_VERSION :: Integral a => a
- pattern VK_KHR_SWAPCHAIN_EXTENSION_NAME :: (Eq a, IsString a) => a
- type VkSwapchainKHR = Ptr VkSwapchainKHR_T
- vkCreateSwapchainKHR :: ("device" ::: VkDevice) -> ("pCreateInfo" ::: Ptr VkSwapchainCreateInfoKHR) -> ("pAllocator" ::: Ptr VkAllocationCallbacks) -> ("pSwapchain" ::: Ptr VkSwapchainKHR) -> IO VkResult
- vkDestroySwapchainKHR :: ("device" ::: VkDevice) -> ("swapchain" ::: VkSwapchainKHR) -> ("pAllocator" ::: Ptr VkAllocationCallbacks) -> IO ()
- vkGetSwapchainImagesKHR :: ("device" ::: VkDevice) -> ("swapchain" ::: VkSwapchainKHR) -> ("pSwapchainImageCount" ::: Ptr Word32) -> ("pSwapchainImages" ::: Ptr VkImage) -> IO VkResult
- vkAcquireNextImageKHR :: ("device" ::: VkDevice) -> ("swapchain" ::: VkSwapchainKHR) -> ("timeout" ::: Word64) -> ("semaphore" ::: VkSemaphore) -> ("fence" ::: VkFence) -> ("pImageIndex" ::: Ptr Word32) -> IO VkResult
- vkQueuePresentKHR :: ("queue" ::: VkQueue) -> ("pPresentInfo" ::: Ptr VkPresentInfoKHR) -> IO VkResult
- vkGetDeviceGroupPresentCapabilitiesKHR :: ("device" ::: VkDevice) -> ("pDeviceGroupPresentCapabilities" ::: Ptr VkDeviceGroupPresentCapabilitiesKHR) -> IO VkResult
- vkGetDeviceGroupSurfacePresentModesKHR :: ("device" ::: VkDevice) -> ("surface" ::: VkSurfaceKHR) -> ("pModes" ::: Ptr VkDeviceGroupPresentModeFlagsKHR) -> IO VkResult
- vkAcquireNextImage2KHR :: ("device" ::: VkDevice) -> ("pAcquireInfo" ::: Ptr VkAcquireNextImageInfoKHR) -> ("pImageIndex" ::: Ptr Word32) -> IO VkResult
- vkGetPhysicalDevicePresentRectanglesKHR :: ("physicalDevice" ::: VkPhysicalDevice) -> ("surface" ::: VkSurfaceKHR) -> ("pRectCount" ::: Ptr Word32) -> ("pRects" ::: Ptr VkRect2D) -> IO VkResult
- data VkSwapchainCreateInfoKHR = VkSwapchainCreateInfoKHR {
- vkSType :: VkStructureType
- vkPNext :: Ptr ()
- vkFlags :: VkSwapchainCreateFlagsKHR
- vkSurface :: VkSurfaceKHR
- vkMinImageCount :: Word32
- vkImageFormat :: VkFormat
- vkImageColorSpace :: VkColorSpaceKHR
- vkImageExtent :: VkExtent2D
- vkImageArrayLayers :: Word32
- vkImageUsage :: VkImageUsageFlags
- vkImageSharingMode :: VkSharingMode
- vkQueueFamilyIndexCount :: Word32
- vkPQueueFamilyIndices :: Ptr Word32
- vkPreTransform :: VkSurfaceTransformFlagBitsKHR
- vkCompositeAlpha :: VkCompositeAlphaFlagBitsKHR
- vkPresentMode :: VkPresentModeKHR
- vkClipped :: VkBool32
- vkOldSwapchain :: VkSwapchainKHR
- data VkPresentInfoKHR = VkPresentInfoKHR {}
- data VkDeviceGroupPresentCapabilitiesKHR = VkDeviceGroupPresentCapabilitiesKHR {}
- data VkImageSwapchainCreateInfoKHR = VkImageSwapchainCreateInfoKHR {
- vkSType :: VkStructureType
- vkPNext :: Ptr ()
- vkSwapchain :: VkSwapchainKHR
- data VkBindImageMemorySwapchainInfoKHR = VkBindImageMemorySwapchainInfoKHR {
- vkSType :: VkStructureType
- vkPNext :: Ptr ()
- vkSwapchain :: VkSwapchainKHR
- vkImageIndex :: Word32
- data VkAcquireNextImageInfoKHR = VkAcquireNextImageInfoKHR {}
- data VkDeviceGroupPresentInfoKHR = VkDeviceGroupPresentInfoKHR {}
- data VkDeviceGroupSwapchainCreateInfoKHR = VkDeviceGroupSwapchainCreateInfoKHR {}
- type VkSwapchainCreateFlagsKHR = VkSwapchainCreateFlagBitsKHR
- type VkDeviceGroupPresentModeFlagsKHR = VkDeviceGroupPresentModeFlagBitsKHR
Documentation
newtype VkSwapchainCreateFlagBitsKHR Source #
VkSwapchainCreateFlagBitsKHR - Bitmask controlling swapchain creation
See Also
Instances
newtype VkDeviceGroupPresentModeFlagBitsKHR Source #
VkDeviceGroupPresentModeFlagBitsKHR - Bitmask specifying supported device group present modes
See Also
VkDeviceGroupPresentInfoKHR
, VkDeviceGroupPresentModeFlagsKHR
Instances
pattern VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_BIT_KHR :: VkDeviceGroupPresentModeFlagBitsKHR Source #
VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_BIT_KHR
specifies that any physical
device with a presentation engine can present its own swapchain
images.
pattern VK_DEVICE_GROUP_PRESENT_MODE_REMOTE_BIT_KHR :: VkDeviceGroupPresentModeFlagBitsKHR Source #
VK_DEVICE_GROUP_PRESENT_MODE_REMOTE_BIT_KHR
specifies that any
physical device with a presentation engine can present swapchain
images from any physical device in its presentMask
.
pattern VK_DEVICE_GROUP_PRESENT_MODE_SUM_BIT_KHR :: VkDeviceGroupPresentModeFlagBitsKHR Source #
VK_DEVICE_GROUP_PRESENT_MODE_SUM_BIT_KHR
specifies that any physical
device with a presentation engine can present the sum of swapchain
images from any physical devices in its presentMask
.
pattern VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_MULTI_DEVICE_BIT_KHR :: VkDeviceGroupPresentModeFlagBitsKHR Source #
VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_MULTI_DEVICE_BIT_KHR
specifies that
multiple physical devices with a presentation engine can each present
their own swapchain images.
pattern VK_IMAGE_LAYOUT_PRESENT_SRC_KHR :: VkImageLayout Source #
pattern VK_SUBOPTIMAL_KHR :: VkResult Source #
pattern VK_ERROR_OUT_OF_DATE_KHR :: VkResult Source #
pattern VK_STRUCTURE_TYPE_PRESENT_INFO_KHR :: VkStructureType Source #
pattern VK_OBJECT_TYPE_SWAPCHAIN_KHR :: VkObjectType Source #
pattern VK_SWAPCHAIN_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT_KHR :: VkSwapchainCreateFlagBitsKHR Source #
VK_SWAPCHAIN_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT_KHR
specifies that
images created from the swapchain (i.e. with the swapchain
member of
VkImageSwapchainCreateInfoKHR
set to this swapchain’s handle) must
use VK_IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT
.
pattern VK_KHR_SWAPCHAIN_SPEC_VERSION :: Integral a => a Source #
pattern VK_KHR_SWAPCHAIN_EXTENSION_NAME :: (Eq a, IsString a) => a Source #
type VkSwapchainKHR = Ptr VkSwapchainKHR_T Source #
VkSwapchainKHR - Opaque handle to a swapchain object
Description
A swapchain is an abstraction for an array of presentable images that
are associated with a surface. The presentable images are represented by
VkImage
objects created by the platform. One image (which can be an
array image for multiview/stereoscopic-3D surfaces) is displayed at a
time, but multiple images can be queued for presentation. An
application renders to the image, and then queues the image for
presentation to the surface.
A native window cannot be associated with more than one swapchain at a time. Further, swapchains cannot be created for native windows that have a non-Vulkan graphics API surface associated with them.
Note
The presentation engine is an abstraction for the platform’s compositor or display engine.
The presentation engine may be synchronous or asynchronous with respect to the application and/or logical device.
Some implementations may use the device’s graphics queue or dedicated presentation hardware to perform presentation.
The presentable images of a swapchain are owned by the presentation
engine. An application can acquire use of a presentable image from the
presentation engine. Use of a presentable image must occur only after
the image is returned by vkAcquireNextImageKHR
, and before it is
presented by vkQueuePresentKHR
. This includes transitioning the image
layout and rendering commands.
An application can acquire use of a presentable image with
vkAcquireNextImageKHR
. After acquiring a presentable image and before
modifying it, the application must use a synchronization primitive to
ensure that the presentation engine has finished reading from the image.
The application can then transition the image’s layout, queue
rendering commands to it, etc. Finally, the application presents the
image with vkQueuePresentKHR
, which releases the acquisition of the
image.
The presentation engine controls the order in which presentable images are acquired for use by the application.
Note
This allows the platform to handle situations which require out-of-order return of images after presentation. At the same time, it allows the application to generate command buffers referencing all of the images in the swapchain at initialization time, rather than in its main loop.
See Also
VkAcquireNextImageInfoKHR
, VkBindImageMemorySwapchainInfoKHR
,
VkImageSwapchainCreateInfoKHR
, VkPresentInfoKHR
,
VkSwapchainCreateInfoKHR
, vkAcquireNextImageKHR
,
vkCreateSharedSwapchainsKHR
,
vkCreateSwapchainKHR
, vkDestroySwapchainKHR
,
vkGetPastPresentationTimingGOOGLE
,
vkGetRefreshCycleDurationGOOGLE
,
vkGetSwapchainCounterEXT
,
vkGetSwapchainImagesKHR
,
vkGetSwapchainStatusKHR
,
vkSetHdrMetadataEXT
vkCreateSwapchainKHR :: ("device" ::: VkDevice) -> ("pCreateInfo" ::: Ptr VkSwapchainCreateInfoKHR) -> ("pAllocator" ::: Ptr VkAllocationCallbacks) -> ("pSwapchain" ::: Ptr VkSwapchainKHR) -> IO VkResult Source #
vkCreateSwapchainKHR - Create a swapchain
Parameters
device
is the device to create the swapchain for.
pCreateInfo
is a pointer to an instance of theVkSwapchainCreateInfoKHR
structure specifying the parameters of the created swapchain.pAllocator
is the allocator used for host memory allocated for the swapchain object when there is no more specific allocator available (see Memory Allocation).pSwapchain
is a pointer to aVkSwapchainKHR
handle in which the created swapchain object will be returned.
Valid Usage (Implicit)
device
must be a validVkDevice
handle
pCreateInfo
must be a valid pointer to a validVkSwapchainCreateInfoKHR
structure- If
pAllocator
is notNULL
,pAllocator
must be a valid pointer to a validVkAllocationCallbacks
structure pSwapchain
must be a valid pointer to aVkSwapchainKHR
handle
Host Synchronization
- Host access to
pCreateInfo.surface
must be externally synchronized
- Host access to
pCreateInfo.oldSwapchain
must be externally synchronized
Return Codes
[Success]
- VK_SUCCESS
[Failure]
- VK_ERROR_OUT_OF_HOST_MEMORY
VK_ERROR_OUT_OF_DEVICE_MEMORY
VK_ERROR_DEVICE_LOST
VK_ERROR_SURFACE_LOST_KHR
VK_ERROR_NATIVE_WINDOW_IN_USE_KHR
See Also
VkAllocationCallbacks
,
VkDevice
,
VkSwapchainCreateInfoKHR
, VkSwapchainKHR
vkDestroySwapchainKHR :: ("device" ::: VkDevice) -> ("swapchain" ::: VkSwapchainKHR) -> ("pAllocator" ::: Ptr VkAllocationCallbacks) -> IO () Source #
vkDestroySwapchainKHR - Destroy a swapchain object
Parameters
device
is theVkDevice
associated withswapchain
.
swapchain
is the swapchain to destroy.pAllocator
is the allocator used for host memory allocated for the swapchain object when there is no more specific allocator available (see Memory Allocation).
Description
The application must not destroy a swapchain until after completion of
all outstanding operations on images that were acquired from the
swapchain. swapchain
and all associated VkImage
handles are
destroyed, and must not be acquired or used any more by the
application. The memory of each VkImage
will only be freed after that
image is no longer used by the presentation engine. For example, if one
image of the swapchain is being displayed in a window, the memory for
that image may not be freed until the window is destroyed, or another
swapchain is created for the window. Destroying the swapchain does not
invalidate the parent VkSurfaceKHR
, and a new swapchain can be
created with it.
When a swapchain associated with a display surface is destroyed, if the image most recently presented to the display surface is from the swapchain being destroyed, then either any display resources modified by presenting images from any swapchain associated with the display surface must be reverted by the implementation to their state prior to the first present performed on one of these swapchains, or such resources must be left in their current state.
Valid Usage
- All uses of presentable images acquired from
swapchain
must have completed execution
- If
VkAllocationCallbacks
were provided whenswapchain
was created, a compatible set of callbacks must be provided here - If no
VkAllocationCallbacks
were provided whenswapchain
was created,pAllocator
must beNULL
Valid Usage (Implicit)
device
must be a validVkDevice
handle
- If
swapchain
is notVK_NULL_HANDLE
,swapchain
must be a validVkSwapchainKHR
handle - If
pAllocator
is notNULL
,pAllocator
must be a valid pointer to a validVkAllocationCallbacks
structure - Both of
device
, andswapchain
that are valid handles must have been created, allocated, or retrieved from the sameVkInstance
Host Synchronization
- Host access to
swapchain
must be externally synchronized
See Also
vkGetSwapchainImagesKHR :: ("device" ::: VkDevice) -> ("swapchain" ::: VkSwapchainKHR) -> ("pSwapchainImageCount" ::: Ptr Word32) -> ("pSwapchainImages" ::: Ptr VkImage) -> IO VkResult Source #
vkGetSwapchainImagesKHR - Obtain the array of presentable images associated with a swapchain
Parameters
device
is the device associated withswapchain
.
swapchain
is the swapchain to query.pSwapchainImageCount
is a pointer to an integer related to the number of presentable images available or queried, as described below.pSwapchainImages
is eitherNULL
or a pointer to an array ofVkImage
handles.
Description
If pSwapchainImages
is NULL
, then the number of presentable images
for swapchain
is returned in pSwapchainImageCount
. Otherwise,
pSwapchainImageCount
must point to a variable set by the user to the
number of elements in the pSwapchainImages
array, and on return the
variable is overwritten with the number of structures actually written
to pSwapchainImages
. If the value of pSwapchainImageCount
is less
than the number of presentable images for swapchain
, at most
pSwapchainImageCount
structures will be written. If
pSwapchainImageCount
is smaller than the number of presentable images
for swapchain
, VK_INCOMPLETE
will be returned instead of
VK_SUCCESS
to indicate that not all the available values were
returned.
Valid Usage (Implicit)
device
must be a validVkDevice
handle
swapchain
must be a validVkSwapchainKHR
handlepSwapchainImageCount
must be a valid pointer to auint32_t
value- If the value referenced by
pSwapchainImageCount
is not0
, andpSwapchainImages
is notNULL
,pSwapchainImages
must be a valid pointer to an array ofpSwapchainImageCount
VkImage
handles - Both of
device
, andswapchain
must have been created, allocated, or retrieved from the sameVkInstance
Return Codes
[Success]
- VK_SUCCESS
VK_INCOMPLETE
[Failure]
- VK_ERROR_OUT_OF_HOST_MEMORY
VK_ERROR_OUT_OF_DEVICE_MEMORY
See Also
vkAcquireNextImageKHR :: ("device" ::: VkDevice) -> ("swapchain" ::: VkSwapchainKHR) -> ("timeout" ::: Word64) -> ("semaphore" ::: VkSemaphore) -> ("fence" ::: VkFence) -> ("pImageIndex" ::: Ptr Word32) -> IO VkResult Source #
vkAcquireNextImageKHR - Retrieve the index of the next available presentable image
Parameters
device
is the device associated withswapchain
.
swapchain
is the non-retired swapchain from which an image is being acquired.timeout
specifies how long the function waits, in nanoseconds, if no image is available.semaphore
isVK_NULL_HANDLE
or a semaphore to signal.fence
isVK_NULL_HANDLE
or a fence to signal.pImageIndex
is a pointer to auint32_t
that is set to the index of the next image to use (i.e. an index into the array of images returned byvkGetSwapchainImagesKHR
).
Valid Usage
swapchain
must not be in the retired state
- If
semaphore
is notVK_NULL_HANDLE
it must be unsignaled - If
semaphore
is notVK_NULL_HANDLE
it must not have any uncompleted signal or wait operations pending - If
fence
is notVK_NULL_HANDLE
it must be unsignaled and must not be associated with any other queue command that has not yet completed execution on that queue semaphore
andfence
must not both be equal toVK_NULL_HANDLE
- If the number of currently acquired images is greater than the
difference between the number of images in
swapchain
and the value ofVkSurfaceCapabilitiesKHR
::minImageCount
as returned by a call tovkGetPhysicalDeviceSurfaceCapabilities2KHR
with thesurface
used to createswapchain
,timeout
must not beUINT64_MAX
Valid Usage (Implicit)
device
must be a validVkDevice
handle
swapchain
must be a validVkSwapchainKHR
handle- If
semaphore
is notVK_NULL_HANDLE
,semaphore
must be a validVkSemaphore
handle - If
fence
is notVK_NULL_HANDLE
,fence
must be a validVkFence
handle pImageIndex
must be a valid pointer to auint32_t
value- If
semaphore
is a valid handle, it must have been created, allocated, or retrieved fromdevice
- If
fence
is a valid handle, it must have been created, allocated, or retrieved fromdevice
- Both of
device
, andswapchain
that are valid handles must have been created, allocated, or retrieved from the sameVkInstance
Host Synchronization
- Host access to
swapchain
must be externally synchronized
- Host access to
semaphore
must be externally synchronized - Host access to
fence
must be externally synchronized
Return Codes
[Success]
- VK_SUCCESS
VK_TIMEOUT
VK_NOT_READY
VK_SUBOPTIMAL_KHR
[Failure]
- VK_ERROR_OUT_OF_HOST_MEMORY
VK_ERROR_OUT_OF_DEVICE_MEMORY
VK_ERROR_DEVICE_LOST
VK_ERROR_OUT_OF_DATE_KHR
VK_ERROR_SURFACE_LOST_KHR
See Also
vkQueuePresentKHR :: ("queue" ::: VkQueue) -> ("pPresentInfo" ::: Ptr VkPresentInfoKHR) -> IO VkResult Source #
vkQueuePresentKHR - Queue an image for presentation
Parameters
queue
is a queue that is capable of presentation to the target surface’s platform on the same device as the image’s swapchain.
pPresentInfo
is a pointer to an instance of theVkPresentInfoKHR
structure specifying the parameters of the presentation.
Description
Note
There is no requirement for an application to present images in the same order that they were acquired - applications can arbitrarily present any image that is currently acquired.
Valid Usage
- Each element of
pSwapchains
member ofpPresentInfo
must be a swapchain that is created for a surface for which presentation is supported fromqueue
as determined using a call tovkGetPhysicalDeviceSurfaceSupportKHR
- If more than one member of
pSwapchains
was created from a display surface, all display surfaces referenced that refer to the same display must use the same display mode - When a semaphore unsignal operation defined by the elements of the
pWaitSemaphores
member ofpPresentInfo
executes onqueue
, no other queue must be waiting on the same semaphore. - All elements of the
pWaitSemaphores
member ofpPresentInfo
must be semaphores that are signaled, or have semaphore signal operations previously submitted for execution.
Any writes to memory backing the images referenced by the
pImageIndices
and pSwapchains
members of pPresentInfo
, that are
available before vkQueuePresentKHR
is executed, are automatically made
visible to the read access performed by the presentation engine. This
automatic visibility operation for an image happens-after the semaphore
signal operation, and happens-before the presentation engine accesses
the image.
Queueing an image for presentation defines a set of queue operations, including waiting on the semaphores and submitting a presentation request to the presentation engine. However, the scope of this set of queue operations does not include the actual processing of the image by the presentation engine.
If vkQueuePresentKHR
fails to enqueue the corresponding set of queue
operations, it may return VK_ERROR_OUT_OF_HOST_MEMORY
or
VK_ERROR_OUT_OF_DEVICE_MEMORY
. If it does, the implementation must
ensure that the state and contents of any resources or synchronization
primitives referenced is unaffected by the call or its failure.
If vkQueuePresentKHR
fails in such a way that the implementation is
unable to make that guarantee, the implementation must return
VK_ERROR_DEVICE_LOST
.
However, if the presentation request is rejected by the presentation
engine with an error VK_ERROR_OUT_OF_DATE_KHR
or
VK_ERROR_SURFACE_LOST_KHR
, the set of queue operations are still
considered to be enqueued and thus any semaphore to be waited on gets
unsignaled when the corresponding queue operation is complete.
Valid Usage (Implicit)
queue
must be a validVkQueue
handle
pPresentInfo
must be a valid pointer to a validVkPresentInfoKHR
structure
Host Synchronization
- Host access to
queue
must be externally synchronized
- Host access to
pPresentInfo.pWaitSemaphores
[] must be externally synchronized - Host access to
pPresentInfo.pSwapchains
[] must be externally synchronized
Command Properties
'
Command Buffer Levels | Render Pass Scope | Supported Queue Types | Pipeline Type |
---|---|---|---|
- | - | Any | - |
Return Codes
[Success]
- VK_SUCCESS
VK_SUBOPTIMAL_KHR
[Failure]
- VK_ERROR_OUT_OF_HOST_MEMORY
VK_ERROR_OUT_OF_DEVICE_MEMORY
VK_ERROR_DEVICE_LOST
VK_ERROR_OUT_OF_DATE_KHR
VK_ERROR_SURFACE_LOST_KHR
See Also
vkGetDeviceGroupPresentCapabilitiesKHR :: ("device" ::: VkDevice) -> ("pDeviceGroupPresentCapabilities" ::: Ptr VkDeviceGroupPresentCapabilitiesKHR) -> IO VkResult Source #
vkGetDeviceGroupPresentCapabilitiesKHR - Query present capabilities from other physical devices
Parameters
device
is the logical device.
pDeviceGroupPresentCapabilities
is a pointer to a structure of typeVkDeviceGroupPresentCapabilitiesKHR
that is filled with the logical device’s capabilities.
Valid Usage (Implicit)
device
must be a validVkDevice
handle
pDeviceGroupPresentCapabilities
must be a valid pointer to aVkDeviceGroupPresentCapabilitiesKHR
structure
Return Codes
[Success]
- VK_SUCCESS
[Failure]
- VK_ERROR_OUT_OF_HOST_MEMORY
VK_ERROR_OUT_OF_DEVICE_MEMORY
See Also
vkGetDeviceGroupSurfacePresentModesKHR :: ("device" ::: VkDevice) -> ("surface" ::: VkSurfaceKHR) -> ("pModes" ::: Ptr VkDeviceGroupPresentModeFlagsKHR) -> IO VkResult Source #
vkGetDeviceGroupSurfacePresentModesKHR - Query present capabilities for a surface
Parameters
device
is the logical device.
surface
is the surface.pModes
is a pointer to a value of typeVkDeviceGroupPresentModeFlagsKHR
that is filled with the supported device group present modes for the surface.
Description
The modes returned by this command are not invariant, and may change
in response to the surface being moved, resized, or occluded. These
modes must be a subset of the modes returned by
vkGetDeviceGroupPresentCapabilitiesKHR
.
Valid Usage (Implicit)
device
must be a validVkDevice
handle
surface
must be a validVkSurfaceKHR
handlepModes
must be a valid pointer to aVkDeviceGroupPresentModeFlagsKHR
value- Both of
device
, andsurface
must have been created, allocated, or retrieved from the sameVkInstance
Host Synchronization
- Host access to
surface
must be externally synchronized
Return Codes
[Success]
- VK_SUCCESS
[Failure]
- VK_ERROR_OUT_OF_HOST_MEMORY
VK_ERROR_OUT_OF_DEVICE_MEMORY
VK_ERROR_SURFACE_LOST_KHR
See Also
vkAcquireNextImage2KHR :: ("device" ::: VkDevice) -> ("pAcquireInfo" ::: Ptr VkAcquireNextImageInfoKHR) -> ("pImageIndex" ::: Ptr Word32) -> IO VkResult Source #
vkAcquireNextImage2KHR - Retrieve the index of the next available presentable image
Parameters
device
is the device associated withswapchain
.
pAcquireInfo
is a pointer to a structure of typeVkAcquireNextImageInfoKHR
containing parameters of the acquire.pImageIndex
is a pointer to auint32_t
that is set to the index of the next image to use.
Valid Usage
- If the number of currently acquired images is greater than the
difference between the number of images in the
swapchain
member ofpAcquireInfo
and the value ofVkSurfaceCapabilitiesKHR
::minImageCount
as returned by a call tovkGetPhysicalDeviceSurfaceCapabilities2KHR
with thesurface
used to createswapchain
, thetimeout
member ofpAcquireInfo
must not beUINT64_MAX
Valid Usage (Implicit)
device
must be a validVkDevice
handle
pAcquireInfo
must be a valid pointer to a validVkAcquireNextImageInfoKHR
structurepImageIndex
must be a valid pointer to auint32_t
value
Return Codes
[Success]
- VK_SUCCESS
VK_TIMEOUT
VK_NOT_READY
VK_SUBOPTIMAL_KHR
[Failure]
- VK_ERROR_OUT_OF_HOST_MEMORY
VK_ERROR_OUT_OF_DEVICE_MEMORY
VK_ERROR_DEVICE_LOST
VK_ERROR_OUT_OF_DATE_KHR
VK_ERROR_SURFACE_LOST_KHR
See Also
vkGetPhysicalDevicePresentRectanglesKHR :: ("physicalDevice" ::: VkPhysicalDevice) -> ("surface" ::: VkSurfaceKHR) -> ("pRectCount" ::: Ptr Word32) -> ("pRects" ::: Ptr VkRect2D) -> IO VkResult Source #
vkGetPhysicalDevicePresentRectanglesKHR - Query present rectangles for a surface on a physical device
Parameters
physicalDevice
is the physical device.
surface
is the surface.pRectCount
is a pointer to an integer related to the number of rectangles available or queried, as described below.pRects
is eitherNULL
or a pointer to an array ofVkRect2D
structures.
Description
If pRects
is NULL
, then the number of rectangles used when
presenting the given surface
is returned in pRectCount
. Otherwise,
pRectCount
must point to a variable set by the user to the number of
elements in the pRects
array, and on return the variable is
overwritten with the number of structures actually written to pRects
.
If the value of pRectCount
is less than the number of rectangles, at
most pRectCount
structures will be written. If pRectCount
is smaller
than the number of rectangles used for the given surface
,
VK_INCOMPLETE
will be returned instead of VK_SUCCESS
to indicate
that not all the available values were returned.
The values returned by this command are not invariant, and may change in response to the surface being moved, resized, or occluded.
The rectangles returned by this command must not overlap.
Valid Usage (Implicit)
physicalDevice
must be a validVkPhysicalDevice
handle
surface
must be a validVkSurfaceKHR
handlepRectCount
must be a valid pointer to auint32_t
value- If the value referenced by
pRectCount
is not0
, andpRects
is notNULL
,pRects
must be a valid pointer to an array ofpRectCount
VkRect2D
structures - Both of
physicalDevice
, andsurface
must have been created, allocated, or retrieved from the sameVkInstance
Host Synchronization
- Host access to
surface
must be externally synchronized
Return Codes
[Success]
- VK_SUCCESS
VK_INCOMPLETE
[Failure]
- VK_ERROR_OUT_OF_HOST_MEMORY
VK_ERROR_OUT_OF_DEVICE_MEMORY
See Also
data VkSwapchainCreateInfoKHR Source #
VkSwapchainCreateInfoKHR - Structure specifying parameters of a newly created swapchain object
Description
Note
On some platforms, it is normal that maxImageExtent
may become (0,
0)
, for example when the window is minimized. In such a case, it is not
possible to create a swapchain due to the Valid Usage requirements.
imageArrayLayers
is the number of views in a multiview/stereo surface. For non-stereoscopic-3D applications, this value is 1.imageUsage
is a bitmask ofVkImageUsageFlagBits
describing the intended usage of the (acquired) swapchain images.imageSharingMode
is the sharing mode used for the image(s) of the swapchain.queueFamilyIndexCount
is the number of queue families having access to the image(s) of the swapchain whenimageSharingMode
isVK_SHARING_MODE_CONCURRENT
.pQueueFamilyIndices
is an array of queue family indices having access to the images(s) of the swapchain whenimageSharingMode
isVK_SHARING_MODE_CONCURRENT
.preTransform
is aVkSurfaceTransformFlagBitsKHR
value describing the transform, relative to the presentation engine’s natural orientation, applied to the image content prior to presentation. If it does not match thecurrentTransform
value returned byvkGetPhysicalDeviceSurfaceCapabilitiesKHR
, the presentation engine will transform the image content as part of the presentation operation.compositeAlpha
is aVkCompositeAlphaFlagBitsKHR
value indicating the alpha compositing mode to use when this surface is composited together with other surfaces on certain window systems.presentMode
is the presentation mode the swapchain will use. A swapchain’s present mode determines how incoming present requests will be processed and queued internally.clipped
specifies whether the Vulkan implementation is allowed to discard rendering operations that affect regions of the surface that are not visible.- If set to
VK_TRUE
, the presentable images associated with the swapchain may not own all of their pixels. Pixels in the presentable images that correspond to regions of the target surface obscured by another window on the desktop, or subject to some other clipping mechanism will have undefined content when read back. Pixel shaders may not execute for these pixels, and thus any side effects they would have had will not occur.VK_TRUE
value does not guarantee any clipping will occur, but allows more optimal presentation methods to be used on some platforms. - If set to
VK_FALSE
, presentable images associated with the swapchain will own all of the pixels they contain.
- If set to
Note
Applications should set this value to VK_TRUE
if they do not expect
to read back the content of presentable images before presenting them or
after reacquiring them, and if their pixel shaders do not have any side
effects that require them to run for all pixels in the presentable
image.
oldSwapchain
isVK_NULL_HANDLE
, or the existing non-retired swapchain currently associated withsurface
. Providing a validoldSwapchain
may aid in the resource reuse, and also allows the application to still present any images that are already acquired from it.
Upon calling vkCreateSwapchainKHR
with an oldSwapchain
that is not
VK_NULL_HANDLE
, oldSwapchain
is
retired — even if creation of the new swapchain fails. The new swapchain
is created in the non-retired state whether or not oldSwapchain
is
VK_NULL_HANDLE
.
Upon calling vkCreateSwapchainKHR
with an oldSwapchain
that is not
VK_NULL_HANDLE
, any images from
oldSwapchain
that are not acquired by the application may be freed
by the implementation, which may occur even if creation of the new
swapchain fails. The application can destroy oldSwapchain
to free
all memory associated with oldSwapchain
.
Note
Multiple retired swapchains can be associated with the same
VkSurfaceKHR
through multiple uses of oldSwapchain
that outnumber
calls to vkDestroySwapchainKHR
.
After oldSwapchain
is retired, the application can pass to
vkQueuePresentKHR
any images it had already acquired from
oldSwapchain
. E.g., an application may present an image from the old
swapchain before an image from the new swapchain is ready to be
presented. As usual, vkQueuePresentKHR
may fail if oldSwapchain
has entered a state that causes VK_ERROR_OUT_OF_DATE_KHR
to be
returned.
The application can continue to use a shared presentable image
obtained from oldSwapchain
until a presentable image is acquired from
the new swapchain, as long as it has not entered a state that causes it
to return VK_ERROR_OUT_OF_DATE_KHR
.
Valid Usage
surface
must be a surface that is supported by the device as determined usingvkGetPhysicalDeviceSurfaceSupportKHR
minImageCount
must be greater than or equal to the value returned in theminImageCount
member of theVkSurfaceCapabilitiesKHR
structure returned byvkGetPhysicalDeviceSurfaceCapabilitiesKHR
for the surfaceminImageCount
must be less than or equal to the value returned in themaxImageCount
member of theVkSurfaceCapabilitiesKHR
structure returned byvkGetPhysicalDeviceSurfaceCapabilitiesKHR
for the surface if the returnedmaxImageCount
is not zerominImageCount
must be1
ifpresentMode
is eitherVK_PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR
orVK_PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR
imageFormat
andimageColorSpace
must match theformat
andcolorSpace
members, respectively, of one of theVkSurfaceFormatKHR
structures returned byvkGetPhysicalDeviceSurfaceFormatsKHR
for the surfaceimageExtent
must be betweenminImageExtent
andmaxImageExtent
, inclusive, whereminImageExtent
andmaxImageExtent
are members of theVkSurfaceCapabilitiesKHR
structure returned byvkGetPhysicalDeviceSurfaceCapabilitiesKHR
for the surfaceimageExtent
memberswidth
andheight
must both be non-zeroimageArrayLayers
must be greater than0
and less than or equal to themaxImageArrayLayers
member of theVkSurfaceCapabilitiesKHR
structure returned byvkGetPhysicalDeviceSurfaceCapabilitiesKHR
for the surface- If
presentMode
isVK_PRESENT_MODE_IMMEDIATE_KHR
,VK_PRESENT_MODE_MAILBOX_KHR
,VK_PRESENT_MODE_FIFO_KHR
orVK_PRESENT_MODE_FIFO_RELAXED_KHR
,imageUsage
must be a subset of the supported usage flags present in thesupportedUsageFlags
member of theVkSurfaceCapabilitiesKHR
structure returned byvkGetPhysicalDeviceSurfaceCapabilitiesKHR
forsurface
- If
presentMode
isVK_PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR
orVK_PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR
,imageUsage
must be a subset of the supported usage flags present in thesharedPresentSupportedUsageFlags
member of theVkSharedPresentSurfaceCapabilitiesKHR
structure returned byvkGetPhysicalDeviceSurfaceCapabilities2KHR
forsurface
- If
imageSharingMode
isVK_SHARING_MODE_CONCURRENT
,pQueueFamilyIndices
must be a valid pointer to an array ofqueueFamilyIndexCount
uint32_t
values - If
imageSharingMode
isVK_SHARING_MODE_CONCURRENT
,queueFamilyIndexCount
must be greater than1
- If
imageSharingMode
isVK_SHARING_MODE_CONCURRENT
, each element ofpQueueFamilyIndices
must be unique and must be less thanpQueueFamilyPropertyCount
returned by eithervkGetPhysicalDeviceQueueFamilyProperties
orvkGetPhysicalDeviceQueueFamilyProperties2
for thephysicalDevice
that was used to createdevice
preTransform
must be one of the bits present in thesupportedTransforms
member of theVkSurfaceCapabilitiesKHR
structure returned byvkGetPhysicalDeviceSurfaceCapabilitiesKHR
for the surfacecompositeAlpha
must be one of the bits present in thesupportedCompositeAlpha
member of theVkSurfaceCapabilitiesKHR
structure returned byvkGetPhysicalDeviceSurfaceCapabilitiesKHR
for the surfacepresentMode
must be one of theVkPresentModeKHR
values returned byvkGetPhysicalDeviceSurfacePresentModesKHR
for the surface- If the logical device was created with
VkDeviceGroupDeviceCreateInfo
::physicalDeviceCount
equal to 1,flags
must not containVK_SWAPCHAIN_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT_KHR
oldSwapchain
must not be in the retired stateimageFormat
,imageUsage
,imageExtent
, andimageArrayLayers
must be supported forVK_IMAGE_TYPE_2D
VK_IMAGE_TILING_OPTIMAL
images as reported byvkGetPhysicalDeviceImageFormatProperties
.
Valid Usage (Implicit)
sType
must beVK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR
- Each
pNext
member of any structure (including this one) in thepNext
chain must be eitherNULL
or a pointer to a valid instance ofVkDeviceGroupSwapchainCreateInfoKHR
orVkSwapchainCounterCreateInfoEXT
- Each
sType
member in thepNext
chain must be unique flags
must be a valid combination ofVkSwapchainCreateFlagBitsKHR
valuessurface
must be a validVkSurfaceKHR
handleimageFormat
must be a validVkFormat
valueimageColorSpace
must be a validVkColorSpaceKHR
valueimageUsage
must be a valid combination ofVkImageUsageFlagBits
valuesimageUsage
must not be0
imageSharingMode
must be a validVkSharingMode
valuepreTransform
must be a validVkSurfaceTransformFlagBitsKHR
valuecompositeAlpha
must be a validVkCompositeAlphaFlagBitsKHR
valuepresentMode
must be a validVkPresentModeKHR
value- If
oldSwapchain
is notVK_NULL_HANDLE
,oldSwapchain
must be a validVkSwapchainKHR
handle - If
oldSwapchain
is a valid handle, it must have been created, allocated, or retrieved fromsurface
- Both of
oldSwapchain
, andsurface
that are valid handles must have been created, allocated, or retrieved from the sameVkInstance
See Also
VkBool32
, VkColorSpaceKHR
,
VkCompositeAlphaFlagBitsKHR
,
VkExtent2D
,
VkFormat
,
VkImageUsageFlags
,
VkPresentModeKHR
,
VkSharingMode
,
VkStructureType
,
VkSurfaceKHR
,
VkSurfaceTransformFlagBitsKHR
,
VkSwapchainCreateFlagsKHR
, VkSwapchainKHR
,
vkCreateSharedSwapchainsKHR
,
vkCreateSwapchainKHR
VkSwapchainCreateInfoKHR | |
|
Instances
Eq VkSwapchainCreateInfoKHR Source # | |
Show VkSwapchainCreateInfoKHR Source # | |
showsPrec :: Int -> VkSwapchainCreateInfoKHR -> ShowS # show :: VkSwapchainCreateInfoKHR -> String # showList :: [VkSwapchainCreateInfoKHR] -> ShowS # | |
Storable VkSwapchainCreateInfoKHR Source # | |
sizeOf :: VkSwapchainCreateInfoKHR -> Int # alignment :: VkSwapchainCreateInfoKHR -> Int # peekElemOff :: Ptr VkSwapchainCreateInfoKHR -> Int -> IO VkSwapchainCreateInfoKHR # pokeElemOff :: Ptr VkSwapchainCreateInfoKHR -> Int -> VkSwapchainCreateInfoKHR -> IO () # peekByteOff :: Ptr b -> Int -> IO VkSwapchainCreateInfoKHR # pokeByteOff :: Ptr b -> Int -> VkSwapchainCreateInfoKHR -> IO () # peek :: Ptr VkSwapchainCreateInfoKHR -> IO VkSwapchainCreateInfoKHR # poke :: Ptr VkSwapchainCreateInfoKHR -> VkSwapchainCreateInfoKHR -> IO () # |
data VkPresentInfoKHR Source #
VkPresentInfoKHR - Structure describing parameters of a queue presentation
Description
Before an application can present an image, the image’s layout must
be transitioned to the VK_IMAGE_LAYOUT_PRESENT_SRC_KHR
layout, or for
a shared presentable image the VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR
layout.
Note
When transitioning the image to VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR
or
VK_IMAGE_LAYOUT_PRESENT_SRC_KHR
, there is no need to delay subsequent
processing, or perform any visibility operations (as vkQueuePresentKHR
performs automatic visibility operations). To achieve this, the
dstAccessMask
member of the
VkImageMemoryBarrier
should be set to 0
, and the dstStageMask
parameter should be set
to VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT
.
Valid Usage
- Each element of
pImageIndices
must be the index of a presentable image acquired from the swapchain specified by the corresponding element of thepSwapchains
array, and the presented image subresource must be in theVK_IMAGE_LAYOUT_PRESENT_SRC_KHR
orVK_IMAGE_LAYOUT_SHARED_PRESENT_KHR
layout at the time the operation is executed on aVkDevice
Valid Usage (Implicit)
sType
must beVK_STRUCTURE_TYPE_PRESENT_INFO_KHR
- Each
pNext
member of any structure (including this one) in thepNext
chain must be eitherNULL
or a pointer to a valid instance ofVkDeviceGroupPresentInfoKHR
,VkDisplayPresentInfoKHR
,VkPresentRegionsKHR
, orVkPresentTimesInfoGOOGLE
- Each
sType
member in thepNext
chain must be unique - If
waitSemaphoreCount
is not0
,pWaitSemaphores
must be a valid pointer to an array ofwaitSemaphoreCount
validVkSemaphore
handles pSwapchains
must be a valid pointer to an array ofswapchainCount
validVkSwapchainKHR
handlespImageIndices
must be a valid pointer to an array ofswapchainCount
uint32_t
values- If
pResults
is notNULL
,pResults
must be a valid pointer to an array ofswapchainCount
VkResult
values swapchainCount
must be greater than0
- Both of the elements of
pSwapchains
, and the elements ofpWaitSemaphores
that are valid handles must have been created, allocated, or retrieved from the sameVkInstance
See Also
VkResult
,
VkSemaphore
,
VkStructureType
, VkSwapchainKHR
,
vkQueuePresentKHR
VkPresentInfoKHR | |
|
Instances
Eq VkPresentInfoKHR Source # | |
(==) :: VkPresentInfoKHR -> VkPresentInfoKHR -> Bool # (/=) :: VkPresentInfoKHR -> VkPresentInfoKHR -> Bool # | |
Show VkPresentInfoKHR Source # | |
showsPrec :: Int -> VkPresentInfoKHR -> ShowS # show :: VkPresentInfoKHR -> String # showList :: [VkPresentInfoKHR] -> ShowS # | |
Storable VkPresentInfoKHR Source # | |
sizeOf :: VkPresentInfoKHR -> Int # alignment :: VkPresentInfoKHR -> Int # peekElemOff :: Ptr VkPresentInfoKHR -> Int -> IO VkPresentInfoKHR # pokeElemOff :: Ptr VkPresentInfoKHR -> Int -> VkPresentInfoKHR -> IO () # peekByteOff :: Ptr b -> Int -> IO VkPresentInfoKHR # pokeByteOff :: Ptr b -> Int -> VkPresentInfoKHR -> IO () # peek :: Ptr VkPresentInfoKHR -> IO VkPresentInfoKHR # poke :: Ptr VkPresentInfoKHR -> VkPresentInfoKHR -> IO () # |
data VkDeviceGroupPresentCapabilitiesKHR Source #
VkDeviceGroupPresentCapabilitiesKHR - Present capabilities from other physical devices
Description
modes
always has VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_BIT_KHR
set.
The present mode flags are also used when presenting an image, in
VkDeviceGroupPresentInfoKHR
::mode
.
If a device group only includes a single physical device, then modes
must equal VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_BIT_KHR
.
Valid Usage (Implicit)
sType
must beVK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_CAPABILITIES_KHR
pNext
must beNULL
See Also
VkDeviceGroupPresentModeFlagsKHR
,
VkStructureType
,
vkGetDeviceGroupPresentCapabilitiesKHR
VkDeviceGroupPresentCapabilitiesKHR | |
|
Instances
data VkImageSwapchainCreateInfoKHR Source #
VkImageSwapchainCreateInfoKHR - Specify that an image will be bound to swapchain memory
Valid Usage
- If
swapchain
is notVK_NULL_HANDLE
, the fields ofVkImageCreateInfo
must match the implied image creation parameters of the swapchain
Valid Usage (Implicit)
sType
must beVK_STRUCTURE_TYPE_IMAGE_SWAPCHAIN_CREATE_INFO_KHR
- If
swapchain
is notVK_NULL_HANDLE
,swapchain
must be a validVkSwapchainKHR
handle
See Also
VkImageSwapchainCreateInfoKHR | |
|
Instances
data VkBindImageMemorySwapchainInfoKHR Source #
VkBindImageMemorySwapchainInfoKHR - Structure specifying swapchain image memory to bind to
Description
If swapchain
is not NULL
, the swapchain
and imageIndex
are used
to determine the memory that the image is bound to, instead of memory
and memoryOffset
.
Memory can be bound to a swapchain and use the pDeviceIndices
or
pSplitInstanceBindRegions
members of
VkBindImageMemoryDeviceGroupInfo
.
Valid Usage
imageIndex
must be less than the number of images inswapchain
Valid Usage (Implicit)
sType
must beVK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHR
swapchain
must be a validVkSwapchainKHR
handle
Host Synchronization
- Host access to
swapchain
must be externally synchronized
See Also
VkBindImageMemorySwapchainInfoKHR | |
|
Instances
data VkAcquireNextImageInfoKHR Source #
VkAcquireNextImageInfoKHR - Structure specifying parameters of the acquire
Description
If vkAcquireNextImageKHR
is used, the device mask is considered to
include all physical devices in the logical device.
Note
vkAcquireNextImage2KHR
signals at most one semaphore, even if the
application requests waiting for multiple physical devices to be ready
via the deviceMask
. However, only a single physical device can wait
on that semaphore, since the semaphore becomes unsignaled when the wait
succeeds. For other physical devices to wait for the image to be ready,
it is necessary for the application to submit semaphore signal
operation(s) to that first physical device to signal additional
semaphore(s) after the wait succeeds, which the other physical device(s)
can wait upon.
Valid Usage
swapchain
must not be in the retired state
- If
semaphore
is notVK_NULL_HANDLE
it must be unsignaled - If
semaphore
is notVK_NULL_HANDLE
it must not have any uncompleted signal or wait operations pending - If
fence
is notVK_NULL_HANDLE
it must be unsignaled and must not be associated with any other queue command that has not yet completed execution on that queue semaphore
andfence
must not both be equal toVK_NULL_HANDLE
deviceMask
must be a valid device maskdeviceMask
must not be zerosemaphore
andfence
must not both be equal toVK_NULL_HANDLE
.
Valid Usage (Implicit)
sType
must beVK_STRUCTURE_TYPE_ACQUIRE_NEXT_IMAGE_INFO_KHR
pNext
must beNULL
swapchain
must be a validVkSwapchainKHR
handle- If
semaphore
is notVK_NULL_HANDLE
,semaphore
must be a validVkSemaphore
handle - If
fence
is notVK_NULL_HANDLE
,fence
must be a validVkFence
handle - Each of
fence
,semaphore
, andswapchain
that are valid handles must have been created, allocated, or retrieved from the sameVkInstance
Host Synchronization
- Host access to
swapchain
must be externally synchronized
- Host access to
semaphore
must be externally synchronized - Host access to
fence
must be externally synchronized
See Also
VkFence
,
VkSemaphore
,
VkStructureType
, VkSwapchainKHR
,
vkAcquireNextImage2KHR
VkAcquireNextImageInfoKHR | |
|
Instances
Eq VkAcquireNextImageInfoKHR Source # | |
Show VkAcquireNextImageInfoKHR Source # | |
showsPrec :: Int -> VkAcquireNextImageInfoKHR -> ShowS # show :: VkAcquireNextImageInfoKHR -> String # showList :: [VkAcquireNextImageInfoKHR] -> ShowS # | |
Storable VkAcquireNextImageInfoKHR Source # | |
sizeOf :: VkAcquireNextImageInfoKHR -> Int # alignment :: VkAcquireNextImageInfoKHR -> Int # peekElemOff :: Ptr VkAcquireNextImageInfoKHR -> Int -> IO VkAcquireNextImageInfoKHR # pokeElemOff :: Ptr VkAcquireNextImageInfoKHR -> Int -> VkAcquireNextImageInfoKHR -> IO () # peekByteOff :: Ptr b -> Int -> IO VkAcquireNextImageInfoKHR # pokeByteOff :: Ptr b -> Int -> VkAcquireNextImageInfoKHR -> IO () # peek :: Ptr VkAcquireNextImageInfoKHR -> IO VkAcquireNextImageInfoKHR # poke :: Ptr VkAcquireNextImageInfoKHR -> VkAcquireNextImageInfoKHR -> IO () # |
data VkDeviceGroupPresentInfoKHR Source #
VkDeviceGroupPresentInfoKHR - Mode and mask controlling which physical devices' images are presented
Description
If mode
is VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_BIT_KHR
, then each
element of pDeviceMasks
selects which instance of the swapchain image
is presented. Each element of pDeviceMasks
must have exactly one bit
set, and the corresponding physical device must have a presentation
engine as reported by VkDeviceGroupPresentCapabilitiesKHR
.
If mode
is VK_DEVICE_GROUP_PRESENT_MODE_REMOTE_BIT_KHR
, then each
element of pDeviceMasks
selects which instance of the swapchain image
is presented. Each element of pDeviceMasks
must have exactly one bit
set, and some physical device in the logical device must include that
bit in its VkDeviceGroupPresentCapabilitiesKHR
::presentMask
.
If mode
is VK_DEVICE_GROUP_PRESENT_MODE_SUM_BIT_KHR
, then each
element of pDeviceMasks
selects which instances of the swapchain image
are component-wise summed and the sum of those images is presented. If
the sum in any component is outside the representable range, the value
of that component is undefined. Each element of pDeviceMasks
must
have a value for which all set bits are set in one of the elements of
VkDeviceGroupPresentCapabilitiesKHR
::presentMask
.
If mode
is VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_MULTI_DEVICE_BIT_KHR
,
then each element of pDeviceMasks
selects which instance(s) of the
swapchain images are presented. For each bit set in each element of
pDeviceMasks
, the corresponding physical device must have a
presentation engine as reported by
VkDeviceGroupPresentCapabilitiesKHR
.
If VkDeviceGroupPresentInfoKHR
is not provided or swapchainCount
is
zero then the masks are considered to be 1
. If
VkDeviceGroupPresentInfoKHR
is not provided, mode
is considered to
be VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_BIT_KHR
.
Valid Usage
swapchainCount
must equal0
orVkPresentInfoKHR
::swapchainCount
- If
mode
isVK_DEVICE_GROUP_PRESENT_MODE_LOCAL_BIT_KHR
, then each element ofpDeviceMasks
must have exactly one bit set, and the corresponding element ofVkDeviceGroupPresentCapabilitiesKHR
::presentMask
must be non-zero - If
mode
isVK_DEVICE_GROUP_PRESENT_MODE_REMOTE_BIT_KHR
, then each element ofpDeviceMasks
must have exactly one bit set, and some physical device in the logical device must include that bit in itsVkDeviceGroupPresentCapabilitiesKHR
::presentMask
. - If
mode
isVK_DEVICE_GROUP_PRESENT_MODE_SUM_BIT_KHR
, then each element ofpDeviceMasks
must have a value for which all set bits are set in one of the elements ofVkDeviceGroupPresentCapabilitiesKHR
::presentMask
- If
mode
isVK_DEVICE_GROUP_PRESENT_MODE_LOCAL_MULTI_DEVICE_BIT_KHR
, then for each bit set in each element ofpDeviceMasks
, the corresponding element ofVkDeviceGroupPresentCapabilitiesKHR
::presentMask
must be non-zero - The value of each element of
pDeviceMasks
must be equal to the device mask passed inVkAcquireNextImageInfoKHR
::deviceMask
when the image index was last acquired mode
must have exactly one bit set, and that bit must have been included inVkDeviceGroupSwapchainCreateInfoKHR
::modes
Valid Usage (Implicit)
sType
must beVK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_INFO_KHR
- If
swapchainCount
is not0
,pDeviceMasks
must be a valid pointer to an array ofswapchainCount
uint32_t
values mode
must be a validVkDeviceGroupPresentModeFlagBitsKHR
value
See Also
VkDeviceGroupPresentInfoKHR | |
|
Instances
data VkDeviceGroupSwapchainCreateInfoKHR Source #
VkDeviceGroupSwapchainCreateInfoKHR - Structure specifying parameters of a newly created swapchain object
Description
If this structure is not present, modes
is considered to be
VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_BIT_KHR
.
Valid Usage (Implicit)
sType
must beVK_STRUCTURE_TYPE_DEVICE_GROUP_SWAPCHAIN_CREATE_INFO_KHR
modes
must be a valid combination ofVkDeviceGroupPresentModeFlagBitsKHR
valuesmodes
must not be0
See Also
VkDeviceGroupSwapchainCreateInfoKHR | |
|
Instances
type VkSwapchainCreateFlagsKHR = VkSwapchainCreateFlagBitsKHR Source #
VkSwapchainCreateFlagsKHR - Bitmask of VkSwapchainCreateFlagBitsKHR
Description
VkSwapchainCreateFlagsKHR
is a bitmask type for setting a mask of zero
or more VkSwapchainCreateFlagBitsKHR
.
See Also
type VkDeviceGroupPresentModeFlagsKHR = VkDeviceGroupPresentModeFlagBitsKHR Source #
VkDeviceGroupPresentModeFlagsKHR - Bitmask of VkDeviceGroupPresentModeFlagBitsKHR
Description
VkDeviceGroupPresentModeFlagsKHR
is a bitmask type for setting a mask
of zero or more VkDeviceGroupPresentModeFlagBitsKHR
.
See Also
VkDeviceGroupPresentCapabilitiesKHR
,
VkDeviceGroupPresentModeFlagBitsKHR
,
VkDeviceGroupSwapchainCreateInfoKHR
,
vkGetDeviceGroupSurfacePresentModesKHR