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.
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
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 be defined as a POSIX file descriptor handle. - 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
Member documentation
sType– the type of this structure.pNext–NULLor a pointer to an extension-specific structure.handleType– specifies the handle type offd.fd– the external handle to import.
Layout
struct VkImportMemoryFdInfoKHR { VkStructureType sType; void const * pNext; VkExternalMemoryHandleTypeFlagBits handleType; int fd; }
-
-
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 Modifier and Type Method Description static VkImportMemoryFdInfoKHRcalloc()Returns a newVkImportMemoryFdInfoKHRinstance allocated withmemCalloc.static VkImportMemoryFdInfoKHR.Buffercalloc(int capacity)Returns a newVkImportMemoryFdInfoKHR.Bufferinstance allocated withmemCalloc.static VkImportMemoryFdInfoKHRcallocStack()Returns a newVkImportMemoryFdInfoKHRinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static VkImportMemoryFdInfoKHR.BuffercallocStack(int capacity)Returns a newVkImportMemoryFdInfoKHR.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static VkImportMemoryFdInfoKHR.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkImportMemoryFdInfoKHR.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkImportMemoryFdInfoKHRcallocStack(org.lwjgl.system.MemoryStack stack)Returns a newVkImportMemoryFdInfoKHRinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.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()Returns the value of thefdfield.VkImportMemoryFdInfoKHRfd(int value)Sets the specified value to thefdfield.inthandleType()Returns the value of thehandleTypefield.VkImportMemoryFdInfoKHRhandleType(int value)Sets the specified value to thehandleTypefield.static VkImportMemoryFdInfoKHRmalloc()Returns a newVkImportMemoryFdInfoKHRinstance allocated withmemAlloc.static VkImportMemoryFdInfoKHR.Buffermalloc(int capacity)Returns a newVkImportMemoryFdInfoKHR.Bufferinstance allocated withmemAlloc.static VkImportMemoryFdInfoKHRmallocStack()Returns a newVkImportMemoryFdInfoKHRinstance allocated on the thread-localMemoryStack.static VkImportMemoryFdInfoKHR.BuffermallocStack(int capacity)Returns a newVkImportMemoryFdInfoKHR.Bufferinstance allocated on the thread-localMemoryStack.static VkImportMemoryFdInfoKHR.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkImportMemoryFdInfoKHR.Bufferinstance allocated on the specifiedMemoryStack.static VkImportMemoryFdInfoKHRmallocStack(org.lwjgl.system.MemoryStack stack)Returns a newVkImportMemoryFdInfoKHRinstance allocated on the specifiedMemoryStack.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()Returns the value of thepNextfield.VkImportMemoryFdInfoKHRpNext(long value)Sets the specified value to thepNextfield.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()Returns the value of thesTypefield.VkImportMemoryFdInfoKHRsType(int value)Sets the specified value to thesTypefield.
-
-
-
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()
Returns the value of thesTypefield.
-
pNext
public long pNext()
Returns the value of thepNextfield.
-
handleType
public int handleType()
Returns the value of thehandleTypefield.
-
fd
public int fd()
Returns the value of thefdfield.
-
sType
public VkImportMemoryFdInfoKHR sType(int value)
Sets the specified value to thesTypefield.
-
pNext
public VkImportMemoryFdInfoKHR pNext(long value)
Sets the specified value to thepNextfield.
-
handleType
public VkImportMemoryFdInfoKHR handleType(int value)
Sets the specified value to thehandleTypefield.
-
fd
public VkImportMemoryFdInfoKHR fd(int value)
Sets the specified value to thefdfield.
-
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
public static VkImportMemoryFdInfoKHR mallocStack()
Returns a newVkImportMemoryFdInfoKHRinstance allocated on the thread-localMemoryStack.
-
callocStack
public static VkImportMemoryFdInfoKHR callocStack()
Returns a newVkImportMemoryFdInfoKHRinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static VkImportMemoryFdInfoKHR mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkImportMemoryFdInfoKHRinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static VkImportMemoryFdInfoKHR callocStack(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
-
mallocStack
public static VkImportMemoryFdInfoKHR.Buffer mallocStack(int capacity)
Returns a newVkImportMemoryFdInfoKHR.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static VkImportMemoryFdInfoKHR.Buffer callocStack(int capacity)
Returns a newVkImportMemoryFdInfoKHR.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacity
-
mallocStack
public static VkImportMemoryFdInfoKHR.Buffer mallocStack(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
-
callocStack
public static VkImportMemoryFdInfoKHR.Buffer callocStack(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.
-
-