org.lwjgl.vulkan.EXTExternalMemoryHost 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 enables an application to import host allocations and host mapped foreign device memory to Vulkan memory objects.
*
* VK_EXT_external_memory_host
*
*
* - Name String
* - {@code VK_EXT_external_memory_host}
* - Extension Type
* - Device extension
* - Registered Extension Number
* - 179
* - Revision
* - 1
* - Extension and Version Dependencies
*
* - Requires Vulkan 1.0
* - Requires {@link KHRExternalMemory VK_KHR_external_memory}
*
* - Contact
*
* - Daniel Rakos drakos-amd
*
*
*
* Other Extension Metadata
*
*
* - Last Modified Date
* - 2017-11-10
* - IP Status
* - No known IP claims.
* - Contributors
*
* - Jaakko Konttinen, AMD
* - David Mao, AMD
* - Daniel Rakos, AMD
* - Tobias Hector, Imagination Technologies
* - Jason Ekstrand, Intel
* - James Jones, NVIDIA
*
*
*/
public class EXTExternalMemoryHost {
/** The extension specification version. */
public static final int VK_EXT_EXTERNAL_MEMORY_HOST_SPEC_VERSION = 1;
/** The extension name. */
public static final String VK_EXT_EXTERNAL_MEMORY_HOST_EXTENSION_NAME = "VK_EXT_external_memory_host";
/**
* Extends {@code VkStructureType}.
*
* Enum values:
*
*
* - {@link #VK_STRUCTURE_TYPE_IMPORT_MEMORY_HOST_POINTER_INFO_EXT STRUCTURE_TYPE_IMPORT_MEMORY_HOST_POINTER_INFO_EXT}
* - {@link #VK_STRUCTURE_TYPE_MEMORY_HOST_POINTER_PROPERTIES_EXT STRUCTURE_TYPE_MEMORY_HOST_POINTER_PROPERTIES_EXT}
* - {@link #VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_MEMORY_HOST_PROPERTIES_EXT STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_MEMORY_HOST_PROPERTIES_EXT}
*
*/
public static final int
VK_STRUCTURE_TYPE_IMPORT_MEMORY_HOST_POINTER_INFO_EXT = 1000178000,
VK_STRUCTURE_TYPE_MEMORY_HOST_POINTER_PROPERTIES_EXT = 1000178001,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_MEMORY_HOST_PROPERTIES_EXT = 1000178002;
/**
* Extends {@code VkExternalMemoryHandleTypeFlagBits}.
*
* Enum values:
*
*
* - {@link #VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_ALLOCATION_BIT_EXT EXTERNAL_MEMORY_HANDLE_TYPE_HOST_ALLOCATION_BIT_EXT}
* - {@link #VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_MAPPED_FOREIGN_MEMORY_BIT_EXT EXTERNAL_MEMORY_HANDLE_TYPE_HOST_MAPPED_FOREIGN_MEMORY_BIT_EXT}
*
*/
public static final int
VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_ALLOCATION_BIT_EXT = 0x80,
VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_MAPPED_FOREIGN_MEMORY_BIT_EXT = 0x100;
protected EXTExternalMemoryHost() {
throw new UnsupportedOperationException();
}
// --- [ vkGetMemoryHostPointerPropertiesEXT ] ---
/** Unsafe version of: {@link #vkGetMemoryHostPointerPropertiesEXT GetMemoryHostPointerPropertiesEXT} */
public static int nvkGetMemoryHostPointerPropertiesEXT(VkDevice device, int handleType, long pHostPointer, long pMemoryHostPointerProperties) {
long __functionAddress = device.getCapabilities().vkGetMemoryHostPointerPropertiesEXT;
if (CHECKS) {
check(__functionAddress);
check(pHostPointer);
}
return callPPPI(device.address(), handleType, pHostPointer, pMemoryHostPointerProperties, __functionAddress);
}
/**
* Get properties of external memory host pointer.
*
* C Specification
*
* To determine the correct parameters to use when importing host pointers, call:
*
*
* VkResult vkGetMemoryHostPointerPropertiesEXT(
* VkDevice device,
* VkExternalMemoryHandleTypeFlagBits handleType,
* const void* pHostPointer,
* VkMemoryHostPointerPropertiesEXT* pMemoryHostPointerProperties);
*
* Valid Usage
*
*
* - {@code handleType} must be {@link #VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_ALLOCATION_BIT_EXT EXTERNAL_MEMORY_HANDLE_TYPE_HOST_ALLOCATION_BIT_EXT} or {@link #VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_MAPPED_FOREIGN_MEMORY_BIT_EXT EXTERNAL_MEMORY_HANDLE_TYPE_HOST_MAPPED_FOREIGN_MEMORY_BIT_EXT}
* - {@code pHostPointer} must be a pointer aligned to an integer multiple of {@link VkPhysicalDeviceExternalMemoryHostPropertiesEXT}{@code ::minImportedHostPointerAlignment}
* - If {@code handleType} is {@link #VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_ALLOCATION_BIT_EXT EXTERNAL_MEMORY_HANDLE_TYPE_HOST_ALLOCATION_BIT_EXT}, {@code pHostPointer} must be a pointer to host memory
* - If {@code handleType} is {@link #VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_MAPPED_FOREIGN_MEMORY_BIT_EXT EXTERNAL_MEMORY_HANDLE_TYPE_HOST_MAPPED_FOREIGN_MEMORY_BIT_EXT}, {@code pHostPointer} must be a pointer to host mapped foreign memory
*
*
* Valid Usage (Implicit)
*
*
* - {@code device} must be a valid {@code VkDevice} handle
* - {@code handleType} must be a valid {@code VkExternalMemoryHandleTypeFlagBits} value
* - {@code pMemoryHostPointerProperties} must be a valid pointer to a {@link VkMemoryHostPointerPropertiesEXT} 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 VK11#VK_ERROR_INVALID_EXTERNAL_HANDLE ERROR_INVALID_EXTERNAL_HANDLE}
*
*
*
* See Also
*
* {@link VkMemoryHostPointerPropertiesEXT}
*
* @param device the logical device that will be importing {@code pHostPointer}.
* @param handleType a {@code VkExternalMemoryHandleTypeFlagBits} value specifying the type of the handle {@code pHostPointer}.
* @param pHostPointer the host pointer to import from.
* @param pMemoryHostPointerProperties a pointer to a {@link VkMemoryHostPointerPropertiesEXT} structure in which the host pointer properties are returned.
*/
@NativeType("VkResult")
public static int vkGetMemoryHostPointerPropertiesEXT(VkDevice device, @NativeType("VkExternalMemoryHandleTypeFlagBits") int handleType, @NativeType("void const *") long pHostPointer, @NativeType("VkMemoryHostPointerPropertiesEXT *") VkMemoryHostPointerPropertiesEXT pMemoryHostPointerProperties) {
return nvkGetMemoryHostPointerPropertiesEXT(device, handleType, pHostPointer, pMemoryHostPointerProperties.address());
}
}