Package org.lwjgl.vulkan
Class VkImportMemoryFdInfoKHR
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.vulkan.VkImportMemoryFdInfoKHR
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class VkImportMemoryFdInfoKHR extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceImport memory created on the same physical device from a file descriptor.Description
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. The imported memory object holds a reference to its payload.
Applications can import the same payload 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
VkDeviceMemoryobject.Valid Usage
- If
handleTypeis not 0, it must be supported for import, as reported byVkExternalImageFormatPropertiesorVkExternalBufferProperties - The memory from which
fdwas exported must have been created on the same underlying physical device asdevice - If
handleTypeis not 0, it must beEXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BITorEXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT - If
handleTypeis not 0,fdmust be a valid handle of the type specified byhandleType - The memory represented by
fdmust have been created from a physical device and driver that is compatible withdeviceandhandleType, as described in External memory handle types compatibility fdmust obey any requirements listed forhandleTypein external memory handle types compatibility
Valid Usage (Implicit)
sTypemust beSTRUCTURE_TYPE_IMPORT_MEMORY_FD_INFO_KHR- If
handleTypeis not 0,handleTypemust be a validVkExternalMemoryHandleTypeFlagBitsvalue
Layout
struct VkImportMemoryFdInfoKHR { VkStructureTypesType(); void const *pNext(); VkExternalMemoryHandleTypeFlagBitshandleType(); intfd(); }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classVkImportMemoryFdInfoKHR.BufferAn array ofVkImportMemoryFdInfoKHRstructs.
-
Constructor Summary
Constructors Constructor Description VkImportMemoryFdInfoKHR(java.nio.ByteBuffer container)Creates aVkImportMemoryFdInfoKHRinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static VkImportMemoryFdInfoKHRcalloc()Returns a newVkImportMemoryFdInfoKHRinstance allocated withmemCalloc.static VkImportMemoryFdInfoKHR.Buffercalloc(int capacity)Returns a newVkImportMemoryFdInfoKHR.Bufferinstance allocated withmemCalloc.static VkImportMemoryFdInfoKHR.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkImportMemoryFdInfoKHR.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkImportMemoryFdInfoKHRcalloc(org.lwjgl.system.MemoryStack stack)Returns a newVkImportMemoryFdInfoKHRinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkImportMemoryFdInfoKHRcallocStack()Deprecated.static VkImportMemoryFdInfoKHR.BuffercallocStack(int capacity)Deprecated.static VkImportMemoryFdInfoKHR.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static VkImportMemoryFdInfoKHRcallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.static VkImportMemoryFdInfoKHRcreate()Returns a newVkImportMemoryFdInfoKHRinstance allocated withBufferUtils.static VkImportMemoryFdInfoKHR.Buffercreate(int capacity)Returns a newVkImportMemoryFdInfoKHR.Bufferinstance allocated withBufferUtils.static VkImportMemoryFdInfoKHRcreate(long address)Returns a newVkImportMemoryFdInfoKHRinstance for the specified memory address.static VkImportMemoryFdInfoKHR.Buffercreate(long address, int capacity)Create aVkImportMemoryFdInfoKHR.Bufferinstance at the specified memory.static VkImportMemoryFdInfoKHRcreateSafe(long address)static VkImportMemoryFdInfoKHR.BuffercreateSafe(long address, int capacity)intfd()the external handle to import.VkImportMemoryFdInfoKHRfd(int value)Sets the specified value to thefd()field.inthandleType()aVkExternalMemoryHandleTypeFlagBitsvalue specifying the handle type offd.VkImportMemoryFdInfoKHRhandleType(int value)Sets the specified value to thehandleType()field.static VkImportMemoryFdInfoKHRmalloc()Returns a newVkImportMemoryFdInfoKHRinstance allocated withmemAlloc.static VkImportMemoryFdInfoKHR.Buffermalloc(int capacity)Returns a newVkImportMemoryFdInfoKHR.Bufferinstance allocated withmemAlloc.static VkImportMemoryFdInfoKHR.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkImportMemoryFdInfoKHR.Bufferinstance allocated on the specifiedMemoryStack.static VkImportMemoryFdInfoKHRmalloc(org.lwjgl.system.MemoryStack stack)Returns a newVkImportMemoryFdInfoKHRinstance allocated on the specifiedMemoryStack.static VkImportMemoryFdInfoKHRmallocStack()Deprecated.static VkImportMemoryFdInfoKHR.BuffermallocStack(int capacity)Deprecated.static VkImportMemoryFdInfoKHR.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static VkImportMemoryFdInfoKHRmallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.static intnfd(long struct)Unsafe version offd().static voidnfd(long struct, int value)Unsafe version offd.static intnhandleType(long struct)Unsafe version ofhandleType().static voidnhandleType(long struct, int value)Unsafe version ofhandleType.static longnpNext(long struct)Unsafe version ofpNext().static voidnpNext(long struct, long value)Unsafe version ofpNext.static intnsType(long struct)Unsafe version ofsType().static voidnsType(long struct, int value)Unsafe version ofsType.longpNext()NULLor a pointer to a structure extending this structure.VkImportMemoryFdInfoKHRpNext(long value)Sets the specified value to thepNext()field.VkImportMemoryFdInfoKHRset(int sType, long pNext, int handleType, int fd)Initializes this struct with the specified values.VkImportMemoryFdInfoKHRset(VkImportMemoryFdInfoKHR src)Copies the specified struct data to this struct.intsizeof()intsType()the type of this structure.VkImportMemoryFdInfoKHRsType(int value)Sets the specified value to thesType()field.VkImportMemoryFdInfoKHRsType$Default()Sets theSTRUCTURE_TYPE_IMPORT_MEMORY_FD_INFO_KHRvalue to thesType()field.
-
-
-
Constructor Detail
-
VkImportMemoryFdInfoKHR
public VkImportMemoryFdInfoKHR(java.nio.ByteBuffer container)
Creates aVkImportMemoryFdInfoKHRinstance at the current position of the specifiedByteBuffercontainer. 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.
-
-
Method Detail
-
sizeof
public int sizeof()
- Specified by:
sizeofin classorg.lwjgl.system.Struct
-
sType
public int sType()
the type of this structure.
-
pNext
public long pNext()
NULLor a pointer to a structure extending this structure.
-
handleType
public int handleType()
aVkExternalMemoryHandleTypeFlagBitsvalue specifying the handle type offd.
-
fd
public int fd()
the external handle to import.
-
sType
public VkImportMemoryFdInfoKHR sType(int value)
Sets the specified value to thesType()field.
-
sType$Default
public VkImportMemoryFdInfoKHR sType$Default()
Sets theSTRUCTURE_TYPE_IMPORT_MEMORY_FD_INFO_KHRvalue to thesType()field.
-
pNext
public VkImportMemoryFdInfoKHR pNext(long value)
Sets the specified value to thepNext()field.
-
handleType
public VkImportMemoryFdInfoKHR handleType(int value)
Sets the specified value to thehandleType()field.
-
fd
public VkImportMemoryFdInfoKHR fd(int value)
Sets the specified value to thefd()field.
-
set
public VkImportMemoryFdInfoKHR set(int sType, long pNext, int handleType, int fd)
Initializes this struct with the specified values.
-
set
public VkImportMemoryFdInfoKHR set(VkImportMemoryFdInfoKHR src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static VkImportMemoryFdInfoKHR malloc()
Returns a newVkImportMemoryFdInfoKHRinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static VkImportMemoryFdInfoKHR calloc()
Returns a newVkImportMemoryFdInfoKHRinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static VkImportMemoryFdInfoKHR create()
Returns a newVkImportMemoryFdInfoKHRinstance allocated withBufferUtils.
-
create
public static VkImportMemoryFdInfoKHR create(long address)
Returns a newVkImportMemoryFdInfoKHRinstance for the specified memory address.
-
createSafe
@Nullable public static VkImportMemoryFdInfoKHR createSafe(long address)
-
malloc
public static VkImportMemoryFdInfoKHR.Buffer malloc(int capacity)
Returns a newVkImportMemoryFdInfoKHR.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static VkImportMemoryFdInfoKHR.Buffer calloc(int capacity)
Returns a newVkImportMemoryFdInfoKHR.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static VkImportMemoryFdInfoKHR.Buffer create(int capacity)
Returns a newVkImportMemoryFdInfoKHR.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static VkImportMemoryFdInfoKHR.Buffer create(long address, int capacity)
Create aVkImportMemoryFdInfoKHR.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static VkImportMemoryFdInfoKHR.Buffer createSafe(long address, int capacity)
-
mallocStack
@Deprecated public static VkImportMemoryFdInfoKHR mallocStack()
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static VkImportMemoryFdInfoKHR callocStack()
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static VkImportMemoryFdInfoKHR mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static VkImportMemoryFdInfoKHR callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static VkImportMemoryFdInfoKHR.Buffer mallocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static VkImportMemoryFdInfoKHR.Buffer callocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
mallocStack
@Deprecated public static VkImportMemoryFdInfoKHR.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static VkImportMemoryFdInfoKHR.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
malloc
public static VkImportMemoryFdInfoKHR malloc(org.lwjgl.system.MemoryStack stack)
Returns a newVkImportMemoryFdInfoKHRinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static VkImportMemoryFdInfoKHR calloc(org.lwjgl.system.MemoryStack stack)
Returns a newVkImportMemoryFdInfoKHRinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static VkImportMemoryFdInfoKHR.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkImportMemoryFdInfoKHR.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static VkImportMemoryFdInfoKHR.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkImportMemoryFdInfoKHR.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
nsType
public static int nsType(long struct)
Unsafe version ofsType().
-
npNext
public static long npNext(long struct)
Unsafe version ofpNext().
-
nhandleType
public static int nhandleType(long struct)
Unsafe version ofhandleType().
-
nfd
public static int nfd(long struct)
Unsafe version offd().
-
nsType
public static void nsType(long struct, int value)Unsafe version ofsType.
-
npNext
public static void npNext(long struct, long value)Unsafe version ofpNext.
-
nhandleType
public static void nhandleType(long struct, int value)Unsafe version ofhandleType.
-
nfd
public static void nfd(long struct, int value)Unsafe version offd.
-
-