public class VkPastPresentationTimingGOOGLE
extends org.lwjgl.system.Struct
implements org.lwjgl.system.NativeResource
The results for a given swapchain and presentID are only returned once from vkGetPastPresentationTimingGOOGLE.
The application can use the VkPastPresentationTimingGOOGLE 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.
GetPastPresentationTimingGOOGLE
presentID – an application-provided value that was given to a previous vkQueuePresentKHR command via VkPresentTimeGOOGLE::presentID (see below). It can be used to uniquely identify a previous present with the QueuePresentKHR command.desiredPresentTime – an application-provided value that was given to a previous QueuePresentKHR command via VkPresentTimeGOOGLE::desiredPresentTime. If non-zero, it was used by the application to indicate that an image not be presented any sooner than desiredPresentTime.actualPresentTime – the time when the image of the swapchain was actually displayed.earliestPresentTime – the time when the image of the swapchain could have been displayed. This may differ from actualPresentTime if the application requested that the image be presented no sooner than VkPresentTimeGOOGLE::desiredPresentTime.presentMargin – an indication of how early the vkQueuePresentKHR command was processed compared to how soon it needed to be processed, and still be presented at earliestPresentTime.
struct VkPastPresentationTimingGOOGLE {
uint32_t presentID;
uint64_t desiredPresentTime;
uint64_t actualPresentTime;
uint64_t earliestPresentTime;
uint64_t presentMargin;
}| Modifier and Type | Class and Description |
|---|---|
static class |
VkPastPresentationTimingGOOGLE.Buffer
An array of
VkPastPresentationTimingGOOGLE structs. |
| Modifier and Type | Field and Description |
|---|---|
static int |
ACTUALPRESENTTIME
The struct member offsets.
|
static int |
ALIGNOF
The struct alignment in bytes.
|
static int |
DESIREDPRESENTTIME
The struct member offsets.
|
static int |
EARLIESTPRESENTTIME
The struct member offsets.
|
static int |
PRESENTID
The struct member offsets.
|
static int |
PRESENTMARGIN
The struct member offsets.
|
static int |
SIZEOF
The struct size in bytes.
|
| Constructor and Description |
|---|
VkPastPresentationTimingGOOGLE(java.nio.ByteBuffer container)
Creates a
VkPastPresentationTimingGOOGLE instance at the current position of the specified ByteBuffer container. |
| Modifier and Type | Method and Description |
|---|---|
long |
actualPresentTime()
Returns the value of the
actualPresentTime field. |
static VkPastPresentationTimingGOOGLE |
calloc()
Returns a new
VkPastPresentationTimingGOOGLE instance allocated with memCalloc. |
static VkPastPresentationTimingGOOGLE.Buffer |
calloc(int capacity)
Returns a new
VkPastPresentationTimingGOOGLE.Buffer instance allocated with memCalloc. |
static VkPastPresentationTimingGOOGLE |
callocStack()
Returns a new
VkPastPresentationTimingGOOGLE instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static VkPastPresentationTimingGOOGLE.Buffer |
callocStack(int capacity)
Returns a new
VkPastPresentationTimingGOOGLE.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static VkPastPresentationTimingGOOGLE.Buffer |
callocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
VkPastPresentationTimingGOOGLE.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static VkPastPresentationTimingGOOGLE |
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
VkPastPresentationTimingGOOGLE instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static VkPastPresentationTimingGOOGLE |
create()
Returns a new
VkPastPresentationTimingGOOGLE instance allocated with BufferUtils. |
static VkPastPresentationTimingGOOGLE.Buffer |
create(int capacity)
Returns a new
VkPastPresentationTimingGOOGLE.Buffer instance allocated with BufferUtils. |
static VkPastPresentationTimingGOOGLE |
create(long address)
Returns a new
VkPastPresentationTimingGOOGLE instance for the specified memory address. |
static VkPastPresentationTimingGOOGLE.Buffer |
create(long address,
int capacity)
Create a
VkPastPresentationTimingGOOGLE.Buffer instance at the specified memory. |
static VkPastPresentationTimingGOOGLE |
createSafe(long address)
|
static VkPastPresentationTimingGOOGLE.Buffer |
createSafe(long address,
int capacity)
|
long |
desiredPresentTime()
Returns the value of the
desiredPresentTime field. |
long |
earliestPresentTime()
Returns the value of the
earliestPresentTime field. |
static VkPastPresentationTimingGOOGLE |
malloc()
Returns a new
VkPastPresentationTimingGOOGLE instance allocated with memAlloc. |
static VkPastPresentationTimingGOOGLE.Buffer |
malloc(int capacity)
Returns a new
VkPastPresentationTimingGOOGLE.Buffer instance allocated with memAlloc. |
static VkPastPresentationTimingGOOGLE |
mallocStack()
Returns a new
VkPastPresentationTimingGOOGLE instance allocated on the thread-local MemoryStack. |
static VkPastPresentationTimingGOOGLE.Buffer |
mallocStack(int capacity)
Returns a new
VkPastPresentationTimingGOOGLE.Buffer instance allocated on the thread-local MemoryStack. |
static VkPastPresentationTimingGOOGLE.Buffer |
mallocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
VkPastPresentationTimingGOOGLE.Buffer instance allocated on the specified MemoryStack. |
static VkPastPresentationTimingGOOGLE |
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
VkPastPresentationTimingGOOGLE instance allocated on the specified MemoryStack. |
static long |
nactualPresentTime(long struct)
Unsafe version of
actualPresentTime(). |
static long |
ndesiredPresentTime(long struct)
Unsafe version of
desiredPresentTime(). |
static long |
nearliestPresentTime(long struct)
Unsafe version of
earliestPresentTime(). |
static int |
npresentID(long struct)
Unsafe version of
presentID(). |
static long |
npresentMargin(long struct)
Unsafe version of
presentMargin(). |
int |
presentID()
Returns the value of the
presentID field. |
long |
presentMargin()
Returns the value of the
presentMargin field. |
int |
sizeof() |
public static final int SIZEOF
public static final int ALIGNOF
public static final int PRESENTID
public static final int DESIREDPRESENTTIME
public static final int ACTUALPRESENTTIME
public static final int EARLIESTPRESENTTIME
public static final int PRESENTMARGIN
public VkPastPresentationTimingGOOGLE(java.nio.ByteBuffer container)
VkPastPresentationTimingGOOGLE instance at the current position of the specified ByteBuffer container. Changes to the buffer's content will be
visible to the struct instance and vice versa.
The created instance holds a strong reference to the container object.
public int sizeof()
sizeof in class org.lwjgl.system.Structpublic int presentID()
presentID field.public long desiredPresentTime()
desiredPresentTime field.public long actualPresentTime()
actualPresentTime field.public long earliestPresentTime()
earliestPresentTime field.public long presentMargin()
presentMargin field.public static VkPastPresentationTimingGOOGLE malloc()
VkPastPresentationTimingGOOGLE instance allocated with memAlloc. The instance must be explicitly freed.public static VkPastPresentationTimingGOOGLE calloc()
VkPastPresentationTimingGOOGLE instance allocated with memCalloc. The instance must be explicitly freed.public static VkPastPresentationTimingGOOGLE create()
VkPastPresentationTimingGOOGLE instance allocated with BufferUtils.public static VkPastPresentationTimingGOOGLE create(long address)
VkPastPresentationTimingGOOGLE instance for the specified memory address.@Nullable public static VkPastPresentationTimingGOOGLE createSafe(long address)
public static VkPastPresentationTimingGOOGLE.Buffer malloc(int capacity)
VkPastPresentationTimingGOOGLE.Buffer instance allocated with memAlloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static VkPastPresentationTimingGOOGLE.Buffer calloc(int capacity)
VkPastPresentationTimingGOOGLE.Buffer instance allocated with memCalloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static VkPastPresentationTimingGOOGLE.Buffer create(int capacity)
VkPastPresentationTimingGOOGLE.Buffer instance allocated with BufferUtils.capacity - the buffer capacitypublic static VkPastPresentationTimingGOOGLE.Buffer create(long address, int capacity)
VkPastPresentationTimingGOOGLE.Buffer instance at the specified memory.address - the memory addresscapacity - the buffer capacity@Nullable public static VkPastPresentationTimingGOOGLE.Buffer createSafe(long address, int capacity)
public static VkPastPresentationTimingGOOGLE mallocStack()
VkPastPresentationTimingGOOGLE instance allocated on the thread-local MemoryStack.public static VkPastPresentationTimingGOOGLE callocStack()
VkPastPresentationTimingGOOGLE instance allocated on the thread-local MemoryStack and initializes all its bits to zero.public static VkPastPresentationTimingGOOGLE mallocStack(org.lwjgl.system.MemoryStack stack)
VkPastPresentationTimingGOOGLE instance allocated on the specified MemoryStack.stack - the stack from which to allocatepublic static VkPastPresentationTimingGOOGLE callocStack(org.lwjgl.system.MemoryStack stack)
VkPastPresentationTimingGOOGLE instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatepublic static VkPastPresentationTimingGOOGLE.Buffer mallocStack(int capacity)
VkPastPresentationTimingGOOGLE.Buffer instance allocated on the thread-local MemoryStack.capacity - the buffer capacitypublic static VkPastPresentationTimingGOOGLE.Buffer callocStack(int capacity)
VkPastPresentationTimingGOOGLE.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.capacity - the buffer capacitypublic static VkPastPresentationTimingGOOGLE.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
VkPastPresentationTimingGOOGLE.Buffer instance allocated on the specified MemoryStack.stack - the stack from which to allocatecapacity - the buffer capacitypublic static VkPastPresentationTimingGOOGLE.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
VkPastPresentationTimingGOOGLE.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatecapacity - the buffer capacitypublic static int npresentID(long struct)
presentID().public static long ndesiredPresentTime(long struct)
desiredPresentTime().public static long nactualPresentTime(long struct)
actualPresentTime().public static long nearliestPresentTime(long struct)
earliestPresentTime().public static long npresentMargin(long struct)
presentMargin().Copyright LWJGL. All Rights Reserved. License terms.