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.NativeResource
Structure describing a POSIX FD semaphore export operation.Description
The properties of the file descriptor exported depend on the value of
handleType
. SeeVkExternalMemoryHandleTypeFlagBits
for 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. IfhandleType
isEXTERNAL_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
handleType
must have been included inVkExportMemoryAllocateInfo
::handleTypes
whenmemory
was created.handleType
must be defined as a POSIX file descriptor handle.
Valid Usage (Implicit)
sType
must beSTRUCTURE_TYPE_MEMORY_GET_FD_INFO_KHR
pNext
must beNULL
memory
must be a validVkDeviceMemory
handlehandleType
must be a validVkExternalMemoryHandleTypeFlagBits
value
See Also
Member documentation
sType
– the type of this structure.pNext
–NULL
or 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 class
VkMemoryGetFdInfoKHR.Buffer
An array ofVkMemoryGetFdInfoKHR
structs.
-
Constructor Summary
Constructors Constructor Description VkMemoryGetFdInfoKHR(java.nio.ByteBuffer container)
Creates aVkMemoryGetFdInfoKHR
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static VkMemoryGetFdInfoKHR
calloc()
Returns a newVkMemoryGetFdInfoKHR
instance allocated withmemCalloc
.static VkMemoryGetFdInfoKHR.Buffer
calloc(int capacity)
Returns a newVkMemoryGetFdInfoKHR.Buffer
instance allocated withmemCalloc
.static VkMemoryGetFdInfoKHR
callocStack()
Returns a newVkMemoryGetFdInfoKHR
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkMemoryGetFdInfoKHR.Buffer
callocStack(int capacity)
Returns a newVkMemoryGetFdInfoKHR.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkMemoryGetFdInfoKHR.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkMemoryGetFdInfoKHR.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkMemoryGetFdInfoKHR
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkMemoryGetFdInfoKHR
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkMemoryGetFdInfoKHR
create()
Returns a newVkMemoryGetFdInfoKHR
instance allocated withBufferUtils
.static VkMemoryGetFdInfoKHR.Buffer
create(int capacity)
Returns a newVkMemoryGetFdInfoKHR.Buffer
instance allocated withBufferUtils
.static VkMemoryGetFdInfoKHR
create(long address)
Returns a newVkMemoryGetFdInfoKHR
instance for the specified memory address.static VkMemoryGetFdInfoKHR.Buffer
create(long address, int capacity)
Create aVkMemoryGetFdInfoKHR.Buffer
instance at the specified memory.static VkMemoryGetFdInfoKHR
createSafe(long address)
static VkMemoryGetFdInfoKHR.Buffer
createSafe(long address, int capacity)
int
handleType()
Returns the value of thehandleType
field.VkMemoryGetFdInfoKHR
handleType(int value)
Sets the specified value to thehandleType
field.static VkMemoryGetFdInfoKHR
malloc()
Returns a newVkMemoryGetFdInfoKHR
instance allocated withmemAlloc
.static VkMemoryGetFdInfoKHR.Buffer
malloc(int capacity)
Returns a newVkMemoryGetFdInfoKHR.Buffer
instance allocated withmemAlloc
.static VkMemoryGetFdInfoKHR
mallocStack()
Returns a newVkMemoryGetFdInfoKHR
instance allocated on the thread-localMemoryStack
.static VkMemoryGetFdInfoKHR.Buffer
mallocStack(int capacity)
Returns a newVkMemoryGetFdInfoKHR.Buffer
instance allocated on the thread-localMemoryStack
.static VkMemoryGetFdInfoKHR.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkMemoryGetFdInfoKHR.Buffer
instance allocated on the specifiedMemoryStack
.static VkMemoryGetFdInfoKHR
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkMemoryGetFdInfoKHR
instance allocated on the specifiedMemoryStack
.long
memory()
Returns the value of thememory
field.VkMemoryGetFdInfoKHR
memory(long value)
Sets the specified value to thememory
field.static int
nhandleType(long struct)
Unsafe version ofhandleType()
.static void
nhandleType(long struct, int value)
Unsafe version ofhandleType
.static long
nmemory(long struct)
Unsafe version ofmemory()
.static void
nmemory(long struct, long value)
Unsafe version ofmemory
.static long
npNext(long struct)
Unsafe version ofpNext()
.static void
npNext(long struct, long value)
Unsafe version ofpNext
.static int
nsType(long struct)
Unsafe version ofsType()
.static void
nsType(long struct, int value)
Unsafe version ofsType
.long
pNext()
Returns the value of thepNext
field.VkMemoryGetFdInfoKHR
pNext(long value)
Sets the specified value to thepNext
field.VkMemoryGetFdInfoKHR
set(int sType, long pNext, long memory, int handleType)
Initializes this struct with the specified values.VkMemoryGetFdInfoKHR
set(VkMemoryGetFdInfoKHR src)
Copies the specified struct data to this struct.int
sizeof()
int
sType()
Returns the value of thesType
field.VkMemoryGetFdInfoKHR
sType(int value)
Sets the specified value to thesType
field.
-
-
-
Constructor Detail
-
VkMemoryGetFdInfoKHR
public VkMemoryGetFdInfoKHR(java.nio.ByteBuffer container)
Creates aVkMemoryGetFdInfoKHR
instance at the current position of the specifiedByteBuffer
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.
-
-
Method Detail
-
sizeof
public int sizeof()
- Specified by:
sizeof
in classorg.lwjgl.system.Struct
-
sType
public int sType()
Returns the value of thesType
field.
-
pNext
public long pNext()
Returns the value of thepNext
field.
-
memory
public long memory()
Returns the value of thememory
field.
-
handleType
public int handleType()
Returns the value of thehandleType
field.
-
sType
public VkMemoryGetFdInfoKHR sType(int value)
Sets the specified value to thesType
field.
-
pNext
public VkMemoryGetFdInfoKHR pNext(long value)
Sets the specified value to thepNext
field.
-
memory
public VkMemoryGetFdInfoKHR memory(long value)
Sets the specified value to thememory
field.
-
handleType
public VkMemoryGetFdInfoKHR handleType(int value)
Sets the specified value to thehandleType
field.
-
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 newVkMemoryGetFdInfoKHR
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static VkMemoryGetFdInfoKHR calloc()
Returns a newVkMemoryGetFdInfoKHR
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static VkMemoryGetFdInfoKHR create()
Returns a newVkMemoryGetFdInfoKHR
instance allocated withBufferUtils
.
-
create
public static VkMemoryGetFdInfoKHR create(long address)
Returns a newVkMemoryGetFdInfoKHR
instance for the specified memory address.
-
createSafe
@Nullable public static VkMemoryGetFdInfoKHR createSafe(long address)
-
malloc
public static VkMemoryGetFdInfoKHR.Buffer malloc(int capacity)
Returns a newVkMemoryGetFdInfoKHR.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static VkMemoryGetFdInfoKHR.Buffer calloc(int capacity)
Returns a newVkMemoryGetFdInfoKHR.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static VkMemoryGetFdInfoKHR.Buffer create(int capacity)
Returns a newVkMemoryGetFdInfoKHR.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static VkMemoryGetFdInfoKHR.Buffer create(long address, int capacity)
Create aVkMemoryGetFdInfoKHR.Buffer
instance 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 newVkMemoryGetFdInfoKHR
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static VkMemoryGetFdInfoKHR callocStack()
Returns a newVkMemoryGetFdInfoKHR
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static VkMemoryGetFdInfoKHR mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkMemoryGetFdInfoKHR
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static VkMemoryGetFdInfoKHR callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkMemoryGetFdInfoKHR
instance allocated on the specifiedMemoryStack
and 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.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static VkMemoryGetFdInfoKHR.Buffer callocStack(int capacity)
Returns a newVkMemoryGetFdInfoKHR.Buffer
instance allocated on the thread-localMemoryStack
and 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.Buffer
instance 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.Buffer
instance allocated on the specifiedMemoryStack
and 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
.
-
-