org.lwjgl.vulkan.EXTDisplaySurfaceCounter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of lwjgl-vulkan Show documentation
Show all versions of lwjgl-vulkan Show documentation
A new generation graphics and compute API that provides high-efficiency, cross-platform access to modern GPUs used in a wide variety of devices from PCs and consoles to mobile phones and embedded platforms.
/*
* Copyright LWJGL. All rights reserved.
* License terms: https://www.lwjgl.org/license
* MACHINE GENERATED FILE, DO NOT EDIT
*/
package org.lwjgl.vulkan;
import org.lwjgl.system.*;
import static org.lwjgl.system.Checks.*;
import static org.lwjgl.system.JNI.*;
/**
* This is extension defines a vertical blanking period counter associated with display surfaces. It provides a mechanism to query support for such a counter from a {@code VkSurfaceKHR} object.
*
*
* - Name String
* - {@code VK_EXT_display_surface_counter}
* - Extension Type
* - Instance extension
* - Registered Extension Number
* - 91
* - Revision
* - 1
* - Extension and Version Dependencies
*
* - Requires Vulkan 1.0
* - Requires {@code VK_KHR_display}
*
* - Contact
*
* - James Jones @cubanismo
*
* - 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 EXTDisplaySurfaceCounter {
/** The extension specification version. */
public static final int VK_EXT_DISPLAY_SURFACE_COUNTER_SPEC_VERSION = 1;
/** The extension name. */
public static final String VK_EXT_DISPLAY_SURFACE_COUNTER_EXTENSION_NAME = "VK_EXT_display_surface_counter";
/** Extends {@code VkStructureType}. */
public static final int VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_EXT = 1000090000;
/**
* VkSurfaceCounterFlagBitsEXT - Surface-relative counter types
*
* Description
*
*
* - {@link #VK_SURFACE_COUNTER_VBLANK_EXT SURFACE_COUNTER_VBLANK_EXT} indicates a counter incrementing once every time a vertical blanking period occurs on the display associated with the surface.
*
*
* See Also
*
* {@code VkSurfaceCounterFlagsEXT}, {@link EXTDisplayControl#vkGetSwapchainCounterEXT GetSwapchainCounterEXT}
*/
public static final int VK_SURFACE_COUNTER_VBLANK_EXT = 0x1;
protected EXTDisplaySurfaceCounter() {
throw new UnsupportedOperationException();
}
static boolean isAvailable(VKCapabilitiesInstance caps) {
return checkFunctions(
caps.vkGetPhysicalDeviceSurfaceCapabilities2EXT
);
}
// --- [ vkGetPhysicalDeviceSurfaceCapabilities2EXT ] ---
/** Unsafe version of: {@link #vkGetPhysicalDeviceSurfaceCapabilities2EXT GetPhysicalDeviceSurfaceCapabilities2EXT} */
public static int nvkGetPhysicalDeviceSurfaceCapabilities2EXT(VkPhysicalDevice physicalDevice, long surface, long pSurfaceCapabilities) {
long __functionAddress = physicalDevice.getCapabilities().vkGetPhysicalDeviceSurfaceCapabilities2EXT;
if (CHECKS) {
check(__functionAddress);
}
return callPJPI(__functionAddress, physicalDevice.address(), surface, pSurfaceCapabilities);
}
/**
* Query surface capabilities.
*
* C Specification
*
* To query the basic capabilities of a surface, needed in order to create a swapchain, call:
*
*
* VkResult vkGetPhysicalDeviceSurfaceCapabilities2EXT(
* VkPhysicalDevice physicalDevice,
* VkSurfaceKHR surface,
* VkSurfaceCapabilities2EXT* pSurfaceCapabilities);
*
* Description
*
* {@link #vkGetPhysicalDeviceSurfaceCapabilities2EXT GetPhysicalDeviceSurfaceCapabilities2EXT} behaves similarly to {@link KHRSurface#vkGetPhysicalDeviceSurfaceCapabilitiesKHR GetPhysicalDeviceSurfaceCapabilitiesKHR}, with the ability to return extended information by adding extension structures to the {@code pNext} chain of its {@code pSurfaceCapabilities} parameter.
*
* Valid Usage (Implicit)
*
*
* - {@code physicalDevice} must be a valid {@code VkPhysicalDevice} handle
* - {@code surface} must be a valid {@code VkSurfaceKHR} handle
* - {@code pSurfaceCapabilities} must be a pointer to a {@link VkSurfaceCapabilities2EXT} structure
* - Both of {@code physicalDevice}, and {@code surface} 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_OUT_OF_DEVICE_MEMORY ERROR_OUT_OF_DEVICE_MEMORY}
* - {@link KHRSurface#VK_ERROR_SURFACE_LOST_KHR ERROR_SURFACE_LOST_KHR}
*
*
*
* See Also
*
* {@link VkSurfaceCapabilities2EXT}
*
* @param physicalDevice the physical device that will be associated with the swapchain to be created, as described for {@link KHRSwapchain#vkCreateSwapchainKHR CreateSwapchainKHR}.
* @param surface the surface that will be associated with the swapchain.
* @param pSurfaceCapabilities a pointer to an instance of the {@link VkSurfaceCapabilities2EXT} structure in which the capabilities are returned.
*/
@NativeType("VkResult")
public static int vkGetPhysicalDeviceSurfaceCapabilities2EXT(VkPhysicalDevice physicalDevice, @NativeType("VkSurfaceKHR") long surface, @NativeType("VkSurfaceCapabilities2EXT *") VkSurfaceCapabilities2EXT pSurfaceCapabilities) {
return nvkGetPhysicalDeviceSurfaceCapabilities2EXT(physicalDevice, surface, pSurfaceCapabilities.address());
}
}