public class VkImportMemoryFdInfoKHR
extends org.lwjgl.system.Struct
implements org.lwjgl.system.NativeResource
Importing memory from a file descriptor transfers ownership of the file descriptor from the application to the Vulkan implementation. The application must not perform any operations on the file descriptor after a successful import.
Applications can import the same underlying memory into multiple instances of Vulkan, into the same instance from which it was exported, and multiple times into a given Vulkan instance. In all cases, each import operation must create a distinct VkDeviceMemory object.
handleType is not 0, it must be supported for import, as reported by VkExternalImageFormatProperties or VkExternalBufferProperties.fd was exported must have been created on the same underlying physical device as device.handleType is not 0, it must be defined as a POSIX file descriptor handle.handleType is not 0, fd must be a valid handle of the type specified by handleType.fd must have been created from a physical device and driver that is compatible with device and handleType, as described in External memory handle types compatibility.fd must obey any requirements listed for handleType in external memory handle types compatibility.sType must be STRUCTURE_TYPE_IMPORT_MEMORY_FD_INFO_KHRhandleType is not 0, handleType 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 of fd.fd – the external handle to import.
struct VkImportMemoryFdInfoKHR {
VkStructureType sType;
void const * pNext;
VkExternalMemoryHandleTypeFlagBits handleType;
int fd;
}| Modifier and Type | Class and Description |
|---|---|
static class |
VkImportMemoryFdInfoKHR.Buffer
An array of
VkImportMemoryFdInfoKHR structs. |
| Modifier and Type | Field and Description |
|---|---|
static int |
ALIGNOF
The struct alignment in bytes.
|
static int |
FD
The struct member offsets.
|
static int |
HANDLETYPE
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 |
|---|
VkImportMemoryFdInfoKHR(java.nio.ByteBuffer container)
Creates a
VkImportMemoryFdInfoKHR instance at the current position of the specified ByteBuffer container. |
| Modifier and Type | Method and Description |
|---|---|
static VkImportMemoryFdInfoKHR |
calloc()
Returns a new
VkImportMemoryFdInfoKHR instance allocated with memCalloc. |
static VkImportMemoryFdInfoKHR.Buffer |
calloc(int capacity)
Returns a new
VkImportMemoryFdInfoKHR.Buffer instance allocated with memCalloc. |
static VkImportMemoryFdInfoKHR |
callocStack()
Returns a new
VkImportMemoryFdInfoKHR instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static VkImportMemoryFdInfoKHR.Buffer |
callocStack(int capacity)
Returns a new
VkImportMemoryFdInfoKHR.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static VkImportMemoryFdInfoKHR.Buffer |
callocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
VkImportMemoryFdInfoKHR.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static VkImportMemoryFdInfoKHR |
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
VkImportMemoryFdInfoKHR instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static VkImportMemoryFdInfoKHR |
create()
Returns a new
VkImportMemoryFdInfoKHR instance allocated with BufferUtils. |
static VkImportMemoryFdInfoKHR.Buffer |
create(int capacity)
Returns a new
VkImportMemoryFdInfoKHR.Buffer instance allocated with BufferUtils. |
static VkImportMemoryFdInfoKHR |
create(long address)
Returns a new
VkImportMemoryFdInfoKHR instance for the specified memory address. |
static VkImportMemoryFdInfoKHR.Buffer |
create(long address,
int capacity)
Create a
VkImportMemoryFdInfoKHR.Buffer instance at the specified memory. |
static VkImportMemoryFdInfoKHR |
createSafe(long address)
|
static VkImportMemoryFdInfoKHR.Buffer |
createSafe(long address,
int capacity)
|
int |
fd()
Returns the value of the
fd field. |
VkImportMemoryFdInfoKHR |
fd(int value)
Sets the specified value to the
fd field. |
int |
handleType()
Returns the value of the
handleType field. |
VkImportMemoryFdInfoKHR |
handleType(int value)
Sets the specified value to the
handleType field. |
static VkImportMemoryFdInfoKHR |
malloc()
Returns a new
VkImportMemoryFdInfoKHR instance allocated with memAlloc. |
static VkImportMemoryFdInfoKHR.Buffer |
malloc(int capacity)
Returns a new
VkImportMemoryFdInfoKHR.Buffer instance allocated with memAlloc. |
static VkImportMemoryFdInfoKHR |
mallocStack()
Returns a new
VkImportMemoryFdInfoKHR instance allocated on the thread-local MemoryStack. |
static VkImportMemoryFdInfoKHR.Buffer |
mallocStack(int capacity)
Returns a new
VkImportMemoryFdInfoKHR.Buffer instance allocated on the thread-local MemoryStack. |
static VkImportMemoryFdInfoKHR.Buffer |
mallocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
VkImportMemoryFdInfoKHR.Buffer instance allocated on the specified MemoryStack. |
static VkImportMemoryFdInfoKHR |
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
VkImportMemoryFdInfoKHR instance allocated on the specified MemoryStack. |
static int |
nfd(long struct)
Unsafe version of
fd(). |
static void |
nfd(long struct,
int value)
Unsafe version of
fd. |
static int |
nhandleType(long struct)
Unsafe version of
handleType(). |
static void |
nhandleType(long struct,
int value)
Unsafe version of
handleType. |
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 |
pNext()
Returns the value of the
pNext field. |
VkImportMemoryFdInfoKHR |
pNext(long value)
Sets the specified value to the
pNext field. |
VkImportMemoryFdInfoKHR |
set(int sType,
long pNext,
int handleType,
int fd)
Initializes this struct with the specified values.
|
VkImportMemoryFdInfoKHR |
set(VkImportMemoryFdInfoKHR src)
Copies the specified struct data to this struct.
|
int |
sizeof() |
int |
sType()
Returns the value of the
sType field. |
VkImportMemoryFdInfoKHR |
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 FD
public VkImportMemoryFdInfoKHR(java.nio.ByteBuffer container)
VkImportMemoryFdInfoKHR 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 int fd()
fd field.public VkImportMemoryFdInfoKHR sType(int value)
sType field.public VkImportMemoryFdInfoKHR pNext(long value)
pNext field.public VkImportMemoryFdInfoKHR handleType(int value)
handleType field.public VkImportMemoryFdInfoKHR fd(int value)
fd field.public VkImportMemoryFdInfoKHR set(int sType, long pNext, int handleType, int fd)
public VkImportMemoryFdInfoKHR set(VkImportMemoryFdInfoKHR src)
src - the source structpublic static VkImportMemoryFdInfoKHR malloc()
VkImportMemoryFdInfoKHR instance allocated with memAlloc. The instance must be explicitly freed.public static VkImportMemoryFdInfoKHR calloc()
VkImportMemoryFdInfoKHR instance allocated with memCalloc. The instance must be explicitly freed.public static VkImportMemoryFdInfoKHR create()
VkImportMemoryFdInfoKHR instance allocated with BufferUtils.public static VkImportMemoryFdInfoKHR create(long address)
VkImportMemoryFdInfoKHR instance for the specified memory address.@Nullable public static VkImportMemoryFdInfoKHR createSafe(long address)
public static VkImportMemoryFdInfoKHR.Buffer malloc(int capacity)
VkImportMemoryFdInfoKHR.Buffer instance allocated with memAlloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static VkImportMemoryFdInfoKHR.Buffer calloc(int capacity)
VkImportMemoryFdInfoKHR.Buffer instance allocated with memCalloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static VkImportMemoryFdInfoKHR.Buffer create(int capacity)
VkImportMemoryFdInfoKHR.Buffer instance allocated with BufferUtils.capacity - the buffer capacitypublic static VkImportMemoryFdInfoKHR.Buffer create(long address, int capacity)
VkImportMemoryFdInfoKHR.Buffer instance at the specified memory.address - the memory addresscapacity - the buffer capacity@Nullable public static VkImportMemoryFdInfoKHR.Buffer createSafe(long address, int capacity)
public static VkImportMemoryFdInfoKHR mallocStack()
VkImportMemoryFdInfoKHR instance allocated on the thread-local MemoryStack.public static VkImportMemoryFdInfoKHR callocStack()
VkImportMemoryFdInfoKHR instance allocated on the thread-local MemoryStack and initializes all its bits to zero.public static VkImportMemoryFdInfoKHR mallocStack(org.lwjgl.system.MemoryStack stack)
VkImportMemoryFdInfoKHR instance allocated on the specified MemoryStack.stack - the stack from which to allocatepublic static VkImportMemoryFdInfoKHR callocStack(org.lwjgl.system.MemoryStack stack)
VkImportMemoryFdInfoKHR instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatepublic static VkImportMemoryFdInfoKHR.Buffer mallocStack(int capacity)
VkImportMemoryFdInfoKHR.Buffer instance allocated on the thread-local MemoryStack.capacity - the buffer capacitypublic static VkImportMemoryFdInfoKHR.Buffer callocStack(int capacity)
VkImportMemoryFdInfoKHR.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.capacity - the buffer capacitypublic static VkImportMemoryFdInfoKHR.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
VkImportMemoryFdInfoKHR.Buffer instance allocated on the specified MemoryStack.stack - the stack from which to allocatecapacity - the buffer capacitypublic static VkImportMemoryFdInfoKHR.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
VkImportMemoryFdInfoKHR.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 int nfd(long struct)
fd().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 nfd(long struct,
int value)
fd.Copyright LWJGL. All Rights Reserved. License terms.