Package org.lwjgl.vulkan
Class VkMemoryGetFdInfoKHR
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.vulkan.VkMemoryGetFdInfoKHR
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class VkMemoryGetFdInfoKHR extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceStructure describing a POSIX FD semaphore export operation.Description
The properties of the file descriptor exported depend on the value of
handleType. SeeVkExternalMemoryHandleTypeFlagBitsfor a description of the properties of the defined external memory handle types.Note
The size of the exported file may be larger than the size requested by
VkMemoryAllocateInfo::allocationSize. IfhandleTypeisEXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT, then the application can query the file's actual size with link:man:lseek(2)[lseek(2)].Valid Usage
handleTypemust have been included inVkExportMemoryAllocateInfo::handleTypeswhenmemorywas created.handleTypemust be defined as a POSIX file descriptor handle.
Valid Usage (Implicit)
sTypemust beSTRUCTURE_TYPE_MEMORY_GET_FD_INFO_KHRpNextmust beNULLmemorymust be a validVkDeviceMemoryhandlehandleTypemust be a validVkExternalMemoryHandleTypeFlagBitsvalue
See Also
Member documentation
sType– the type of this structure.pNext–NULLor a pointer to an extension-specific structure.memory– the memory object from which the handle will be exported.handleType– the type of handle requested.
Layout
struct VkMemoryGetFdInfoKHR { VkStructureType sType; void const * pNext; VkDeviceMemory memory; VkExternalMemoryHandleTypeFlagBits handleType; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classVkMemoryGetFdInfoKHR.BufferAn array ofVkMemoryGetFdInfoKHRstructs.
-
Constructor Summary
Constructors Constructor Description VkMemoryGetFdInfoKHR(java.nio.ByteBuffer container)Creates aVkMemoryGetFdInfoKHRinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static VkMemoryGetFdInfoKHRcalloc()Returns a newVkMemoryGetFdInfoKHRinstance allocated withmemCalloc.static VkMemoryGetFdInfoKHR.Buffercalloc(int capacity)Returns a newVkMemoryGetFdInfoKHR.Bufferinstance allocated withmemCalloc.static VkMemoryGetFdInfoKHRcallocStack()Returns a newVkMemoryGetFdInfoKHRinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static VkMemoryGetFdInfoKHR.BuffercallocStack(int capacity)Returns a newVkMemoryGetFdInfoKHR.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static VkMemoryGetFdInfoKHR.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkMemoryGetFdInfoKHR.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkMemoryGetFdInfoKHRcallocStack(org.lwjgl.system.MemoryStack stack)Returns a newVkMemoryGetFdInfoKHRinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkMemoryGetFdInfoKHRcreate()Returns a newVkMemoryGetFdInfoKHRinstance allocated withBufferUtils.static VkMemoryGetFdInfoKHR.Buffercreate(int capacity)Returns a newVkMemoryGetFdInfoKHR.Bufferinstance allocated withBufferUtils.static VkMemoryGetFdInfoKHRcreate(long address)Returns a newVkMemoryGetFdInfoKHRinstance for the specified memory address.static VkMemoryGetFdInfoKHR.Buffercreate(long address, int capacity)Create aVkMemoryGetFdInfoKHR.Bufferinstance at the specified memory.static VkMemoryGetFdInfoKHRcreateSafe(long address)static VkMemoryGetFdInfoKHR.BuffercreateSafe(long address, int capacity)inthandleType()Returns the value of thehandleTypefield.VkMemoryGetFdInfoKHRhandleType(int value)Sets the specified value to thehandleTypefield.static VkMemoryGetFdInfoKHRmalloc()Returns a newVkMemoryGetFdInfoKHRinstance allocated withmemAlloc.static VkMemoryGetFdInfoKHR.Buffermalloc(int capacity)Returns a newVkMemoryGetFdInfoKHR.Bufferinstance allocated withmemAlloc.static VkMemoryGetFdInfoKHRmallocStack()Returns a newVkMemoryGetFdInfoKHRinstance allocated on the thread-localMemoryStack.static VkMemoryGetFdInfoKHR.BuffermallocStack(int capacity)Returns a newVkMemoryGetFdInfoKHR.Bufferinstance allocated on the thread-localMemoryStack.static VkMemoryGetFdInfoKHR.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkMemoryGetFdInfoKHR.Bufferinstance allocated on the specifiedMemoryStack.static VkMemoryGetFdInfoKHRmallocStack(org.lwjgl.system.MemoryStack stack)Returns a newVkMemoryGetFdInfoKHRinstance allocated on the specifiedMemoryStack.longmemory()Returns the value of thememoryfield.VkMemoryGetFdInfoKHRmemory(long value)Sets the specified value to thememoryfield.static intnhandleType(long struct)Unsafe version ofhandleType().static voidnhandleType(long struct, int value)Unsafe version ofhandleType.static longnmemory(long struct)Unsafe version ofmemory().static voidnmemory(long struct, long value)Unsafe version ofmemory.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.VkMemoryGetFdInfoKHRpNext(long value)Sets the specified value to thepNextfield.VkMemoryGetFdInfoKHRset(int sType, long pNext, long memory, int handleType)Initializes this struct with the specified values.VkMemoryGetFdInfoKHRset(VkMemoryGetFdInfoKHR src)Copies the specified struct data to this struct.intsizeof()intsType()Returns the value of thesTypefield.VkMemoryGetFdInfoKHRsType(int value)Sets the specified value to thesTypefield.
-
-
-
Constructor Detail
-
VkMemoryGetFdInfoKHR
public VkMemoryGetFdInfoKHR(java.nio.ByteBuffer container)
Creates aVkMemoryGetFdInfoKHRinstance 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.
-
memory
public long memory()
Returns the value of thememoryfield.
-
handleType
public int handleType()
Returns the value of thehandleTypefield.
-
sType
public VkMemoryGetFdInfoKHR sType(int value)
Sets the specified value to thesTypefield.
-
pNext
public VkMemoryGetFdInfoKHR pNext(long value)
Sets the specified value to thepNextfield.
-
memory
public VkMemoryGetFdInfoKHR memory(long value)
Sets the specified value to thememoryfield.
-
handleType
public VkMemoryGetFdInfoKHR handleType(int value)
Sets the specified value to thehandleTypefield.
-
set
public VkMemoryGetFdInfoKHR set(int sType, long pNext, long memory, int handleType)
Initializes this struct with the specified values.
-
set
public VkMemoryGetFdInfoKHR set(VkMemoryGetFdInfoKHR src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static VkMemoryGetFdInfoKHR malloc()
Returns a newVkMemoryGetFdInfoKHRinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static VkMemoryGetFdInfoKHR calloc()
Returns a newVkMemoryGetFdInfoKHRinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static VkMemoryGetFdInfoKHR create()
Returns a newVkMemoryGetFdInfoKHRinstance allocated withBufferUtils.
-
create
public static VkMemoryGetFdInfoKHR create(long address)
Returns a newVkMemoryGetFdInfoKHRinstance for the specified memory address.
-
createSafe
@Nullable public static VkMemoryGetFdInfoKHR createSafe(long address)
-
malloc
public static VkMemoryGetFdInfoKHR.Buffer malloc(int capacity)
Returns a newVkMemoryGetFdInfoKHR.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static VkMemoryGetFdInfoKHR.Buffer calloc(int capacity)
Returns a newVkMemoryGetFdInfoKHR.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static VkMemoryGetFdInfoKHR.Buffer create(int capacity)
Returns a newVkMemoryGetFdInfoKHR.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static VkMemoryGetFdInfoKHR.Buffer create(long address, int capacity)
Create aVkMemoryGetFdInfoKHR.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static VkMemoryGetFdInfoKHR.Buffer createSafe(long address, int capacity)
-
mallocStack
public static VkMemoryGetFdInfoKHR mallocStack()
Returns a newVkMemoryGetFdInfoKHRinstance allocated on the thread-localMemoryStack.
-
callocStack
public static VkMemoryGetFdInfoKHR callocStack()
Returns a newVkMemoryGetFdInfoKHRinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static VkMemoryGetFdInfoKHR mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkMemoryGetFdInfoKHRinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static VkMemoryGetFdInfoKHR callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkMemoryGetFdInfoKHRinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
mallocStack
public static VkMemoryGetFdInfoKHR.Buffer mallocStack(int capacity)
Returns a newVkMemoryGetFdInfoKHR.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static VkMemoryGetFdInfoKHR.Buffer callocStack(int capacity)
Returns a newVkMemoryGetFdInfoKHR.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacity
-
mallocStack
public static VkMemoryGetFdInfoKHR.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkMemoryGetFdInfoKHR.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
callocStack
public static VkMemoryGetFdInfoKHR.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkMemoryGetFdInfoKHR.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().
-
nmemory
public static long nmemory(long struct)
Unsafe version ofmemory().
-
nhandleType
public static int nhandleType(long struct)
Unsafe version ofhandleType().
-
nsType
public static void nsType(long struct, int value)Unsafe version ofsType.
-
npNext
public static void npNext(long struct, long value)Unsafe version ofpNext.
-
nmemory
public static void nmemory(long struct, long value)Unsafe version ofmemory.
-
nhandleType
public static void nhandleType(long struct, int value)Unsafe version ofhandleType.
-
-