org.lwjgl.vulkan.EXTDisplayControl Maven / Gradle / Ivy
Show all versions of lwjgl-vulkan Show documentation
/*
* Copyright LWJGL. All rights reserved.
* License terms: https://www.lwjgl.org/license
* MACHINE GENERATED FILE, DO NOT EDIT
*/
package org.lwjgl.vulkan;
import javax.annotation.*;
import java.nio.*;
import org.lwjgl.system.*;
import static org.lwjgl.system.Checks.*;
import static org.lwjgl.system.JNI.*;
import static org.lwjgl.system.MemoryUtil.*;
/**
* This extension defines a set of utility functions for use with the {@link KHRDisplay VK_KHR_display} and {@link KHRDisplaySwapchain VK_KHR_display_swapchain} extensions.
*
* VK_EXT_display_control
*
*
* - Name String
* - {@code VK_EXT_display_control}
* - Extension Type
* - Device extension
* - Registered Extension Number
* - 92
* - Revision
* - 1
* - Extension and Version Dependencies
*
* - Requires Vulkan 1.0
* - Requires {@link EXTDisplaySurfaceCounter VK_EXT_display_surface_counter}
* - Requires {@link KHRSwapchain VK_KHR_swapchain}
*
* - Contact
*
* - James Jones cubanismo
*
*
*
* Other Extension Metadata
*
*
* - Last Modified Date
* - 2016-12-13
* - IP Status
* - No known IP claims.
* - Contributors
*
* - Pierre Boudier, NVIDIA
* - James Jones, NVIDIA
* - Damien Leone, NVIDIA
* - Pierre-Loup Griffais, Valve
* - Daniel Vetter, Intel
*
*
*/
public class EXTDisplayControl {
/** The extension specification version. */
public static final int VK_EXT_DISPLAY_CONTROL_SPEC_VERSION = 1;
/** The extension name. */
public static final String VK_EXT_DISPLAY_CONTROL_EXTENSION_NAME = "VK_EXT_display_control";
/**
* Extends {@code VkStructureType}.
*
* Enum values:
*
*
* - {@link #VK_STRUCTURE_TYPE_DISPLAY_POWER_INFO_EXT STRUCTURE_TYPE_DISPLAY_POWER_INFO_EXT}
* - {@link #VK_STRUCTURE_TYPE_DEVICE_EVENT_INFO_EXT STRUCTURE_TYPE_DEVICE_EVENT_INFO_EXT}
* - {@link #VK_STRUCTURE_TYPE_DISPLAY_EVENT_INFO_EXT STRUCTURE_TYPE_DISPLAY_EVENT_INFO_EXT}
* - {@link #VK_STRUCTURE_TYPE_SWAPCHAIN_COUNTER_CREATE_INFO_EXT STRUCTURE_TYPE_SWAPCHAIN_COUNTER_CREATE_INFO_EXT}
*
*/
public static final int
VK_STRUCTURE_TYPE_DISPLAY_POWER_INFO_EXT = 1000091000,
VK_STRUCTURE_TYPE_DEVICE_EVENT_INFO_EXT = 1000091001,
VK_STRUCTURE_TYPE_DISPLAY_EVENT_INFO_EXT = 1000091002,
VK_STRUCTURE_TYPE_SWAPCHAIN_COUNTER_CREATE_INFO_EXT = 1000091003;
/**
* VkDisplayPowerStateEXT - Possible power states for a display
*
* Description
*
*
* - {@link #VK_DISPLAY_POWER_STATE_OFF_EXT DISPLAY_POWER_STATE_OFF_EXT} specifies that the display is powered down.
* - {@link #VK_DISPLAY_POWER_STATE_SUSPEND_EXT DISPLAY_POWER_STATE_SUSPEND_EXT} specifies that the display is put into a low power mode, from which it may be able to transition back to {@link #VK_DISPLAY_POWER_STATE_ON_EXT DISPLAY_POWER_STATE_ON_EXT} more quickly than if it were in {@link #VK_DISPLAY_POWER_STATE_OFF_EXT DISPLAY_POWER_STATE_OFF_EXT}. This state may be the same as {@link #VK_DISPLAY_POWER_STATE_OFF_EXT DISPLAY_POWER_STATE_OFF_EXT}.
* - {@link #VK_DISPLAY_POWER_STATE_ON_EXT DISPLAY_POWER_STATE_ON_EXT} specifies that the display is powered on.
*
*
* See Also
*
* {@link VkDisplayPowerInfoEXT}
*/
public static final int
VK_DISPLAY_POWER_STATE_OFF_EXT = 0,
VK_DISPLAY_POWER_STATE_SUSPEND_EXT = 1,
VK_DISPLAY_POWER_STATE_ON_EXT = 2;
/**
* VkDeviceEventTypeEXT - Events that can occur on a device object
*
* Description
*
*
* - {@link #VK_DEVICE_EVENT_TYPE_DISPLAY_HOTPLUG_EXT DEVICE_EVENT_TYPE_DISPLAY_HOTPLUG_EXT} specifies that the fence is signaled when a display is plugged into or unplugged from the specified device. Applications can use this notification to determine when they need to re-enumerate the available displays on a device.
*
*
* See Also
*
* {@link VkDeviceEventInfoEXT}
*/
public static final int VK_DEVICE_EVENT_TYPE_DISPLAY_HOTPLUG_EXT = 0;
/**
* VkDisplayEventTypeEXT - Events that can occur on a display object
*
* Description
*
*
* - {@link #VK_DISPLAY_EVENT_TYPE_FIRST_PIXEL_OUT_EXT DISPLAY_EVENT_TYPE_FIRST_PIXEL_OUT_EXT} specifies that the fence is signaled when the first pixel of the next display refresh cycle leaves the display engine for the display.
*
*
* See Also
*
* {@link VkDisplayEventInfoEXT}
*/
public static final int VK_DISPLAY_EVENT_TYPE_FIRST_PIXEL_OUT_EXT = 0;
protected EXTDisplayControl() {
throw new UnsupportedOperationException();
}
// --- [ vkDisplayPowerControlEXT ] ---
/** Unsafe version of: {@link #vkDisplayPowerControlEXT DisplayPowerControlEXT} */
public static int nvkDisplayPowerControlEXT(VkDevice device, long display, long pDisplayPowerInfo) {
long __functionAddress = device.getCapabilities().vkDisplayPowerControlEXT;
if (CHECKS) {
check(__functionAddress);
}
return callPJPI(device.address(), display, pDisplayPowerInfo, __functionAddress);
}
/**
* Set the power state of a display.
*
* C Specification
*
* To set the power state of a display, call:
*
*
* VkResult vkDisplayPowerControlEXT(
* VkDevice device,
* VkDisplayKHR display,
* const VkDisplayPowerInfoEXT* pDisplayPowerInfo);
*
* Valid Usage (Implicit)
*
*
* - {@code device} must be a valid {@code VkDevice} handle
* - {@code display} must be a valid {@code VkDisplayKHR} handle
* - {@code pDisplayPowerInfo} must be a valid pointer to a valid {@link VkDisplayPowerInfoEXT} structure
* - Both of {@code device}, and {@code display} must have been created, allocated, or retrieved from the same {@code VkPhysicalDevice}
*
*
* Return Codes
*
*
* - On success, this command returns
*
* - {@link VK10#VK_SUCCESS SUCCESS}
*
* - On failure, this command returns
*
* - {@link VK10#VK_ERROR_OUT_OF_HOST_MEMORY ERROR_OUT_OF_HOST_MEMORY}
*
*
*
* See Also
*
* {@link VkDisplayPowerInfoEXT}
*
* @param device a logical device associated with {@code display}.
* @param display the display whose power state is modified.
* @param pDisplayPowerInfo a pointer to a {@link VkDisplayPowerInfoEXT} structure specifying the new power state of {@code display}.
*/
@NativeType("VkResult")
public static int vkDisplayPowerControlEXT(VkDevice device, @NativeType("VkDisplayKHR") long display, @NativeType("VkDisplayPowerInfoEXT const *") VkDisplayPowerInfoEXT pDisplayPowerInfo) {
return nvkDisplayPowerControlEXT(device, display, pDisplayPowerInfo.address());
}
// --- [ vkRegisterDeviceEventEXT ] ---
/** Unsafe version of: {@link #vkRegisterDeviceEventEXT RegisterDeviceEventEXT} */
public static int nvkRegisterDeviceEventEXT(VkDevice device, long pDeviceEventInfo, long pAllocator, long pFence) {
long __functionAddress = device.getCapabilities().vkRegisterDeviceEventEXT;
if (CHECKS) {
check(__functionAddress);
if (pAllocator != NULL) { VkAllocationCallbacks.validate(pAllocator); }
}
return callPPPPI(device.address(), pDeviceEventInfo, pAllocator, pFence, __functionAddress);
}
/**
* Signal a fence when a device event occurs.
*
* C Specification
*
* To create a fence that will be signaled when an event occurs on a device, call:
*
*
* VkResult vkRegisterDeviceEventEXT(
* VkDevice device,
* const VkDeviceEventInfoEXT* pDeviceEventInfo,
* const VkAllocationCallbacks* pAllocator,
* VkFence* pFence);
*
* Valid Usage (Implicit)
*
*
* - {@code device} must be a valid {@code VkDevice} handle
* - {@code pDeviceEventInfo} must be a valid pointer to a valid {@link VkDeviceEventInfoEXT} structure
* - If {@code pAllocator} is not {@code NULL}, {@code pAllocator} must be a valid pointer to a valid {@link VkAllocationCallbacks} structure
* - {@code pFence} must be a valid pointer to a {@code VkFence} handle
*
*
* Return Codes
*
*
* - On success, this command returns
*
* - {@link VK10#VK_SUCCESS SUCCESS}
*
* - On failure, this command returns
*
* - {@link VK10#VK_ERROR_OUT_OF_HOST_MEMORY ERROR_OUT_OF_HOST_MEMORY}
*
*
*
* See Also
*
* {@link VkAllocationCallbacks}, {@link VkDeviceEventInfoEXT}
*
* @param device a logical device on which the event may occur.
* @param pDeviceEventInfo a pointer to a {@link VkDeviceEventInfoEXT} structure describing the event of interest to the application.
* @param pAllocator controls host memory allocation as described in the Memory Allocation chapter.
* @param pFence a pointer to a handle in which the resulting fence object is returned.
*/
@NativeType("VkResult")
public static int vkRegisterDeviceEventEXT(VkDevice device, @NativeType("VkDeviceEventInfoEXT const *") VkDeviceEventInfoEXT pDeviceEventInfo, @Nullable @NativeType("VkAllocationCallbacks const *") VkAllocationCallbacks pAllocator, @NativeType("VkFence *") LongBuffer pFence) {
if (CHECKS) {
check(pFence, 1);
}
return nvkRegisterDeviceEventEXT(device, pDeviceEventInfo.address(), memAddressSafe(pAllocator), memAddress(pFence));
}
// --- [ vkRegisterDisplayEventEXT ] ---
/** Unsafe version of: {@link #vkRegisterDisplayEventEXT RegisterDisplayEventEXT} */
public static int nvkRegisterDisplayEventEXT(VkDevice device, long display, long pDisplayEventInfo, long pAllocator, long pFence) {
long __functionAddress = device.getCapabilities().vkRegisterDisplayEventEXT;
if (CHECKS) {
check(__functionAddress);
if (pAllocator != NULL) { VkAllocationCallbacks.validate(pAllocator); }
}
return callPJPPPI(device.address(), display, pDisplayEventInfo, pAllocator, pFence, __functionAddress);
}
/**
* Signal a fence when a display event occurs.
*
* C Specification
*
* To create a fence that will be signaled when an event occurs on a {@code VkDisplayKHR} object, call:
*
*
* VkResult vkRegisterDisplayEventEXT(
* VkDevice device,
* VkDisplayKHR display,
* const VkDisplayEventInfoEXT* pDisplayEventInfo,
* const VkAllocationCallbacks* pAllocator,
* VkFence* pFence);
*
* Valid Usage (Implicit)
*
*
* - {@code device} must be a valid {@code VkDevice} handle
* - {@code display} must be a valid {@code VkDisplayKHR} handle
* - {@code pDisplayEventInfo} must be a valid pointer to a valid {@link VkDisplayEventInfoEXT} structure
* - If {@code pAllocator} is not {@code NULL}, {@code pAllocator} must be a valid pointer to a valid {@link VkAllocationCallbacks} structure
* - {@code pFence} must be a valid pointer to a {@code VkFence} handle
* - Both of {@code device}, and {@code display} must have been created, allocated, or retrieved from the same {@code VkPhysicalDevice}
*
*
* Return Codes
*
*
* - On success, this command returns
*
* - {@link VK10#VK_SUCCESS SUCCESS}
*
* - On failure, this command returns
*
* - {@link VK10#VK_ERROR_OUT_OF_HOST_MEMORY ERROR_OUT_OF_HOST_MEMORY}
*
*
*
* See Also
*
* {@link VkAllocationCallbacks}, {@link VkDisplayEventInfoEXT}
*
* @param device a logical device associated with {@code display}
* @param display the display on which the event may occur.
* @param pDisplayEventInfo a pointer to a {@link VkDisplayEventInfoEXT} structure describing the event of interest to the application.
* @param pAllocator controls host memory allocation as described in the Memory Allocation chapter.
* @param pFence a pointer to a handle in which the resulting fence object is returned.
*/
@NativeType("VkResult")
public static int vkRegisterDisplayEventEXT(VkDevice device, @NativeType("VkDisplayKHR") long display, @NativeType("VkDisplayEventInfoEXT const *") VkDisplayEventInfoEXT pDisplayEventInfo, @Nullable @NativeType("VkAllocationCallbacks const *") VkAllocationCallbacks pAllocator, @NativeType("VkFence *") LongBuffer pFence) {
if (CHECKS) {
check(pFence, 1);
}
return nvkRegisterDisplayEventEXT(device, display, pDisplayEventInfo.address(), memAddressSafe(pAllocator), memAddress(pFence));
}
// --- [ vkGetSwapchainCounterEXT ] ---
/** Unsafe version of: {@link #vkGetSwapchainCounterEXT GetSwapchainCounterEXT} */
public static int nvkGetSwapchainCounterEXT(VkDevice device, long swapchain, int counter, long pCounterValue) {
long __functionAddress = device.getCapabilities().vkGetSwapchainCounterEXT;
if (CHECKS) {
check(__functionAddress);
}
return callPJPI(device.address(), swapchain, counter, pCounterValue, __functionAddress);
}
/**
* Query the current value of a surface counter.
*
* C Specification
*
* The requested counters become active when the first presentation command for the associated swapchain is processed by the presentation engine. To query the value of an active counter, use:
*
*
* VkResult vkGetSwapchainCounterEXT(
* VkDevice device,
* VkSwapchainKHR swapchain,
* VkSurfaceCounterFlagBitsEXT counter,
* uint64_t* pCounterValue);
*
* Description
*
* If a counter is not available because the swapchain is out of date, the implementation may return {@link KHRSwapchain#VK_ERROR_OUT_OF_DATE_KHR ERROR_OUT_OF_DATE_KHR}.
*
* Valid Usage
*
*
* - One or more present commands on {@code swapchain} must have been processed by the presentation engine
*
*
* Valid Usage (Implicit)
*
*
* - {@code device} must be a valid {@code VkDevice} handle
* - {@code swapchain} must be a valid {@code VkSwapchainKHR} handle
* - {@code counter} must be a valid {@code VkSurfaceCounterFlagBitsEXT} value
* - {@code pCounterValue} must be a valid pointer to a {@code uint64_t} value
* - Both of {@code device}, and {@code swapchain} must have been created, allocated, or retrieved from the same {@code VkInstance}
*
*
* Return Codes
*
*
* - On success, this command returns
*
* - {@link VK10#VK_SUCCESS SUCCESS}
*
* - On failure, this command returns
*
* - {@link VK10#VK_ERROR_OUT_OF_HOST_MEMORY ERROR_OUT_OF_HOST_MEMORY}
* - {@link VK10#VK_ERROR_DEVICE_LOST ERROR_DEVICE_LOST}
* - {@link KHRSwapchain#VK_ERROR_OUT_OF_DATE_KHR ERROR_OUT_OF_DATE_KHR}
*
*
*
* @param device the {@code VkDevice} associated with {@code swapchain}.
* @param swapchain the swapchain from which to query the counter value.
* @param counter a {@code VkSurfaceCounterFlagBitsEXT} value specifying the counter to query.
* @param pCounterValue will return the current value of the counter.
*/
@NativeType("VkResult")
public static int vkGetSwapchainCounterEXT(VkDevice device, @NativeType("VkSwapchainKHR") long swapchain, @NativeType("VkSurfaceCounterFlagBitsEXT") int counter, @NativeType("uint64_t *") LongBuffer pCounterValue) {
if (CHECKS) {
check(pCounterValue, 1);
}
return nvkGetSwapchainCounterEXT(device, swapchain, counter, memAddress(pCounterValue));
}
/** Array version of: {@link #vkRegisterDeviceEventEXT RegisterDeviceEventEXT} */
@NativeType("VkResult")
public static int vkRegisterDeviceEventEXT(VkDevice device, @NativeType("VkDeviceEventInfoEXT const *") VkDeviceEventInfoEXT pDeviceEventInfo, @Nullable @NativeType("VkAllocationCallbacks const *") VkAllocationCallbacks pAllocator, @NativeType("VkFence *") long[] pFence) {
long __functionAddress = device.getCapabilities().vkRegisterDeviceEventEXT;
if (CHECKS) {
check(__functionAddress);
check(pFence, 1);
if (pAllocator != null) { VkAllocationCallbacks.validate(pAllocator.address()); }
}
return callPPPPI(device.address(), pDeviceEventInfo.address(), memAddressSafe(pAllocator), pFence, __functionAddress);
}
/** Array version of: {@link #vkRegisterDisplayEventEXT RegisterDisplayEventEXT} */
@NativeType("VkResult")
public static int vkRegisterDisplayEventEXT(VkDevice device, @NativeType("VkDisplayKHR") long display, @NativeType("VkDisplayEventInfoEXT const *") VkDisplayEventInfoEXT pDisplayEventInfo, @Nullable @NativeType("VkAllocationCallbacks const *") VkAllocationCallbacks pAllocator, @NativeType("VkFence *") long[] pFence) {
long __functionAddress = device.getCapabilities().vkRegisterDisplayEventEXT;
if (CHECKS) {
check(__functionAddress);
check(pFence, 1);
if (pAllocator != null) { VkAllocationCallbacks.validate(pAllocator.address()); }
}
return callPJPPPI(device.address(), display, pDisplayEventInfo.address(), memAddressSafe(pAllocator), pFence, __functionAddress);
}
/** Array version of: {@link #vkGetSwapchainCounterEXT GetSwapchainCounterEXT} */
@NativeType("VkResult")
public static int vkGetSwapchainCounterEXT(VkDevice device, @NativeType("VkSwapchainKHR") long swapchain, @NativeType("VkSurfaceCounterFlagBitsEXT") int counter, @NativeType("uint64_t *") long[] pCounterValue) {
long __functionAddress = device.getCapabilities().vkGetSwapchainCounterEXT;
if (CHECKS) {
check(__functionAddress);
check(pCounterValue, 1);
}
return callPJPI(device.address(), swapchain, counter, pCounterValue, __functionAddress);
}
}