Class VkImportMemoryWin32HandleInfoKHR
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.vulkan.VkImportMemoryWin32HandleInfoKHR
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class VkImportMemoryWin32HandleInfoKHR extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceImport Win32 memory created on the same physical device.Description
Importing memory object payloads from Windows handles does not transfer ownership of the handle to the Vulkan implementation. For handle types defined as NT handles, the application must release handle ownership using the
CloseHandlesystem call when the handle is no longer needed. For handle types defined as NT handles, the imported memory object holds a reference to its payload.Note
Non-NT handle import operations do not add a reference to their associated payload. If the original object owning the payload is destroyed, all resources and handles sharing that payload will become invalid.
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
handlewas exported, or the memory named bynamemust have been created on the same underlying physical device asdevice - If
handleTypeis not 0, it must be defined as an NT handle or a global share handle - If
handleTypeis notEXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT,EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT,EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT, orEXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT,namemust beNULL - If
handleTypeis not 0 andhandleisNULL,namemust name a valid memory resource of the type specified byhandleType - If
handleTypeis not 0 andnameisNULL,handlemust be a valid handle of the type specified byhandleType - if
handleis notNULL,namemust beNULL - If
handleis notNULL, it must obey any requirements listed forhandleTypein external memory handle types compatibility - If
nameis notNULL, it must obey any requirements listed forhandleTypein external memory handle types compatibility
Valid Usage (Implicit)
sTypemust beSTRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_KHR- If
handleTypeis not 0,handleTypemust be a validVkExternalMemoryHandleTypeFlagBitsvalue
Layout
struct VkImportMemoryWin32HandleInfoKHR { VkStructureTypesType(); void const *pNext(); VkExternalMemoryHandleTypeFlagBitshandleType(); HANDLEhandle(); LPCWSTRname(); }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classVkImportMemoryWin32HandleInfoKHR.BufferAn array ofVkImportMemoryWin32HandleInfoKHRstructs.
-
Constructor Summary
Constructors Constructor Description VkImportMemoryWin32HandleInfoKHR(java.nio.ByteBuffer container)Creates aVkImportMemoryWin32HandleInfoKHRinstance 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 VkImportMemoryWin32HandleInfoKHRcalloc()Returns a newVkImportMemoryWin32HandleInfoKHRinstance allocated withmemCalloc.static VkImportMemoryWin32HandleInfoKHR.Buffercalloc(int capacity)Returns a newVkImportMemoryWin32HandleInfoKHR.Bufferinstance allocated withmemCalloc.static VkImportMemoryWin32HandleInfoKHR.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkImportMemoryWin32HandleInfoKHR.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkImportMemoryWin32HandleInfoKHRcalloc(org.lwjgl.system.MemoryStack stack)Returns a newVkImportMemoryWin32HandleInfoKHRinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkImportMemoryWin32HandleInfoKHRcallocStack()Deprecated.static VkImportMemoryWin32HandleInfoKHR.BuffercallocStack(int capacity)Deprecated.static VkImportMemoryWin32HandleInfoKHR.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static VkImportMemoryWin32HandleInfoKHRcallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.static VkImportMemoryWin32HandleInfoKHRcreate()Returns a newVkImportMemoryWin32HandleInfoKHRinstance allocated withBufferUtils.static VkImportMemoryWin32HandleInfoKHR.Buffercreate(int capacity)Returns a newVkImportMemoryWin32HandleInfoKHR.Bufferinstance allocated withBufferUtils.static VkImportMemoryWin32HandleInfoKHRcreate(long address)Returns a newVkImportMemoryWin32HandleInfoKHRinstance for the specified memory address.static VkImportMemoryWin32HandleInfoKHR.Buffercreate(long address, int capacity)Create aVkImportMemoryWin32HandleInfoKHR.Bufferinstance at the specified memory.static VkImportMemoryWin32HandleInfoKHRcreateSafe(long address)static VkImportMemoryWin32HandleInfoKHR.BuffercreateSafe(long address, int capacity)longhandle()NULLor the external handle to import.VkImportMemoryWin32HandleInfoKHRhandle(long value)Sets the specified value to thehandle()field.inthandleType()aVkExternalMemoryHandleTypeFlagBitsvalue specifying the type ofhandleorname.VkImportMemoryWin32HandleInfoKHRhandleType(int value)Sets the specified value to thehandleType()field.static VkImportMemoryWin32HandleInfoKHRmalloc()Returns a newVkImportMemoryWin32HandleInfoKHRinstance allocated withmemAlloc.static VkImportMemoryWin32HandleInfoKHR.Buffermalloc(int capacity)Returns a newVkImportMemoryWin32HandleInfoKHR.Bufferinstance allocated withmemAlloc.static VkImportMemoryWin32HandleInfoKHR.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkImportMemoryWin32HandleInfoKHR.Bufferinstance allocated on the specifiedMemoryStack.static VkImportMemoryWin32HandleInfoKHRmalloc(org.lwjgl.system.MemoryStack stack)Returns a newVkImportMemoryWin32HandleInfoKHRinstance allocated on the specifiedMemoryStack.static VkImportMemoryWin32HandleInfoKHRmallocStack()Deprecated.static VkImportMemoryWin32HandleInfoKHR.BuffermallocStack(int capacity)Deprecated.static VkImportMemoryWin32HandleInfoKHR.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static VkImportMemoryWin32HandleInfoKHRmallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.java.nio.ByteBuffername()NULLor a null-terminated UTF-16 string naming the payload to import.VkImportMemoryWin32HandleInfoKHRname(java.nio.ByteBuffer value)Sets the address of the specified encoded string to thename()field.java.lang.StringnameString()NULLor a null-terminated UTF-16 string naming the payload to import.static longnhandle(long struct)Unsafe version ofhandle().static voidnhandle(long struct, long value)Unsafe version ofhandle.static intnhandleType(long struct)Unsafe version ofhandleType().static voidnhandleType(long struct, int value)Unsafe version ofhandleType.static java.nio.ByteBuffernname(long struct)Unsafe version ofname().static voidnname(long struct, java.nio.ByteBuffer value)Unsafe version ofname.static java.lang.StringnnameString(long struct)Unsafe version ofnameString().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.VkImportMemoryWin32HandleInfoKHRpNext(long value)Sets the specified value to thepNext()field.VkImportMemoryWin32HandleInfoKHRset(int sType, long pNext, int handleType, long handle, java.nio.ByteBuffer name)Initializes this struct with the specified values.VkImportMemoryWin32HandleInfoKHRset(VkImportMemoryWin32HandleInfoKHR src)Copies the specified struct data to this struct.intsizeof()intsType()the type of this structure.VkImportMemoryWin32HandleInfoKHRsType(int value)Sets the specified value to thesType()field.VkImportMemoryWin32HandleInfoKHRsType$Default()Sets theSTRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_KHRvalue to thesType()field.static voidvalidate(long struct)Validates pointer members that should not beNULL.
-
-
-
Constructor Detail
-
VkImportMemoryWin32HandleInfoKHR
public VkImportMemoryWin32HandleInfoKHR(java.nio.ByteBuffer container)
Creates aVkImportMemoryWin32HandleInfoKHRinstance 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 type ofhandleorname.
-
handle
public long handle()
NULLor the external handle to import.
-
name, nameString
public java.nio.ByteBuffer name() public java.lang.String nameString()
NULLor a null-terminated UTF-16 string naming the payload to import.
-
sType
public VkImportMemoryWin32HandleInfoKHR sType(int value)
Sets the specified value to thesType()field.
-
sType$Default
public VkImportMemoryWin32HandleInfoKHR sType$Default()
Sets theSTRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_KHRvalue to thesType()field.
-
pNext
public VkImportMemoryWin32HandleInfoKHR pNext(long value)
Sets the specified value to thepNext()field.
-
handleType
public VkImportMemoryWin32HandleInfoKHR handleType(int value)
Sets the specified value to thehandleType()field.
-
handle
public VkImportMemoryWin32HandleInfoKHR handle(long value)
Sets the specified value to thehandle()field.
-
name
public VkImportMemoryWin32HandleInfoKHR name(java.nio.ByteBuffer value)
Sets the address of the specified encoded string to thename()field.
-
set
public VkImportMemoryWin32HandleInfoKHR set(int sType, long pNext, int handleType, long handle, java.nio.ByteBuffer name)
Initializes this struct with the specified values.
-
set
public VkImportMemoryWin32HandleInfoKHR set(VkImportMemoryWin32HandleInfoKHR src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static VkImportMemoryWin32HandleInfoKHR malloc()
Returns a newVkImportMemoryWin32HandleInfoKHRinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static VkImportMemoryWin32HandleInfoKHR calloc()
Returns a newVkImportMemoryWin32HandleInfoKHRinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static VkImportMemoryWin32HandleInfoKHR create()
Returns a newVkImportMemoryWin32HandleInfoKHRinstance allocated withBufferUtils.
-
create
public static VkImportMemoryWin32HandleInfoKHR create(long address)
Returns a newVkImportMemoryWin32HandleInfoKHRinstance for the specified memory address.
-
createSafe
@Nullable public static VkImportMemoryWin32HandleInfoKHR createSafe(long address)
-
malloc
public static VkImportMemoryWin32HandleInfoKHR.Buffer malloc(int capacity)
Returns a newVkImportMemoryWin32HandleInfoKHR.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static VkImportMemoryWin32HandleInfoKHR.Buffer calloc(int capacity)
Returns a newVkImportMemoryWin32HandleInfoKHR.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static VkImportMemoryWin32HandleInfoKHR.Buffer create(int capacity)
Returns a newVkImportMemoryWin32HandleInfoKHR.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static VkImportMemoryWin32HandleInfoKHR.Buffer create(long address, int capacity)
Create aVkImportMemoryWin32HandleInfoKHR.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static VkImportMemoryWin32HandleInfoKHR.Buffer createSafe(long address, int capacity)
-
mallocStack
@Deprecated public static VkImportMemoryWin32HandleInfoKHR mallocStack()
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static VkImportMemoryWin32HandleInfoKHR callocStack()
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static VkImportMemoryWin32HandleInfoKHR mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static VkImportMemoryWin32HandleInfoKHR callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static VkImportMemoryWin32HandleInfoKHR.Buffer mallocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static VkImportMemoryWin32HandleInfoKHR.Buffer callocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
mallocStack
@Deprecated public static VkImportMemoryWin32HandleInfoKHR.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 VkImportMemoryWin32HandleInfoKHR.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
malloc
public static VkImportMemoryWin32HandleInfoKHR malloc(org.lwjgl.system.MemoryStack stack)
Returns a newVkImportMemoryWin32HandleInfoKHRinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static VkImportMemoryWin32HandleInfoKHR calloc(org.lwjgl.system.MemoryStack stack)
Returns a newVkImportMemoryWin32HandleInfoKHRinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static VkImportMemoryWin32HandleInfoKHR.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkImportMemoryWin32HandleInfoKHR.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static VkImportMemoryWin32HandleInfoKHR.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkImportMemoryWin32HandleInfoKHR.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().
-
nhandle
public static long nhandle(long struct)
Unsafe version ofhandle().
-
nname
public static java.nio.ByteBuffer nname(long struct)
Unsafe version ofname().
-
nnameString
public static java.lang.String nnameString(long struct)
Unsafe version ofnameString().
-
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.
-
nhandle
public static void nhandle(long struct, long value)Unsafe version ofhandle.
-
nname
public static void nname(long struct, java.nio.ByteBuffer value)Unsafe version ofname.
-
validate
public static void validate(long struct)
Validates pointer members that should not beNULL.- Parameters:
struct- the struct to validate
-
-