org.lwjgl.vulkan.KHRBindMemory2 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 extension provides versions of {@link VK10#vkBindBufferMemory BindBufferMemory} and {@link VK10#vkBindImageMemory BindImageMemory} that allow multiple bindings to be performed at once, and are extensible.
*
* This extension also introduces {@link #VK_IMAGE_CREATE_ALIAS_BIT_KHR IMAGE_CREATE_ALIAS_BIT_KHR}, which allows "{@code identical}" images that alias the same memory to interpret the contents consistently, even across image layout changes.
*
*
* - Name String
* - {@code VK_KHR_bind_memory2}
* - Extension Type
* - Device extension
* - Registered Extension Number
* - 158
* - Revision
* - 1
* - Extension and Version Dependencies
*
* - Requires Vulkan 1.0
*
* - Contact
*
* - Tobias Hector @tobias
*
* - Last Modified Date
* - 2017-05-19
* - IP Status
* - No known IP claims.
* - Contributors
*
* - Jeff Bolz, NVIDIA
* - Tobias Hector, Imagination Technologies
*
*
*/
public class KHRBindMemory2 {
/** The extension specification version. */
public static final int VK_KHR_BIND_MEMORY_2_SPEC_VERSION = 1;
/** The extension name. */
public static final String VK_KHR_BIND_MEMORY_2_EXTENSION_NAME = "VK_KHR_bind_memory2";
/**
* Extends {@code VkStructureType}.
*
* Enum values:
*
*
* - {@link #VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO_KHR STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO_KHR}
* - {@link #VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO_KHR STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO_KHR}
*
*/
public static final int
VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO_KHR = 1000157000,
VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO_KHR = 1000157001;
/** Extends {@code VkImageCreateFlagBits}. */
public static final int VK_IMAGE_CREATE_ALIAS_BIT_KHR = 0x400;
protected KHRBindMemory2() {
throw new UnsupportedOperationException();
}
static boolean isAvailable(VKCapabilitiesDevice caps) {
return checkFunctions(
caps.vkBindBufferMemory2KHR, caps.vkBindImageMemory2KHR
);
}
// --- [ vkBindBufferMemory2KHR ] ---
/**
* Unsafe version of: {@link #vkBindBufferMemory2KHR BindBufferMemory2KHR}
*
* @param bindInfoCount the number of elements in {@code pBindInfos}.
*/
public static int nvkBindBufferMemory2KHR(VkDevice device, int bindInfoCount, long pBindInfos) {
long __functionAddress = device.getCapabilities().vkBindBufferMemory2KHR;
if (CHECKS) {
check(__functionAddress);
}
return callPPI(__functionAddress, device.address(), bindInfoCount, pBindInfos);
}
/**
* Bind device memory to buffer objects.
*
* C Specification
*
* To attach memory to buffer objects for one or more buffers at a time, call:
*
*
* VkResult vkBindBufferMemory2KHR(
* VkDevice device,
* uint32_t bindInfoCount,
* const VkBindBufferMemoryInfoKHR* pBindInfos);
*
* Description
*
* On some implementations, it may be more efficient to batch memory bindings into a single command.
*
* Valid Usage (Implicit)
*
*
* - {@code device} must be a valid {@code VkDevice} handle
* - {@code pBindInfos} must be a valid pointer to an array of {@code bindInfoCount} valid {@link VkBindBufferMemoryInfoKHR} structures
* - {@code bindInfoCount} must be greater than 0
*
*
* 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 VkBindBufferMemoryInfoKHR}
*
* @param device the logical device that owns the buffers and memory.
* @param pBindInfos a pointer to an array of structures of type {@link VkBindBufferMemoryInfoKHR}, describing buffers and memory to bind.
*/
@NativeType("VkResult")
public static int vkBindBufferMemory2KHR(VkDevice device, @NativeType("const VkBindBufferMemoryInfoKHR *") VkBindBufferMemoryInfoKHR.Buffer pBindInfos) {
return nvkBindBufferMemory2KHR(device, pBindInfos.remaining(), pBindInfos.address());
}
// --- [ vkBindImageMemory2KHR ] ---
/**
* Unsafe version of: {@link #vkBindImageMemory2KHR BindImageMemory2KHR}
*
* @param bindInfoCount the number of elements in {@code pBindInfos}.
*/
public static int nvkBindImageMemory2KHR(VkDevice device, int bindInfoCount, long pBindInfos) {
long __functionAddress = device.getCapabilities().vkBindImageMemory2KHR;
if (CHECKS) {
check(__functionAddress);
}
return callPPI(__functionAddress, device.address(), bindInfoCount, pBindInfos);
}
/**
* Bind device memory to image objects.
*
* C Specification
*
* To attach memory to image objects for one or more images at a time, call:
*
*
* VkResult vkBindImageMemory2KHR(
* VkDevice device,
* uint32_t bindInfoCount,
* const VkBindImageMemoryInfoKHR* pBindInfos);
*
* Description
*
* On some implementations, it may be more efficient to batch memory bindings into a single command.
*
* Valid Usage (Implicit)
*
*
* - {@code device} must be a valid {@code VkDevice} handle
* - {@code pBindInfos} must be a valid pointer to an array of {@code bindInfoCount} valid {@link VkBindImageMemoryInfoKHR} structures
* - {@code bindInfoCount} must be greater than 0
*
*
* 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 VkBindImageMemoryInfoKHR}
*
* @param device the logical device that owns the images and memory.
* @param pBindInfos a pointer to an array of structures of type {@link VkBindImageMemoryInfoKHR}, describing images and memory to bind.
*/
@NativeType("VkResult")
public static int vkBindImageMemory2KHR(VkDevice device, @NativeType("const VkBindImageMemoryInfoKHR *") VkBindImageMemoryInfoKHR.Buffer pBindInfos) {
return nvkBindImageMemory2KHR(device, pBindInfos.remaining(), pBindInfos.address());
}
}