Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- getRefreshCycleDurationGOOGLE :: Device -> SwapchainKHR -> IO ("displayTimingProperties" ::: RefreshCycleDurationGOOGLE)
- getPastPresentationTimingGOOGLE :: Device -> SwapchainKHR -> IO (Result, "presentationTimings" ::: Vector PastPresentationTimingGOOGLE)
- data RefreshCycleDurationGOOGLE = RefreshCycleDurationGOOGLE {}
- data PastPresentationTimingGOOGLE = PastPresentationTimingGOOGLE {}
- data PresentTimesInfoGOOGLE = PresentTimesInfoGOOGLE {}
- data PresentTimeGOOGLE = PresentTimeGOOGLE {}
- type GOOGLE_DISPLAY_TIMING_SPEC_VERSION = 1
- pattern GOOGLE_DISPLAY_TIMING_SPEC_VERSION :: forall a. Integral a => a
- type GOOGLE_DISPLAY_TIMING_EXTENSION_NAME = "VK_GOOGLE_display_timing"
- pattern GOOGLE_DISPLAY_TIMING_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
- newtype SwapchainKHR = SwapchainKHR Word64
Documentation
getRefreshCycleDurationGOOGLE :: Device -> SwapchainKHR -> IO ("displayTimingProperties" ::: RefreshCycleDurationGOOGLE) Source #
vkGetRefreshCycleDurationGOOGLE - Obtain the RC duration of the PE’s display
Parameters
Device
is the device associated withswapchain
.
swapchain
is the swapchain to obtain the refresh duration for.pDisplayTimingProperties
is a pointer to aRefreshCycleDurationGOOGLE
structure.
Valid Usage (Implicit)
swapchain
must be a validSwapchainKHR
handlepDisplayTimingProperties
must be a valid pointer to aRefreshCycleDurationGOOGLE
structure- Both of
Device
, andswapchain
must have been created, allocated, or retrieved from the sameInstance
Host Synchronization
- Host access to
swapchain
must be externally synchronized
Return Codes
See Also
getPastPresentationTimingGOOGLE :: Device -> SwapchainKHR -> IO (Result, "presentationTimings" ::: Vector PastPresentationTimingGOOGLE) Source #
vkGetPastPresentationTimingGOOGLE - Obtain timing of a previously-presented image
Parameters
Device
is the device associated withswapchain
.
swapchain
is the swapchain to obtain presentation timing information duration for.pPresentationTimingCount
is a pointer to an integer related to the number ofPastPresentationTimingGOOGLE
structures to query, as described below.pPresentationTimings
is eitherNULL
or a pointer to an array ofPastPresentationTimingGOOGLE
structures.
Description
If pPresentationTimings
is NULL
, then the number of newly-available
timing records for the given swapchain
is returned in
pPresentationTimingCount
. Otherwise, pPresentationTimingCount
must
point to a variable set by the user to the number of elements in the
pPresentationTimings
array, and on return the variable is overwritten
with the number of structures actually written to
pPresentationTimings
. If the value of pPresentationTimingCount
is
less than the number of newly-available timing records, at most
pPresentationTimingCount
structures will be written. If
pPresentationTimingCount
is smaller than the number of newly-available
timing records for the given swapchain
,
INCOMPLETE
will be returned
instead of SUCCESS
to indicate
that not all the available values were returned.
Valid Usage (Implicit)
swapchain
must be a validSwapchainKHR
handlepPresentationTimingCount
must be a valid pointer to auint32_t
value- If the value referenced by
pPresentationTimingCount
is not0
, andpPresentationTimings
is notNULL
,pPresentationTimings
must be a valid pointer to an array ofpPresentationTimingCount
PastPresentationTimingGOOGLE
structures - Both of
Device
, andswapchain
must have been created, allocated, or retrieved from the sameInstance
Host Synchronization
- Host access to
swapchain
must be externally synchronized
Return Codes
See Also
data RefreshCycleDurationGOOGLE Source #
VkRefreshCycleDurationGOOGLE - Structure containing the RC duration of a display
See Also
RefreshCycleDurationGOOGLE | |
|
Instances
data PastPresentationTimingGOOGLE Source #
VkPastPresentationTimingGOOGLE - Structure containing timing information about a previously-presented image
Description
The results for a given swapchain
and presentID
are only returned
once from getPastPresentationTimingGOOGLE
.
The application can use the PastPresentationTimingGOOGLE
values to
occasionally adjust its timing. For example, if actualPresentTime
is
later than expected (e.g. one refreshDuration
late), the application
may increase its target IPD to a higher multiple of refreshDuration
(e.g. decrease its frame rate from 60Hz to 30Hz). If actualPresentTime
and earliestPresentTime
are consistently different, and if
presentMargin
is consistently large enough, the application may
decrease its target IPD to a smaller multiple of refreshDuration
(e.g.
increase its frame rate from 30Hz to 60Hz). If actualPresentTime
and
earliestPresentTime
are same, and if presentMargin
is consistently
high, the application may delay the start of its input-render-present
loop in order to decrease the latency between user input and the
corresponding present (always leaving some margin in case a new image
takes longer to render than the previous image). An application that
desires its target IPD to always be the same as refreshDuration
, can
also adjust features until actualPresentTime
is never late and
presentMargin
is satisfactory.
See Also
PastPresentationTimingGOOGLE | |
|
Instances
data PresentTimesInfoGOOGLE Source #
VkPresentTimesInfoGOOGLE - The earliest time each image should be presented
Valid Usage
swapchainCount
must be the same value asPresentInfoKHR
::swapchainCount
, wherePresentInfoKHR
is included in thepNext
chain of thisPresentTimesInfoGOOGLE
structure.
Valid Usage (Implicit)
sType
must beSTRUCTURE_TYPE_PRESENT_TIMES_INFO_GOOGLE
- If
pTimes
is notNULL
,pTimes
must be a valid pointer to an array ofswapchainCount
PresentTimeGOOGLE
structures swapchainCount
must be greater than0
See Also
PresentTimesInfoGOOGLE | |
|
Instances
Show PresentTimesInfoGOOGLE Source # | |
Defined in Graphics.Vulkan.Extensions.VK_GOOGLE_display_timing showsPrec :: Int -> PresentTimesInfoGOOGLE -> ShowS # show :: PresentTimesInfoGOOGLE -> String # showList :: [PresentTimesInfoGOOGLE] -> ShowS # | |
FromCStruct PresentTimesInfoGOOGLE Source # | |
ToCStruct PresentTimesInfoGOOGLE Source # | |
Defined in Graphics.Vulkan.Extensions.VK_GOOGLE_display_timing withCStruct :: PresentTimesInfoGOOGLE -> (Ptr PresentTimesInfoGOOGLE -> IO b) -> IO b Source # pokeCStruct :: Ptr PresentTimesInfoGOOGLE -> PresentTimesInfoGOOGLE -> IO b -> IO b Source # withZeroCStruct :: (Ptr PresentTimesInfoGOOGLE -> IO b) -> IO b Source # pokeZeroCStruct :: Ptr PresentTimesInfoGOOGLE -> IO b -> IO b Source # cStructSize :: Int Source # | |
Zero PresentTimesInfoGOOGLE Source # | |
data PresentTimeGOOGLE Source #
PresentTimeGOOGLE | |
|
Instances
type GOOGLE_DISPLAY_TIMING_SPEC_VERSION = 1 Source #
pattern GOOGLE_DISPLAY_TIMING_SPEC_VERSION :: forall a. Integral a => a Source #
type GOOGLE_DISPLAY_TIMING_EXTENSION_NAME = "VK_GOOGLE_display_timing" Source #
pattern GOOGLE_DISPLAY_TIMING_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a Source #
newtype SwapchainKHR 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
Image
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 non-retired 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
acquireNextImageKHR
, and
before it is presented by
queuePresentKHR
. This
includes transitioning the image layout and rendering commands.
An application can acquire use of a presentable image with
acquireNextImageKHR
. 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
queuePresentKHR
, 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
AcquireNextImageInfoKHR
,
BindImageMemorySwapchainInfoKHR
,
ImageSwapchainCreateInfoKHR
,
PresentInfoKHR
,
SwapchainCreateInfoKHR
,
acquireFullScreenExclusiveModeEXT
,
acquireNextImageKHR
,
createSharedSwapchainsKHR
,
createSwapchainKHR
,
destroySwapchainKHR
,
getPastPresentationTimingGOOGLE
,
getRefreshCycleDurationGOOGLE
,
getSwapchainCounterEXT
,
getSwapchainImagesKHR
,
getSwapchainStatusKHR
,
releaseFullScreenExclusiveModeEXT
,
setHdrMetadataEXT
,
setLocalDimmingAMD