org.lwjgl.vulkan.KHRSwapchain 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.*;
/**
* The {@code VK_KHR_swapchain} extension is the device-level companion to the {@link KHRSurface VK_KHR_surface} extension. It introduces {@code VkSwapchainKHR} objects, which provide the ability to present rendering results to a surface.
*
* Examples
*
* Note
*
* The example code for the {@link KHRSurface VK_KHR_surface} and {@code VK_KHR_swapchain} extensions was removed from the appendix after revision 1.0.29. This WSI example code was ported to the cube demo that is shipped with the official Khronos SDK, and is being kept up-to-date in that location (see: https://github.com/KhronosGroup/Vulkan-Tools/blob/master/cube/cube.c).
*
*
* VK_KHR_swapchain
*
*
* - Name String
* - {@code VK_KHR_swapchain}
* - Extension Type
* - Device extension
* - Registered Extension Number
* - 2
* - Revision
* - 70
* - Extension and Version Dependencies
*
* - Requires Vulkan 1.0
* - Requires {@link KHRSurface VK_KHR_surface}
*
* - Contact
*
* - James Jones cubanismo
* - Ian Elliott ianelliottus
*
*
*
* Other Extension Metadata
*
*
* - Last Modified Date
* - 2017-10-06
* - IP Status
* - No known IP claims.
* - Interactions and External Dependencies
*
* - Interacts with Vulkan 1.1
*
* - Contributors
*
* - Patrick Doane, Blizzard
* - Ian Elliott, LunarG
* - Jesse Hall, Google
* - Mathias Heyer, NVIDIA
* - James Jones, NVIDIA
* - David Mao, AMD
* - Norbert Nopper, Freescale
* - Alon Or-bach, Samsung
* - Daniel Rakos, AMD
* - Graham Sellers, AMD
* - Jeff Vigil, Qualcomm
* - Chia-I Wu, LunarG
* - Jason Ekstrand, Intel
* - Matthaeus G. Chajdas, AMD
* - Ray Smith, ARM
*
*
*/
public class KHRSwapchain {
/** The extension specification version. */
public static final int VK_KHR_SWAPCHAIN_SPEC_VERSION = 70;
/** The extension name. */
public static final String VK_KHR_SWAPCHAIN_EXTENSION_NAME = "VK_KHR_swapchain";
/**
* Extends {@code VkStructureType}.
*
* Enum values:
*
*
* - {@link #VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR}
* - {@link #VK_STRUCTURE_TYPE_PRESENT_INFO_KHR STRUCTURE_TYPE_PRESENT_INFO_KHR}
*
*/
public static final int
VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR = 1000001000,
VK_STRUCTURE_TYPE_PRESENT_INFO_KHR = 1000001001;
/** Extends {@code VkImageLayout}. */
public static final int VK_IMAGE_LAYOUT_PRESENT_SRC_KHR = 1000001002;
/**
* Extends {@code VkResult}.
*
* Enum values:
*
*
* - {@link #VK_SUBOPTIMAL_KHR SUBOPTIMAL_KHR}
* - {@link #VK_ERROR_OUT_OF_DATE_KHR ERROR_OUT_OF_DATE_KHR}
*
*/
public static final int
VK_SUBOPTIMAL_KHR = 1000001003,
VK_ERROR_OUT_OF_DATE_KHR = -1000001004;
/** Extends {@code VkObjectType}. */
public static final int VK_OBJECT_TYPE_SWAPCHAIN_KHR = 1000001000;
/**
* Extends {@code VkStructureType}.
*
* Enum values:
*
*
* - {@link #VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_CAPABILITIES_KHR STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_CAPABILITIES_KHR}
* - {@link #VK_STRUCTURE_TYPE_IMAGE_SWAPCHAIN_CREATE_INFO_KHR STRUCTURE_TYPE_IMAGE_SWAPCHAIN_CREATE_INFO_KHR}
* - {@link #VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHR STRUCTURE_TYPE_BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHR}
* - {@link #VK_STRUCTURE_TYPE_ACQUIRE_NEXT_IMAGE_INFO_KHR STRUCTURE_TYPE_ACQUIRE_NEXT_IMAGE_INFO_KHR}
* - {@link #VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_INFO_KHR STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_INFO_KHR}
* - {@link #VK_STRUCTURE_TYPE_DEVICE_GROUP_SWAPCHAIN_CREATE_INFO_KHR STRUCTURE_TYPE_DEVICE_GROUP_SWAPCHAIN_CREATE_INFO_KHR}
*
*/
public static final int
VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_CAPABILITIES_KHR = 1000060007,
VK_STRUCTURE_TYPE_IMAGE_SWAPCHAIN_CREATE_INFO_KHR = 1000060008,
VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHR = 1000060009,
VK_STRUCTURE_TYPE_ACQUIRE_NEXT_IMAGE_INFO_KHR = 1000060010,
VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_INFO_KHR = 1000060011,
VK_STRUCTURE_TYPE_DEVICE_GROUP_SWAPCHAIN_CREATE_INFO_KHR = 1000060012;
/**
* Extends {@code VkSwapchainCreateFlagBitsKHR}.
*
* Enum values:
*
*
* - {@link #VK_SWAPCHAIN_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT_KHR SWAPCHAIN_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT_KHR}
* - {@link #VK_SWAPCHAIN_CREATE_PROTECTED_BIT_KHR SWAPCHAIN_CREATE_PROTECTED_BIT_KHR}
*
*/
public static final int
VK_SWAPCHAIN_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT_KHR = 0x1,
VK_SWAPCHAIN_CREATE_PROTECTED_BIT_KHR = 0x2;
/**
* VkDeviceGroupPresentModeFlagBitsKHR - Bitmask specifying supported device group present modes
*
* Description
*
*
* - {@link #VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_BIT_KHR DEVICE_GROUP_PRESENT_MODE_LOCAL_BIT_KHR} specifies that any physical device with a presentation engine can present its own swapchain images.
* - {@link #VK_DEVICE_GROUP_PRESENT_MODE_REMOTE_BIT_KHR 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 {@code presentMask}.
* - {@link #VK_DEVICE_GROUP_PRESENT_MODE_SUM_BIT_KHR 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 {@code presentMask}.
* - {@link #VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_MULTI_DEVICE_BIT_KHR 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.
*
*
* See Also
*
* {@link VkDeviceGroupPresentInfoKHR}
*/
public static final int
VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_BIT_KHR = 0x1,
VK_DEVICE_GROUP_PRESENT_MODE_REMOTE_BIT_KHR = 0x2,
VK_DEVICE_GROUP_PRESENT_MODE_SUM_BIT_KHR = 0x4,
VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_MULTI_DEVICE_BIT_KHR = 0x8;
protected KHRSwapchain() {
throw new UnsupportedOperationException();
}
// --- [ vkCreateSwapchainKHR ] ---
/** Unsafe version of: {@link #vkCreateSwapchainKHR CreateSwapchainKHR} */
public static int nvkCreateSwapchainKHR(VkDevice device, long pCreateInfo, long pAllocator, long pSwapchain) {
long __functionAddress = device.getCapabilities().vkCreateSwapchainKHR;
if (CHECKS) {
check(__functionAddress);
if (pAllocator != NULL) { VkAllocationCallbacks.validate(pAllocator); }
}
return callPPPPI(device.address(), pCreateInfo, pAllocator, pSwapchain, __functionAddress);
}
/**
* Create a swapchain.
*
* C Specification
*
* To create a swapchain, call:
*
*
* VkResult vkCreateSwapchainKHR(
* VkDevice device,
* const VkSwapchainCreateInfoKHR* pCreateInfo,
* const VkAllocationCallbacks* pAllocator,
* VkSwapchainKHR* pSwapchain);
*
* Description
*
* If the {@code oldSwapchain} parameter of {@code pCreateInfo} is a valid swapchain, which has exclusive full-screen access, that access is released from {@code oldSwapchain}. If the command succeeds in this case, the newly created swapchain will automatically acquire exclusive full-screen access from {@code oldSwapchain}.
*
* Note
*
* This implicit transfer is intended to avoid exiting and entering full-screen exclusive mode, which may otherwise cause unwanted visual updates to the display.
*
*
* In some cases, swapchain creation may fail if exclusive full-screen mode is requested for application control, but for some implementation-specific reason exclusive full-screen access is unavailable for the particular combination of parameters provided. If this occurs, {@link VK10#VK_ERROR_INITIALIZATION_FAILED ERROR_INITIALIZATION_FAILED} will be returned.
*
* Note
*
* In particular, it will fail if the {@code imageExtent} member of {@code pCreateInfo} does not match the extents of the monitor. Other reasons for failure may include the app not being set as high-dpi aware, or if the physical device and monitor are not compatible in this mode.
*
*
* When the {@code VkSurfaceKHR} in {@link VkSwapchainCreateInfoKHR} is a display surface, then the {@code VkDisplayModeKHR} in display surface’s {@link VkDisplaySurfaceCreateInfoKHR} is associated with a particular {@code VkDisplayKHR}. Swapchain creation may fail if that {@code VkDisplayKHR} is not acquired by the application. In this scenario {@link VK10#VK_ERROR_INITIALIZATION_FAILED ERROR_INITIALIZATION_FAILED} is returned.
*
* Valid Usage (Implicit)
*
*
* - {@code device} must be a valid {@code VkDevice} handle
* - {@code pCreateInfo} must be a valid pointer to a valid {@link VkSwapchainCreateInfoKHR} structure
* - If {@code pAllocator} is not {@code NULL}, {@code pAllocator} must be a valid pointer to a valid {@link VkAllocationCallbacks} structure
* - {@code pSwapchain} must be a valid pointer to a {@code VkSwapchainKHR} handle
*
*
* Host Synchronization
*
*
* - Host access to {@code pCreateInfo→surface} must be externally synchronized
* - Host access to {@code pCreateInfo→oldSwapchain} must be externally synchronized
*
*
* 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 VK10#VK_ERROR_DEVICE_LOST ERROR_DEVICE_LOST}
* - {@link KHRSurface#VK_ERROR_SURFACE_LOST_KHR ERROR_SURFACE_LOST_KHR}
* - {@link KHRSurface#VK_ERROR_NATIVE_WINDOW_IN_USE_KHR ERROR_NATIVE_WINDOW_IN_USE_KHR}
* - {@link VK10#VK_ERROR_INITIALIZATION_FAILED ERROR_INITIALIZATION_FAILED}
*
*
*
* See Also
*
* {@link VkAllocationCallbacks}, {@link VkSwapchainCreateInfoKHR}
*
* @param device the device to create the swapchain for.
* @param pCreateInfo a pointer to a {@link VkSwapchainCreateInfoKHR} structure specifying the parameters of the created swapchain.
* @param pAllocator the allocator used for host memory allocated for the swapchain object when there is no more specific allocator available (see Memory Allocation).
* @param pSwapchain a pointer to a {@code VkSwapchainKHR} handle in which the created swapchain object will be returned.
*/
@NativeType("VkResult")
public static int vkCreateSwapchainKHR(VkDevice device, @NativeType("VkSwapchainCreateInfoKHR const *") VkSwapchainCreateInfoKHR pCreateInfo, @Nullable @NativeType("VkAllocationCallbacks const *") VkAllocationCallbacks pAllocator, @NativeType("VkSwapchainKHR *") LongBuffer pSwapchain) {
if (CHECKS) {
check(pSwapchain, 1);
}
return nvkCreateSwapchainKHR(device, pCreateInfo.address(), memAddressSafe(pAllocator), memAddress(pSwapchain));
}
// --- [ vkDestroySwapchainKHR ] ---
/** Unsafe version of: {@link #vkDestroySwapchainKHR DestroySwapchainKHR} */
public static void nvkDestroySwapchainKHR(VkDevice device, long swapchain, long pAllocator) {
long __functionAddress = device.getCapabilities().vkDestroySwapchainKHR;
if (CHECKS) {
check(__functionAddress);
if (pAllocator != NULL) { VkAllocationCallbacks.validate(pAllocator); }
}
callPJPV(device.address(), swapchain, pAllocator, __functionAddress);
}
/**
* Destroy a swapchain object.
*
* C Specification
*
* To destroy a swapchain object call:
*
*
* void vkDestroySwapchainKHR(
* VkDevice device,
* VkSwapchainKHR swapchain,
* const VkAllocationCallbacks* pAllocator);
*
* Description
*
* The application must not destroy a swapchain until after completion of all outstanding operations on images that were acquired from the swapchain. {@code swapchain} and all associated {@code VkImage} handles are destroyed, and must not be acquired or used any more by the application. The memory of each {@code 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 {@code 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.
*
* If {@code swapchain} has exclusive full-screen access, it is released before the swapchain is destroyed.
*
* Valid Usage
*
*
* - All uses of presentable images acquired from {@code swapchain} must have completed execution
* - If {@link VkAllocationCallbacks} were provided when {@code swapchain} was created, a compatible set of callbacks must be provided here
* - If no {@link VkAllocationCallbacks} were provided when {@code swapchain} was created, {@code pAllocator} must be {@code NULL}
*
*
* Valid Usage (Implicit)
*
*
* - {@code device} must be a valid {@code VkDevice} handle
* - If {@code swapchain} is not {@link VK10#VK_NULL_HANDLE NULL_HANDLE}, {@code swapchain} must be a valid {@code VkSwapchainKHR} handle
* - If {@code pAllocator} is not {@code NULL}, {@code pAllocator} must be a valid pointer to a valid {@link VkAllocationCallbacks} structure
* - Both of {@code device}, and {@code swapchain} that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the same {@code VkInstance}
*
*
* Host Synchronization
*
*
* - Host access to {@code swapchain} must be externally synchronized
*
*
* See Also
*
* {@link VkAllocationCallbacks}
*
* @param device the {@code VkDevice} associated with {@code swapchain}.
* @param swapchain the swapchain to destroy.
* @param pAllocator the allocator used for host memory allocated for the swapchain object when there is no more specific allocator available (see Memory Allocation).
*/
public static void vkDestroySwapchainKHR(VkDevice device, @NativeType("VkSwapchainKHR") long swapchain, @Nullable @NativeType("VkAllocationCallbacks const *") VkAllocationCallbacks pAllocator) {
nvkDestroySwapchainKHR(device, swapchain, memAddressSafe(pAllocator));
}
// --- [ vkGetSwapchainImagesKHR ] ---
/**
* Unsafe version of: {@link #vkGetSwapchainImagesKHR GetSwapchainImagesKHR}
*
* @param pSwapchainImageCount a pointer to an integer related to the number of presentable images available or queried, as described below.
*/
public static int nvkGetSwapchainImagesKHR(VkDevice device, long swapchain, long pSwapchainImageCount, long pSwapchainImages) {
long __functionAddress = device.getCapabilities().vkGetSwapchainImagesKHR;
if (CHECKS) {
check(__functionAddress);
}
return callPJPPI(device.address(), swapchain, pSwapchainImageCount, pSwapchainImages, __functionAddress);
}
/**
* Obtain the array of presentable images associated with a swapchain.
*
* C Specification
*
* To obtain the array of presentable images associated with a swapchain, call:
*
*
* VkResult vkGetSwapchainImagesKHR(
* VkDevice device,
* VkSwapchainKHR swapchain,
* uint32_t* pSwapchainImageCount,
* VkImage* pSwapchainImages);
*
* Description
*
* If {@code pSwapchainImages} is {@code NULL}, then the number of presentable images for {@code swapchain} is returned in {@code pSwapchainImageCount}. Otherwise, {@code pSwapchainImageCount} must point to a variable set by the user to the number of elements in the {@code pSwapchainImages} array, and on return the variable is overwritten with the number of structures actually written to {@code pSwapchainImages}. If the value of {@code pSwapchainImageCount} is less than the number of presentable images for {@code swapchain}, at most {@code pSwapchainImageCount} structures will be written, and {@link VK10#VK_INCOMPLETE INCOMPLETE} will be returned instead of {@link VK10#VK_SUCCESS SUCCESS}, to indicate that not all the available presentable images were returned.
*
* Valid Usage (Implicit)
*
*
* - {@code device} must be a valid {@code VkDevice} handle
* - {@code swapchain} must be a valid {@code VkSwapchainKHR} handle
* - {@code pSwapchainImageCount} must be a valid pointer to a {@code uint32_t} value
* - If the value referenced by {@code pSwapchainImageCount} is not 0, and {@code pSwapchainImages} is not {@code NULL}, {@code pSwapchainImages} must be a valid pointer to an array of {@code pSwapchainImageCount} {@code VkImage} handles
* - 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}
* - {@link VK10#VK_INCOMPLETE INCOMPLETE}
*
* - 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}
*
*
*
* @param device the device associated with {@code swapchain}.
* @param swapchain the swapchain to query.
* @param pSwapchainImageCount a pointer to an integer related to the number of presentable images available or queried, as described below.
* @param pSwapchainImages either {@code NULL} or a pointer to an array of {@code VkImage} handles.
*/
@NativeType("VkResult")
public static int vkGetSwapchainImagesKHR(VkDevice device, @NativeType("VkSwapchainKHR") long swapchain, @NativeType("uint32_t *") IntBuffer pSwapchainImageCount, @Nullable @NativeType("VkImage *") LongBuffer pSwapchainImages) {
if (CHECKS) {
check(pSwapchainImageCount, 1);
checkSafe(pSwapchainImages, pSwapchainImageCount.get(pSwapchainImageCount.position()));
}
return nvkGetSwapchainImagesKHR(device, swapchain, memAddress(pSwapchainImageCount), memAddressSafe(pSwapchainImages));
}
// --- [ vkAcquireNextImageKHR ] ---
/** Unsafe version of: {@link #vkAcquireNextImageKHR AcquireNextImageKHR} */
public static int nvkAcquireNextImageKHR(VkDevice device, long swapchain, long timeout, long semaphore, long fence, long pImageIndex) {
long __functionAddress = device.getCapabilities().vkAcquireNextImageKHR;
if (CHECKS) {
check(__functionAddress);
}
return callPJJJJPI(device.address(), swapchain, timeout, semaphore, fence, pImageIndex, __functionAddress);
}
/**
* Retrieve the index of the next available presentable image.
*
* C Specification
*
* To acquire an available presentable image to use, and retrieve the index of that image, call:
*
*
* VkResult vkAcquireNextImageKHR(
* VkDevice device,
* VkSwapchainKHR swapchain,
* uint64_t timeout,
* VkSemaphore semaphore,
* VkFence fence,
* uint32_t* pImageIndex);
*
* Valid Usage
*
*
* - {@code swapchain} must not be in the retired state
* - If {@code semaphore} is not {@link VK10#VK_NULL_HANDLE NULL_HANDLE} it must be unsignaled
* - If {@code semaphore} is not {@link VK10#VK_NULL_HANDLE NULL_HANDLE} it must not have any uncompleted signal or wait operations pending
* - If {@code fence} is not {@link VK10#VK_NULL_HANDLE 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
* - {@code semaphore} and {@code fence} must not both be equal to {@link VK10#VK_NULL_HANDLE NULL_HANDLE}
* - If the number of currently acquired images is greater than the difference between the number of images in {@code swapchain} and the value of {@link VkSurfaceCapabilitiesKHR}{@code ::minImageCount} as returned by a call to {@link KHRGetSurfaceCapabilities2#vkGetPhysicalDeviceSurfaceCapabilities2KHR GetPhysicalDeviceSurfaceCapabilities2KHR} with the {@code surface} used to create {@code swapchain}, {@code timeout} must not be {@code UINT64_MAX}
* - {@code semaphore} must have a {@code VkSemaphoreType} of {@link VK12#VK_SEMAPHORE_TYPE_BINARY SEMAPHORE_TYPE_BINARY}
*
*
* Valid Usage (Implicit)
*
*
* - {@code device} must be a valid {@code VkDevice} handle
* - {@code swapchain} must be a valid {@code VkSwapchainKHR} handle
* - If {@code semaphore} is not {@link VK10#VK_NULL_HANDLE NULL_HANDLE}, {@code semaphore} must be a valid {@code VkSemaphore} handle
* - If {@code fence} is not {@link VK10#VK_NULL_HANDLE NULL_HANDLE}, {@code fence} must be a valid {@code VkFence} handle
* - {@code pImageIndex} must be a valid pointer to a {@code uint32_t} value
* - If {@code semaphore} is a valid handle, it must have been created, allocated, or retrieved from {@code device}
* - If {@code fence} is a valid handle, it must have been created, allocated, or retrieved from {@code device}
* - Both of {@code device}, and {@code swapchain} that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the same {@code VkInstance}
*
*
* Host Synchronization
*
*
* - Host access to {@code swapchain} must be externally synchronized
* - Host access to {@code semaphore} must be externally synchronized
* - Host access to {@code fence} must be externally synchronized
*
*
* Return Codes
*
*
* - On success, this command returns
*
* - {@link VK10#VK_SUCCESS SUCCESS}
* - {@link VK10#VK_TIMEOUT TIMEOUT}
* - {@link VK10#VK_NOT_READY NOT_READY}
* - {@link #VK_SUBOPTIMAL_KHR SUBOPTIMAL_KHR}
*
* - 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 VK10#VK_ERROR_DEVICE_LOST ERROR_DEVICE_LOST}
* - {@link #VK_ERROR_OUT_OF_DATE_KHR ERROR_OUT_OF_DATE_KHR}
* - {@link KHRSurface#VK_ERROR_SURFACE_LOST_KHR ERROR_SURFACE_LOST_KHR}
* - {@link EXTFullScreenExclusive#VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT}
*
*
*
* @param device the device associated with {@code swapchain}.
* @param swapchain the non-retired swapchain from which an image is being acquired.
* @param timeout specifies how long the function waits, in nanoseconds, if no image is available.
* @param semaphore {@link VK10#VK_NULL_HANDLE NULL_HANDLE} or a semaphore to signal.
* @param fence {@link VK10#VK_NULL_HANDLE NULL_HANDLE} or a fence to signal.
* @param pImageIndex a pointer to a {@code uint32_t} in which the index of the next image to use (i.e. an index into the array of images returned by {@code vkGetSwapchainImagesKHR}) is returned.
*/
@NativeType("VkResult")
public static int vkAcquireNextImageKHR(VkDevice device, @NativeType("VkSwapchainKHR") long swapchain, @NativeType("uint64_t") long timeout, @NativeType("VkSemaphore") long semaphore, @NativeType("VkFence") long fence, @NativeType("uint32_t *") IntBuffer pImageIndex) {
if (CHECKS) {
check(pImageIndex, 1);
}
return nvkAcquireNextImageKHR(device, swapchain, timeout, semaphore, fence, memAddress(pImageIndex));
}
// --- [ vkQueuePresentKHR ] ---
/** Unsafe version of: {@link #vkQueuePresentKHR QueuePresentKHR} */
public static int nvkQueuePresentKHR(VkQueue queue, long pPresentInfo) {
long __functionAddress = queue.getCapabilities().vkQueuePresentKHR;
if (CHECKS) {
check(__functionAddress);
VkPresentInfoKHR.validate(pPresentInfo);
}
return callPPI(queue.address(), pPresentInfo, __functionAddress);
}
/**
* Queue an image for presentation.
*
* C Specification
*
* After queueing all rendering commands and transitioning the image to the correct layout, to queue an image for presentation, call:
*
*
* VkResult vkQueuePresentKHR(
* VkQueue queue,
* const VkPresentInfoKHR* pPresentInfo);
*
* 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 {@code pSwapchains} member of {@code pPresentInfo} must be a swapchain that is created for a surface for which presentation is supported from {@code queue} as determined using a call to {@code vkGetPhysicalDeviceSurfaceSupportKHR}
* - If more than one member of {@code 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 wait operation referring to a binary semaphore defined by the elements of the {@code pWaitSemaphores} member of {@code pPresentInfo} executes on {@code queue}, there must be no other queues waiting on the same semaphore
* - All elements of the {@code pWaitSemaphores} member of {@code pPresentInfo} must be semaphores that are signaled, or have semaphore signal operations previously submitted for execution
* - All elements of the {@code pWaitSemaphores} member of {@code pPresentInfo} must be created with a {@code VkSemaphoreType} of {@link VK12#VK_SEMAPHORE_TYPE_BINARY SEMAPHORE_TYPE_BINARY}
* - All elements of the {@code pWaitSemaphores} member of {@code pPresentInfo} must reference a semaphore signal operation that has been submitted for execution and any semaphore signal operations on which it depends (if any) must have also been submitted for execution
*
*
* Any writes to memory backing the images referenced by the {@code pImageIndices} and {@code pSwapchains} members of {@code pPresentInfo}, that are available before {@link #vkQueuePresentKHR QueuePresentKHR} 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.
*
* Note
*
* The origin of the native orientation of the surface coordinate system is not specified in the Vulkan specification; it depends on the platform. For most platforms the origin is by default upper-left, meaning the pixel of the presented {@code VkImage} at coordinates (0,0)
would appear at the upper left pixel of the platform surface (assuming {@link KHRSurface#VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR SURFACE_TRANSFORM_IDENTITY_BIT_KHR}, and the display standing the right way up).
*
*
* If {@code vkQueuePresentKHR} fails to enqueue the corresponding set of queue operations, it may return {@link VK10#VK_ERROR_OUT_OF_HOST_MEMORY ERROR_OUT_OF_HOST_MEMORY} or {@link VK10#VK_ERROR_OUT_OF_DEVICE_MEMORY 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 {@code vkQueuePresentKHR} fails in such a way that the implementation is unable to make that guarantee, the implementation must return {@link VK10#VK_ERROR_DEVICE_LOST ERROR_DEVICE_LOST}.
*
* However, if the presentation request is rejected by the presentation engine with an error {@link #VK_ERROR_OUT_OF_DATE_KHR ERROR_OUT_OF_DATE_KHR}, {@link EXTFullScreenExclusive#VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT}, or {@link KHRSurface#VK_ERROR_SURFACE_LOST_KHR ERROR_SURFACE_LOST_KHR}, the set of queue operations are still considered to be enqueued and thus any semaphore wait operation specified in {@link VkPresentInfoKHR} will execute when the corresponding queue operation is complete.
*
* Calls to {@code vkQueuePresentKHR} may block, but must return in finite time.
*
* If any {@code swapchain} member of {@code pPresentInfo} was created with {@link EXTFullScreenExclusive#VK_FULL_SCREEN_EXCLUSIVE_APPLICATION_CONTROLLED_EXT FULL_SCREEN_EXCLUSIVE_APPLICATION_CONTROLLED_EXT}, {@link EXTFullScreenExclusive#VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT} will be returned if that swapchain does not have exclusive full-screen access, possibly for implementation-specific reasons outside of the application’s control.
*
* Valid Usage (Implicit)
*
*
* - {@code queue} must be a valid {@code VkQueue} handle
* - {@code pPresentInfo} must be a valid pointer to a valid {@link VkPresentInfoKHR} structure
*
*
* Host Synchronization
*
*
* - Host access to {@code queue} must be externally synchronized
* - Host access to {@code pPresentInfo→pWaitSemaphores}[] must be externally synchronized
* - Host access to {@code pPresentInfo→pSwapchains}[] must be externally synchronized
*
*
* Command Properties
*
*
* Command Buffer Levels Render Pass Scope Supported Queue Types
* - - Any
*
*
* Return Codes
*
*
* - On success, this command returns
*
* - {@link VK10#VK_SUCCESS SUCCESS}
* - {@link #VK_SUBOPTIMAL_KHR SUBOPTIMAL_KHR}
*
* - 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 VK10#VK_ERROR_DEVICE_LOST ERROR_DEVICE_LOST}
* - {@link #VK_ERROR_OUT_OF_DATE_KHR ERROR_OUT_OF_DATE_KHR}
* - {@link KHRSurface#VK_ERROR_SURFACE_LOST_KHR ERROR_SURFACE_LOST_KHR}
* - {@link EXTFullScreenExclusive#VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT}
*
*
*
* See Also
*
* {@link VkPresentInfoKHR}
*
* @param queue a queue that is capable of presentation to the target surface’s platform on the same device as the image’s swapchain.
* @param pPresentInfo a pointer to a {@link VkPresentInfoKHR} structure specifying parameters of the presentation.
*/
@NativeType("VkResult")
public static int vkQueuePresentKHR(VkQueue queue, @NativeType("VkPresentInfoKHR const *") VkPresentInfoKHR pPresentInfo) {
return nvkQueuePresentKHR(queue, pPresentInfo.address());
}
// --- [ vkGetDeviceGroupPresentCapabilitiesKHR ] ---
/** Unsafe version of: {@link #vkGetDeviceGroupPresentCapabilitiesKHR GetDeviceGroupPresentCapabilitiesKHR} */
public static int nvkGetDeviceGroupPresentCapabilitiesKHR(VkDevice device, long pDeviceGroupPresentCapabilities) {
long __functionAddress = device.getCapabilities().vkGetDeviceGroupPresentCapabilitiesKHR;
if (CHECKS) {
check(__functionAddress);
}
return callPPI(device.address(), pDeviceGroupPresentCapabilities, __functionAddress);
}
/**
* Query present capabilities from other physical devices.
*
* C Specification
*
* A logical device that represents multiple physical devices may support presenting from images on more than one physical device, or combining images from multiple physical devices.
*
* To query these capabilities, call:
*
*
* VkResult vkGetDeviceGroupPresentCapabilitiesKHR(
* VkDevice device,
* VkDeviceGroupPresentCapabilitiesKHR* pDeviceGroupPresentCapabilities);
*
* Valid Usage (Implicit)
*
*
* - {@code device} must be a valid {@code VkDevice} handle
* - {@code pDeviceGroupPresentCapabilities} must be a valid pointer to a {@link VkDeviceGroupPresentCapabilitiesKHR} structure
*
*
* 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}
*
*
*
* See Also
*
* {@link VkDeviceGroupPresentCapabilitiesKHR}
*
* @param device the logical device.
* @param pDeviceGroupPresentCapabilities a pointer to a {@link VkDeviceGroupPresentCapabilitiesKHR} structure in which the device’s capabilities are returned.
*/
@NativeType("VkResult")
public static int vkGetDeviceGroupPresentCapabilitiesKHR(VkDevice device, @NativeType("VkDeviceGroupPresentCapabilitiesKHR *") VkDeviceGroupPresentCapabilitiesKHR pDeviceGroupPresentCapabilities) {
return nvkGetDeviceGroupPresentCapabilitiesKHR(device, pDeviceGroupPresentCapabilities.address());
}
// --- [ vkGetDeviceGroupSurfacePresentModesKHR ] ---
/** Unsafe version of: {@link #vkGetDeviceGroupSurfacePresentModesKHR GetDeviceGroupSurfacePresentModesKHR} */
public static int nvkGetDeviceGroupSurfacePresentModesKHR(VkDevice device, long surface, long pModes) {
long __functionAddress = device.getCapabilities().vkGetDeviceGroupSurfacePresentModesKHR;
if (CHECKS) {
check(__functionAddress);
}
return callPJPI(device.address(), surface, pModes, __functionAddress);
}
/**
* Query present capabilities for a surface.
*
* C Specification
*
* Some surfaces may not be capable of using all the device group present modes.
*
* To query the supported device group present modes for a particular surface, call:
*
*
* VkResult vkGetDeviceGroupSurfacePresentModesKHR(
* VkDevice device,
* VkSurfaceKHR surface,
* VkDeviceGroupPresentModeFlagsKHR* pModes);
*
* 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 {@link #vkGetDeviceGroupPresentCapabilitiesKHR GetDeviceGroupPresentCapabilitiesKHR}.
*
* Valid Usage
*
*
* - {@code surface} must be supported by all physical devices associated with {@code device}, as reported by {@link KHRSurface#vkGetPhysicalDeviceSurfaceSupportKHR GetPhysicalDeviceSurfaceSupportKHR} or an equivalent platform-specific mechanism
*
*
* Valid Usage (Implicit)
*
*
* - {@code device} must be a valid {@code VkDevice} handle
* - {@code surface} must be a valid {@code VkSurfaceKHR} handle
* - {@code pModes} must be a valid pointer to a {@code VkDeviceGroupPresentModeFlagsKHR} value
* - Both of {@code device}, and {@code surface} must have been created, allocated, or retrieved from the same {@code VkInstance}
*
*
* Host Synchronization
*
*
* - Host access to {@code surface} must be externally synchronized
*
*
* 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}
*
*
*
* @param device the logical device.
* @param surface the surface.
* @param pModes a pointer to a {@code VkDeviceGroupPresentModeFlagsKHR} in which the supported device group present modes for the surface are returned.
*/
@NativeType("VkResult")
public static int vkGetDeviceGroupSurfacePresentModesKHR(VkDevice device, @NativeType("VkSurfaceKHR") long surface, @NativeType("VkDeviceGroupPresentModeFlagsKHR *") IntBuffer pModes) {
if (CHECKS) {
check(pModes, 1);
}
return nvkGetDeviceGroupSurfacePresentModesKHR(device, surface, memAddress(pModes));
}
// --- [ vkGetPhysicalDevicePresentRectanglesKHR ] ---
/**
* Unsafe version of: {@link #vkGetPhysicalDevicePresentRectanglesKHR GetPhysicalDevicePresentRectanglesKHR}
*
* @param pRectCount a pointer to an integer related to the number of rectangles available or queried, as described below.
*/
public static int nvkGetPhysicalDevicePresentRectanglesKHR(VkPhysicalDevice physicalDevice, long surface, long pRectCount, long pRects) {
long __functionAddress = physicalDevice.getCapabilities().vkGetPhysicalDevicePresentRectanglesKHR;
if (CHECKS) {
check(__functionAddress);
}
return callPJPPI(physicalDevice.address(), surface, pRectCount, pRects, __functionAddress);
}
/**
* Query present rectangles for a surface on a physical device.
*
* C Specification
*
* When using {@link #VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_MULTI_DEVICE_BIT_KHR DEVICE_GROUP_PRESENT_MODE_LOCAL_MULTI_DEVICE_BIT_KHR}, the application may need to know which regions of the surface are used when presenting locally on each physical device. Presentation of swapchain images to this surface need only have valid contents in the regions returned by this command.
*
* To query a set of rectangles used in presentation on the physical device, call:
*
*
* VkResult vkGetPhysicalDevicePresentRectanglesKHR(
* VkPhysicalDevice physicalDevice,
* VkSurfaceKHR surface,
* uint32_t* pRectCount,
* VkRect2D* pRects);
*
* Description
*
* If {@code pRects} is {@code NULL}, then the number of rectangles used when presenting the given {@code surface} is returned in {@code pRectCount}. Otherwise, {@code pRectCount} must point to a variable set by the user to the number of elements in the {@code pRects} array, and on return the variable is overwritten with the number of structures actually written to {@code pRects}. If the value of {@code pRectCount} is less than the number of rectangles, at most {@code pRectCount} structures will be written, and {@link VK10#VK_INCOMPLETE INCOMPLETE} will be returned instead of {@link VK10#VK_SUCCESS SUCCESS}, to indicate that not all the available rectangles 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
*
*
* - {@code surface} must be supported by {@code physicalDevice}, as reported by {@link KHRSurface#vkGetPhysicalDeviceSurfaceSupportKHR GetPhysicalDeviceSurfaceSupportKHR} or an equivalent platform-specific mechanism
*
*
* Valid Usage (Implicit)
*
*
* - {@code physicalDevice} must be a valid {@code VkPhysicalDevice} handle
* - {@code surface} must be a valid {@code VkSurfaceKHR} handle
* - {@code pRectCount} must be a valid pointer to a {@code uint32_t} value
* - If the value referenced by {@code pRectCount} is not 0, and {@code pRects} is not {@code NULL}, {@code pRects} must be a valid pointer to an array of {@code pRectCount} {@link VkRect2D} structures
* - Both of {@code physicalDevice}, and {@code surface} must have been created, allocated, or retrieved from the same {@code VkInstance}
*
*
* Host Synchronization
*
*
* - Host access to {@code surface} must be externally synchronized
*
*
* Return Codes
*
*
* - On success, this command returns
*
* - {@link VK10#VK_SUCCESS SUCCESS}
* - {@link VK10#VK_INCOMPLETE INCOMPLETE}
*
* - 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}
*
*
*
* See Also
*
* {@link VkRect2D}
*
* @param physicalDevice the physical device.
* @param surface the surface.
* @param pRectCount a pointer to an integer related to the number of rectangles available or queried, as described below.
* @param pRects either {@code NULL} or a pointer to an array of {@link VkRect2D} structures.
*/
@NativeType("VkResult")
public static int vkGetPhysicalDevicePresentRectanglesKHR(VkPhysicalDevice physicalDevice, @NativeType("VkSurfaceKHR") long surface, @NativeType("uint32_t *") IntBuffer pRectCount, @Nullable @NativeType("VkRect2D *") VkRect2D.Buffer pRects) {
if (CHECKS) {
check(pRectCount, 1);
checkSafe(pRects, pRectCount.get(pRectCount.position()));
}
return nvkGetPhysicalDevicePresentRectanglesKHR(physicalDevice, surface, memAddress(pRectCount), memAddressSafe(pRects));
}
// --- [ vkAcquireNextImage2KHR ] ---
/** Unsafe version of: {@link #vkAcquireNextImage2KHR AcquireNextImage2KHR} */
public static int nvkAcquireNextImage2KHR(VkDevice device, long pAcquireInfo, long pImageIndex) {
long __functionAddress = device.getCapabilities().vkAcquireNextImage2KHR;
if (CHECKS) {
check(__functionAddress);
}
return callPPPI(device.address(), pAcquireInfo, pImageIndex, __functionAddress);
}
/**
* Retrieve the index of the next available presentable image.
*
* C Specification
*
* To acquire an available presentable image to use, and retrieve the index of that image, call:
*
*
* VkResult vkAcquireNextImage2KHR(
* VkDevice device,
* const VkAcquireNextImageInfoKHR* pAcquireInfo,
* uint32_t* pImageIndex);
*
* Valid Usage
*
*
* - If the number of currently acquired images is greater than the difference between the number of images in the {@code swapchain} member of {@code pAcquireInfo} and the value of {@link VkSurfaceCapabilitiesKHR}{@code ::minImageCount} as returned by a call to {@link KHRGetSurfaceCapabilities2#vkGetPhysicalDeviceSurfaceCapabilities2KHR GetPhysicalDeviceSurfaceCapabilities2KHR} with the {@code surface} used to create {@code swapchain}, the {@code timeout} member of {@code pAcquireInfo} must not be {@code UINT64_MAX}
*
*
* Valid Usage (Implicit)
*
*
* - {@code device} must be a valid {@code VkDevice} handle
* - {@code pAcquireInfo} must be a valid pointer to a valid {@link VkAcquireNextImageInfoKHR} structure
* - {@code pImageIndex} must be a valid pointer to a {@code uint32_t} value
*
*
* Return Codes
*
*
* - On success, this command returns
*
* - {@link VK10#VK_SUCCESS SUCCESS}
* - {@link VK10#VK_TIMEOUT TIMEOUT}
* - {@link VK10#VK_NOT_READY NOT_READY}
* - {@link #VK_SUBOPTIMAL_KHR SUBOPTIMAL_KHR}
*
* - 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 VK10#VK_ERROR_DEVICE_LOST ERROR_DEVICE_LOST}
* - {@link #VK_ERROR_OUT_OF_DATE_KHR ERROR_OUT_OF_DATE_KHR}
* - {@link KHRSurface#VK_ERROR_SURFACE_LOST_KHR ERROR_SURFACE_LOST_KHR}
* - {@link EXTFullScreenExclusive#VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT}
*
*
*
* See Also
*
* {@link VkAcquireNextImageInfoKHR}
*
* @param device the device associated with {@code swapchain}.
* @param pAcquireInfo a pointer to a {@link VkAcquireNextImageInfoKHR} structure containing parameters of the acquire.
* @param pImageIndex a pointer to a {@code uint32_t} that is set to the index of the next image to use.
*/
@NativeType("VkResult")
public static int vkAcquireNextImage2KHR(VkDevice device, @NativeType("VkAcquireNextImageInfoKHR const *") VkAcquireNextImageInfoKHR pAcquireInfo, @NativeType("uint32_t *") IntBuffer pImageIndex) {
if (CHECKS) {
check(pImageIndex, 1);
}
return nvkAcquireNextImage2KHR(device, pAcquireInfo.address(), memAddress(pImageIndex));
}
/** Array version of: {@link #vkCreateSwapchainKHR CreateSwapchainKHR} */
@NativeType("VkResult")
public static int vkCreateSwapchainKHR(VkDevice device, @NativeType("VkSwapchainCreateInfoKHR const *") VkSwapchainCreateInfoKHR pCreateInfo, @Nullable @NativeType("VkAllocationCallbacks const *") VkAllocationCallbacks pAllocator, @NativeType("VkSwapchainKHR *") long[] pSwapchain) {
long __functionAddress = device.getCapabilities().vkCreateSwapchainKHR;
if (CHECKS) {
check(__functionAddress);
check(pSwapchain, 1);
if (pAllocator != null) { VkAllocationCallbacks.validate(pAllocator.address()); }
}
return callPPPPI(device.address(), pCreateInfo.address(), memAddressSafe(pAllocator), pSwapchain, __functionAddress);
}
/** Array version of: {@link #vkGetSwapchainImagesKHR GetSwapchainImagesKHR} */
@NativeType("VkResult")
public static int vkGetSwapchainImagesKHR(VkDevice device, @NativeType("VkSwapchainKHR") long swapchain, @NativeType("uint32_t *") int[] pSwapchainImageCount, @Nullable @NativeType("VkImage *") long[] pSwapchainImages) {
long __functionAddress = device.getCapabilities().vkGetSwapchainImagesKHR;
if (CHECKS) {
check(__functionAddress);
check(pSwapchainImageCount, 1);
checkSafe(pSwapchainImages, pSwapchainImageCount[0]);
}
return callPJPPI(device.address(), swapchain, pSwapchainImageCount, pSwapchainImages, __functionAddress);
}
/** Array version of: {@link #vkAcquireNextImageKHR AcquireNextImageKHR} */
@NativeType("VkResult")
public static int vkAcquireNextImageKHR(VkDevice device, @NativeType("VkSwapchainKHR") long swapchain, @NativeType("uint64_t") long timeout, @NativeType("VkSemaphore") long semaphore, @NativeType("VkFence") long fence, @NativeType("uint32_t *") int[] pImageIndex) {
long __functionAddress = device.getCapabilities().vkAcquireNextImageKHR;
if (CHECKS) {
check(__functionAddress);
check(pImageIndex, 1);
}
return callPJJJJPI(device.address(), swapchain, timeout, semaphore, fence, pImageIndex, __functionAddress);
}
/** Array version of: {@link #vkGetDeviceGroupSurfacePresentModesKHR GetDeviceGroupSurfacePresentModesKHR} */
@NativeType("VkResult")
public static int vkGetDeviceGroupSurfacePresentModesKHR(VkDevice device, @NativeType("VkSurfaceKHR") long surface, @NativeType("VkDeviceGroupPresentModeFlagsKHR *") int[] pModes) {
long __functionAddress = device.getCapabilities().vkGetDeviceGroupSurfacePresentModesKHR;
if (CHECKS) {
check(__functionAddress);
check(pModes, 1);
}
return callPJPI(device.address(), surface, pModes, __functionAddress);
}
/** Array version of: {@link #vkGetPhysicalDevicePresentRectanglesKHR GetPhysicalDevicePresentRectanglesKHR} */
@NativeType("VkResult")
public static int vkGetPhysicalDevicePresentRectanglesKHR(VkPhysicalDevice physicalDevice, @NativeType("VkSurfaceKHR") long surface, @NativeType("uint32_t *") int[] pRectCount, @Nullable @NativeType("VkRect2D *") VkRect2D.Buffer pRects) {
long __functionAddress = physicalDevice.getCapabilities().vkGetPhysicalDevicePresentRectanglesKHR;
if (CHECKS) {
check(__functionAddress);
check(pRectCount, 1);
checkSafe(pRects, pRectCount[0]);
}
return callPJPPI(physicalDevice.address(), surface, pRectCount, memAddressSafe(pRects), __functionAddress);
}
/** Array version of: {@link #vkAcquireNextImage2KHR AcquireNextImage2KHR} */
@NativeType("VkResult")
public static int vkAcquireNextImage2KHR(VkDevice device, @NativeType("VkAcquireNextImageInfoKHR const *") VkAcquireNextImageInfoKHR pAcquireInfo, @NativeType("uint32_t *") int[] pImageIndex) {
long __functionAddress = device.getCapabilities().vkAcquireNextImage2KHR;
if (CHECKS) {
check(__functionAddress);
check(pImageIndex, 1);
}
return callPPPI(device.address(), pAcquireInfo.address(), pImageIndex, __functionAddress);
}
}