public class VkImportMemoryHostPointerInfoEXT
extends org.lwjgl.system.Struct
implements org.lwjgl.system.NativeResource
Importing memory from a host pointer shares ownership of the memory between the host and the Vulkan implementation. The application can continue to access the memory through the host pointer but it is the application's responsibility to synchronize device and non-device access to the underlying memory as defined in Host Access to Device Memory Objects.
Applications can import the same underlying memory into multiple instances of Vulkan and multiple times into a given Vulkan instance. However, implementations may fail to import the same underlying memory multiple times into a given physical device due to platform constraints.
Importing memory from a particular host pointer may not be possible due to additional platform-specific restrictions beyond the scope of this specification in which case the implementation must fail the memory import operation with the error code ERROR_INVALID_EXTERNAL_HANDLE_KHR.
The application must ensure that the imported memory range remains valid and accessible for the lifetime of the imported memory object.
handleType is not 0, it must be supported for import, as reported in VkExternalMemoryPropertieshandleType is not 0, it must be EXTERNAL_MEMORY_HANDLE_TYPE_HOST_ALLOCATION_BIT_EXT or EXTERNAL_MEMORY_HANDLE_TYPE_HOST_MAPPED_FOREIGN_MEMORY_BIT_EXTpHostPointer must be a pointer aligned to an integer multiple of VkPhysicalDeviceExternalMemoryHostPropertiesEXT::minImportedHostPointerAlignmenthandleType is EXTERNAL_MEMORY_HANDLE_TYPE_HOST_ALLOCATION_BIT_EXT, pHostPointer must be a pointer to allocationSize number of bytes of host memory, where allocationSize is the member of the VkMemoryAllocateInfo structure this structure is chained tohandleType is EXTERNAL_MEMORY_HANDLE_TYPE_HOST_MAPPED_FOREIGN_MEMORY_BIT_EXT, pHostPointer must be a pointer to allocationSize number of bytes of host mapped foreign memory, where allocationSize is the member of the VkMemoryAllocateInfo structure this structure is chained tosType must be STRUCTURE_TYPE_IMPORT_MEMORY_HOST_POINTER_INFO_EXThandleType must be a valid VkExternalMemoryHandleTypeFlagBits valuesType – the type of this structure.pNext – NULL or a pointer to an extension-specific structure.handleType – specifies the handle type.pHostPointer – the host pointer to import from.
struct VkImportMemoryHostPointerInfoEXT {
VkStructureType sType;
void const * pNext;
VkExternalMemoryHandleTypeFlagBits handleType;
void * pHostPointer;
}| Modifier and Type | Class and Description |
|---|---|
static class |
VkImportMemoryHostPointerInfoEXT.Buffer
An array of
VkImportMemoryHostPointerInfoEXT structs. |
| Modifier and Type | Field and Description |
|---|---|
static int |
ALIGNOF
The struct alignment in bytes.
|
static int |
HANDLETYPE
The struct member offsets.
|
static int |
PHOSTPOINTER
The struct member offsets.
|
static int |
PNEXT
The struct member offsets.
|
static int |
SIZEOF
The struct size in bytes.
|
static int |
STYPE
The struct member offsets.
|
| Constructor and Description |
|---|
VkImportMemoryHostPointerInfoEXT(java.nio.ByteBuffer container)
Creates a
VkImportMemoryHostPointerInfoEXT instance at the current position of the specified ByteBuffer container. |
| Modifier and Type | Method and Description |
|---|---|
static VkImportMemoryHostPointerInfoEXT |
calloc()
Returns a new
VkImportMemoryHostPointerInfoEXT instance allocated with memCalloc. |
static VkImportMemoryHostPointerInfoEXT.Buffer |
calloc(int capacity)
Returns a new
VkImportMemoryHostPointerInfoEXT.Buffer instance allocated with memCalloc. |
static VkImportMemoryHostPointerInfoEXT |
callocStack()
Returns a new
VkImportMemoryHostPointerInfoEXT instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static VkImportMemoryHostPointerInfoEXT.Buffer |
callocStack(int capacity)
Returns a new
VkImportMemoryHostPointerInfoEXT.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static VkImportMemoryHostPointerInfoEXT.Buffer |
callocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
VkImportMemoryHostPointerInfoEXT.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static VkImportMemoryHostPointerInfoEXT |
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
VkImportMemoryHostPointerInfoEXT instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static VkImportMemoryHostPointerInfoEXT |
create()
Returns a new
VkImportMemoryHostPointerInfoEXT instance allocated with BufferUtils. |
static VkImportMemoryHostPointerInfoEXT.Buffer |
create(int capacity)
Returns a new
VkImportMemoryHostPointerInfoEXT.Buffer instance allocated with BufferUtils. |
static VkImportMemoryHostPointerInfoEXT |
create(long address)
Returns a new
VkImportMemoryHostPointerInfoEXT instance for the specified memory address. |
static VkImportMemoryHostPointerInfoEXT.Buffer |
create(long address,
int capacity)
Create a
VkImportMemoryHostPointerInfoEXT.Buffer instance at the specified memory. |
static VkImportMemoryHostPointerInfoEXT |
createSafe(long address)
|
static VkImportMemoryHostPointerInfoEXT.Buffer |
createSafe(long address,
int capacity)
|
int |
handleType()
Returns the value of the
handleType field. |
VkImportMemoryHostPointerInfoEXT |
handleType(int value)
Sets the specified value to the
handleType field. |
static VkImportMemoryHostPointerInfoEXT |
malloc()
Returns a new
VkImportMemoryHostPointerInfoEXT instance allocated with memAlloc. |
static VkImportMemoryHostPointerInfoEXT.Buffer |
malloc(int capacity)
Returns a new
VkImportMemoryHostPointerInfoEXT.Buffer instance allocated with memAlloc. |
static VkImportMemoryHostPointerInfoEXT |
mallocStack()
Returns a new
VkImportMemoryHostPointerInfoEXT instance allocated on the thread-local MemoryStack. |
static VkImportMemoryHostPointerInfoEXT.Buffer |
mallocStack(int capacity)
Returns a new
VkImportMemoryHostPointerInfoEXT.Buffer instance allocated on the thread-local MemoryStack. |
static VkImportMemoryHostPointerInfoEXT.Buffer |
mallocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
VkImportMemoryHostPointerInfoEXT.Buffer instance allocated on the specified MemoryStack. |
static VkImportMemoryHostPointerInfoEXT |
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
VkImportMemoryHostPointerInfoEXT instance allocated on the specified MemoryStack. |
static int |
nhandleType(long struct)
Unsafe version of
handleType(). |
static void |
nhandleType(long struct,
int value)
Unsafe version of
handleType. |
static long |
npHostPointer(long struct)
Unsafe version of
pHostPointer(). |
static void |
npHostPointer(long struct,
long value)
Unsafe version of
pHostPointer. |
static long |
npNext(long struct)
Unsafe version of
pNext(). |
static void |
npNext(long struct,
long value)
Unsafe version of
pNext. |
static int |
nsType(long struct)
Unsafe version of
sType(). |
static void |
nsType(long struct,
int value)
Unsafe version of
sType. |
long |
pHostPointer()
Returns the value of the
pHostPointer field. |
VkImportMemoryHostPointerInfoEXT |
pHostPointer(long value)
Sets the specified value to the
pHostPointer field. |
long |
pNext()
Returns the value of the
pNext field. |
VkImportMemoryHostPointerInfoEXT |
pNext(long value)
Sets the specified value to the
pNext field. |
VkImportMemoryHostPointerInfoEXT |
set(int sType,
long pNext,
int handleType,
long pHostPointer)
Initializes this struct with the specified values.
|
VkImportMemoryHostPointerInfoEXT |
set(VkImportMemoryHostPointerInfoEXT src)
Copies the specified struct data to this struct.
|
int |
sizeof() |
int |
sType()
Returns the value of the
sType field. |
VkImportMemoryHostPointerInfoEXT |
sType(int value)
Sets the specified value to the
sType field. |
public static final int SIZEOF
public static final int ALIGNOF
public static final int STYPE
public static final int PNEXT
public static final int HANDLETYPE
public static final int PHOSTPOINTER
public VkImportMemoryHostPointerInfoEXT(java.nio.ByteBuffer container)
VkImportMemoryHostPointerInfoEXT instance at the current position of the specified ByteBuffer container. Changes to the buffer's content will be
visible to the struct instance and vice versa.
The created instance holds a strong reference to the container object.
public int sizeof()
sizeof in class org.lwjgl.system.Structpublic int sType()
sType field.public long pNext()
pNext field.public int handleType()
handleType field.public long pHostPointer()
pHostPointer field.public VkImportMemoryHostPointerInfoEXT sType(int value)
sType field.public VkImportMemoryHostPointerInfoEXT pNext(long value)
pNext field.public VkImportMemoryHostPointerInfoEXT handleType(int value)
handleType field.public VkImportMemoryHostPointerInfoEXT pHostPointer(long value)
pHostPointer field.public VkImportMemoryHostPointerInfoEXT set(int sType, long pNext, int handleType, long pHostPointer)
public VkImportMemoryHostPointerInfoEXT set(VkImportMemoryHostPointerInfoEXT src)
src - the source structpublic static VkImportMemoryHostPointerInfoEXT malloc()
VkImportMemoryHostPointerInfoEXT instance allocated with memAlloc. The instance must be explicitly freed.public static VkImportMemoryHostPointerInfoEXT calloc()
VkImportMemoryHostPointerInfoEXT instance allocated with memCalloc. The instance must be explicitly freed.public static VkImportMemoryHostPointerInfoEXT create()
VkImportMemoryHostPointerInfoEXT instance allocated with BufferUtils.public static VkImportMemoryHostPointerInfoEXT create(long address)
VkImportMemoryHostPointerInfoEXT instance for the specified memory address.@Nullable public static VkImportMemoryHostPointerInfoEXT createSafe(long address)
public static VkImportMemoryHostPointerInfoEXT.Buffer malloc(int capacity)
VkImportMemoryHostPointerInfoEXT.Buffer instance allocated with memAlloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static VkImportMemoryHostPointerInfoEXT.Buffer calloc(int capacity)
VkImportMemoryHostPointerInfoEXT.Buffer instance allocated with memCalloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static VkImportMemoryHostPointerInfoEXT.Buffer create(int capacity)
VkImportMemoryHostPointerInfoEXT.Buffer instance allocated with BufferUtils.capacity - the buffer capacitypublic static VkImportMemoryHostPointerInfoEXT.Buffer create(long address, int capacity)
VkImportMemoryHostPointerInfoEXT.Buffer instance at the specified memory.address - the memory addresscapacity - the buffer capacity@Nullable public static VkImportMemoryHostPointerInfoEXT.Buffer createSafe(long address, int capacity)
public static VkImportMemoryHostPointerInfoEXT mallocStack()
VkImportMemoryHostPointerInfoEXT instance allocated on the thread-local MemoryStack.public static VkImportMemoryHostPointerInfoEXT callocStack()
VkImportMemoryHostPointerInfoEXT instance allocated on the thread-local MemoryStack and initializes all its bits to zero.public static VkImportMemoryHostPointerInfoEXT mallocStack(org.lwjgl.system.MemoryStack stack)
VkImportMemoryHostPointerInfoEXT instance allocated on the specified MemoryStack.stack - the stack from which to allocatepublic static VkImportMemoryHostPointerInfoEXT callocStack(org.lwjgl.system.MemoryStack stack)
VkImportMemoryHostPointerInfoEXT instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatepublic static VkImportMemoryHostPointerInfoEXT.Buffer mallocStack(int capacity)
VkImportMemoryHostPointerInfoEXT.Buffer instance allocated on the thread-local MemoryStack.capacity - the buffer capacitypublic static VkImportMemoryHostPointerInfoEXT.Buffer callocStack(int capacity)
VkImportMemoryHostPointerInfoEXT.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.capacity - the buffer capacitypublic static VkImportMemoryHostPointerInfoEXT.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
VkImportMemoryHostPointerInfoEXT.Buffer instance allocated on the specified MemoryStack.stack - the stack from which to allocatecapacity - the buffer capacitypublic static VkImportMemoryHostPointerInfoEXT.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
VkImportMemoryHostPointerInfoEXT.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatecapacity - the buffer capacitypublic static int nsType(long struct)
sType().public static long npNext(long struct)
pNext().public static int nhandleType(long struct)
handleType().public static long npHostPointer(long struct)
pHostPointer().public static void nsType(long struct,
int value)
sType.public static void npNext(long struct,
long value)
pNext.public static void nhandleType(long struct,
int value)
handleType.public static void npHostPointer(long struct,
long value)
pHostPointer.Copyright LWJGL. All Rights Reserved. License terms.