Class VkMemoryAllocateInfo
- All Implemented Interfaces:
AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
Description
The internal data of an allocated device memory object must include a reference to implementation-specific resources, referred to as the memory object’s payload. Applications can also import and export that internal data to and from device memory objects to share data between Vulkan instances and other compatible APIs. A VkMemoryAllocateInfo structure defines a memory import operation if its pNext chain includes one of the following structures:
VkImportMemoryWin32HandleInfoKHRwith a non-zerohandleTypevalueVkImportMemoryFdInfoKHRwith a non-zerohandleTypevalueVkImportMemoryHostPointerInfoEXTwith a non-zerohandleTypevalueVkImportAndroidHardwareBufferInfoANDROIDwith a non-NULLbuffervalue
If the parameters define an import operation and the external handle type is EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT, EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT, or EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT, allocationSize is ignored. The implementation must query the size of these allocations from the OS.
Whether device memory objects constructed via a memory import operation hold a reference to their payload depends on the properties of the handle type used to perform the import, as defined below for each valid handle type. Importing memory must not modify the content of the memory. Implementations must ensure that importing memory does not enable the importing Vulkan instance to access any memory or resources in other Vulkan instances other than that corresponding to the memory object imported. Implementations must also ensure accessing imported memory which has not been initialized does not allow the importing Vulkan instance to obtain data from the exporting Vulkan instance or vice-versa.
Note
How exported and imported memory is isolated is left to the implementation, but applications should be aware that such isolation may prevent implementations from placing multiple exportable memory objects in the same physical or virtual page. Hence, applications should avoid creating many small external memory objects whenever possible.
Importing memory must not increase overall heap usage within a system. However, it must affect the following per-process values:
VkPhysicalDeviceLimits::maxMemoryAllocationCountVkPhysicalDeviceMemoryBudgetPropertiesEXT::heapUsage
When performing a memory import operation, it is the responsibility of the application to ensure the external handles and their associated payloads meet all valid usage requirements. However, implementations must perform sufficient validation of external handles and payloads to ensure that the operation results in a valid memory object which will not cause program termination, device loss, queue stalls, or corruption of other resources when used as allowed according to its allocation parameters. If the external handle provided does not meet these requirements, the implementation must fail the memory import operation with the error code ERROR_INVALID_EXTERNAL_HANDLE. If the parameters define an export operation and the external handle type is EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID, implementations should not strictly follow memoryTypeIndex. Instead, they should modify the allocation internally to use the required memory type for the application’s given usage. This is because for an export operation, there is currently no way for the application to know the memory type index before allocating.
Valid Usage
- If the parameters do not define an import or export operation,
allocationSizemust be greater than 0 - The parameters must not define more than one import operation
- If the parameters define an export operation and the handle type is not
EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID,allocationSizemust be greater than 0 - If the
pNextchain includes aVkExportMemoryAllocateInfostructure, and any of the handle types specified inVkExportMemoryAllocateInfo::handleTypesrequire a dedicated allocation, as reported byGetPhysicalDeviceImageFormatProperties2inVkExternalImageFormatProperties::externalMemoryProperties.externalMemoryFeatures, or byGetPhysicalDeviceExternalBufferPropertiesinVkExternalBufferProperties::externalMemoryProperties.externalMemoryFeatures, thepNextchain must include aVkMemoryDedicatedAllocateInfoorVkDedicatedAllocationMemoryAllocateInfoNVstructure with either itsimageorbuffermember set to a value other thanNULL_HANDLE - If the
pNextchain includes aVkExportMemoryAllocateInfostructure, it must not include aVkExportMemoryAllocateInfoNVorVkExportMemoryWin32HandleInfoNVstructure - If the
pNextchain includes aVkImportMemoryWin32HandleInfoKHRstructure, it must not include aVkImportMemoryWin32HandleInfoNVstructure - If the parameters define an import operation, the external handle specified was created by the Vulkan API, and the external handle type is
EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT, then the values ofallocationSizeandmemoryTypeIndexmust match those specified when the payload being imported was created - If the parameters define an import operation and the external handle specified was created by the Vulkan API, the device mask specified by
VkMemoryAllocateFlagsInfomust match the mask specified when the payload being imported was allocated - If the parameters define an import operation and the external handle specified was created by the Vulkan API, the list of physical devices that comprise the logical device passed to
AllocateMemorymust match the list of physical devices that comprise the logical device on which the payload was originally allocated - If the parameters define an import operation and the external handle is an NT handle or a global share handle created outside of the Vulkan API, the value of
memoryTypeIndexmust be one of those returned byGetMemoryWin32HandlePropertiesKHR - If the parameters define an import operation, the external handle was created by the Vulkan API, and the external handle type is
EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BITorEXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT, then the values ofallocationSizeandmemoryTypeIndexmust match those specified when the payload being imported was created - If the parameters define an import operation and the external handle type is
EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT,allocationSizemust match the size specified when creating the Direct3D 12 heap from which the payload was extracted - If the parameters define an import operation and the external handle is a POSIX file descriptor created outside of the Vulkan API, the value of
memoryTypeIndexmust be one of those returned byGetMemoryFdPropertiesKHR - If the
protectedMemoryfeature is not enabled, theVkMemoryAllocateInfo::memoryTypeIndexmust not indicate a memory type that reportsMEMORY_PROPERTY_PROTECTED_BIT - If the parameters define an import operation and the external handle is a host pointer, the value of
memoryTypeIndexmust be one of those returned byGetMemoryHostPointerPropertiesEXT - If the parameters define an import operation and the external handle is a host pointer,
allocationSizemust be an integer multiple ofVkPhysicalDeviceExternalMemoryHostPropertiesEXT::minImportedHostPointerAlignment - If the parameters define an import operation and the external handle is a host pointer, the
pNextchain must not include aVkDedicatedAllocationMemoryAllocateInfoNVstructure with either itsimageorbufferfield set to a value other thanNULL_HANDLE - If the parameters define an import operation and the external handle is a host pointer, the
pNextchain must not include aVkMemoryDedicatedAllocateInfostructure with either itsimageorbufferfield set to a value other thanNULL_HANDLE - If the parameters define an import operation and the external handle type is
EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID,allocationSizemust be the size returned byGetAndroidHardwareBufferPropertiesANDROIDfor the Android hardware buffer - If the parameters define an import operation and the external handle type is
EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID, and thepNextchain does not include aVkMemoryDedicatedAllocateInfostructure orVkMemoryDedicatedAllocateInfo::imageisNULL_HANDLE, the Android hardware buffer must have aAHardwareBuffer_Desc::formatofAHARDWAREBUFFER_FORMAT_BLOBand aAHardwareBuffer_Desc::usagethat includesAHARDWAREBUFFER_USAGE_GPU_DATA_BUFFER - If the parameters define an import operation and the external handle type is
EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID,memoryTypeIndexmust be one of those returned byGetAndroidHardwareBufferPropertiesANDROIDfor the Android hardware buffer - If the parameters do not define an import operation, and the
pNextchain includes aVkExportMemoryAllocateInfostructure withEXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROIDincluded in itshandleTypesmember, and thepNextchain includes aVkMemoryDedicatedAllocateInfostructure withimagenot equal toNULL_HANDLE, thenallocationSizemust be 0 - If the parameters define an export operation, the handle type is
EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID, and thepNextdoes not include aVkMemoryDedicatedAllocateInfostructure,allocationSizemust be greater than 0 - If the parameters define an export operation, the handle type is
EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID, and thepNextchain includes aVkMemoryDedicatedAllocateInfostructure withbufferset to a validVkBufferobject,allocationSizemust be greater than 0 - If the parameters define an import operation, the external handle is an Android hardware buffer, and the
pNextchain includes aVkMemoryDedicatedAllocateInfowithimagethat is notNULL_HANDLE, the Android hardware buffer’sAHardwareBuffer::usagemust include at least one ofAHARDWAREBUFFER_USAGE_GPU_FRAMEBUFFER,AHARDWAREBUFFER_USAGE_GPU_SAMPLED_IMAGEorAHARDWAREBUFFER_USAGE_GPU_DATA_BUFFER - If the parameters define an import operation, the external handle is an Android hardware buffer, and the
pNextchain includes aVkMemoryDedicatedAllocateInfowithimagethat is notNULL_HANDLE, the format ofimagemust beFORMAT_UNDEFINEDor the format returned byGetAndroidHardwareBufferPropertiesANDROIDinVkAndroidHardwareBufferFormatPropertiesANDROID::formatfor the Android hardware buffer - If the parameters define an import operation, the external handle is an Android hardware buffer, and the
pNextchain includes aVkMemoryDedicatedAllocateInfostructure withimagethat is notNULL_HANDLE, the width, height, and array layer dimensions ofimageand the Android hardware buffer’sAHardwareBuffer_Descmust be identical - If the parameters define an import operation, the external handle is an Android hardware buffer, and the
pNextchain includes aVkMemoryDedicatedAllocateInfostructure withimagethat is notNULL_HANDLE, and the Android hardware buffer’sAHardwareBuffer::usageincludesAHARDWAREBUFFER_USAGE_GPU_MIPMAP_COMPLETE, theimagemust have a complete mipmap chain - If the parameters define an import operation, the external handle is an Android hardware buffer, and the
pNextchain includes aVkMemoryDedicatedAllocateInfostructure withimagethat is notNULL_HANDLE, and the Android hardware buffer’sAHardwareBuffer::usagedoes not includeAHARDWAREBUFFER_USAGE_GPU_MIPMAP_COMPLETE, theimagemust have exactly one mipmap level - If the parameters define an import operation, the external handle is an Android hardware buffer, and the
pNextchain includes aVkMemoryDedicatedAllocateInfostructure withimagethat is notNULL_HANDLE, each bit set in the usage ofimagemust be listed in AHardwareBuffer Usage Equivalence, and if there is a correspondingAHARDWAREBUFFER_USAGEbit listed that bit must be included in the Android hardware buffer’sAHardwareBuffer_Desc::usage - If
VkMemoryOpaqueCaptureAddressAllocateInfo::opaqueCaptureAddressis not zero,VkMemoryAllocateFlagsInfo::flagsmust includeMEMORY_ALLOCATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT - If
VkMemoryAllocateFlagsInfo::flagsincludesMEMORY_ALLOCATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT, thebufferDeviceAddressCaptureReplayfeature must be enabled - If
VkMemoryAllocateFlagsInfo::flagsincludesMEMORY_ALLOCATE_DEVICE_ADDRESS_BIT, thebufferDeviceAddressfeature must be enabled - If the
pNextchain includes aVkImportMemoryHostPointerInfoEXTstructure,VkMemoryOpaqueCaptureAddressAllocateInfo::opaqueCaptureAddressmust be zero - If the parameters define an import operation,
VkMemoryOpaqueCaptureAddressAllocateInfo::opaqueCaptureAddressmust be zero - If the
pNextchain includes aVkExportMetalObjectCreateInfoEXTstructure, itsexportObjectTypemember must beEXPORT_METAL_OBJECT_TYPE_METAL_BUFFER_BIT_EXT
Valid Usage (Implicit)
sTypemust beSTRUCTURE_TYPE_MEMORY_ALLOCATE_INFO- Each
pNextmember of any structure (including this one) in thepNextchain must be eitherNULLor a pointer to a valid instance ofVkDedicatedAllocationMemoryAllocateInfoNV,VkExportMemoryAllocateInfo,VkExportMemoryAllocateInfoNV,VkExportMemoryWin32HandleInfoKHR,VkExportMemoryWin32HandleInfoNV,VkExportMetalObjectCreateInfoEXT,VkImportAndroidHardwareBufferInfoANDROID,VkImportMemoryFdInfoKHR,VkImportMemoryHostPointerInfoEXT,VkImportMemoryWin32HandleInfoKHR,VkImportMemoryWin32HandleInfoNV,VkImportMetalBufferInfoEXT,VkMemoryAllocateFlagsInfo,VkMemoryDedicatedAllocateInfo,VkMemoryOpaqueCaptureAddressAllocateInfo, orVkMemoryPriorityAllocateInfoEXT - The
sTypevalue of each struct in thepNextchain must be unique, with the exception of structures of typeVkExportMetalObjectCreateInfoEXT
See Also
Layout
struct VkMemoryAllocateInfo {
VkStructureType sType();
void const * pNext();
VkDeviceSize allocationSize();
uint32_t memoryTypeIndex();
}-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.lwjgl.system.Struct
org.lwjgl.system.Struct.StructValidationNested classes/interfaces inherited from interface org.lwjgl.system.Pointer
org.lwjgl.system.Pointer.Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe struct alignment in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct size in bytes.static final intThe struct member offsets.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionVkMemoryAllocateInfo(ByteBuffer container) Creates aVkMemoryAllocateInfoinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionlongthe size of the allocation in bytes.allocationSize(long value) Sets the specified value to theallocationSize()field.static VkMemoryAllocateInfocalloc()Returns a newVkMemoryAllocateInfoinstance allocated withmemCalloc.static VkMemoryAllocateInfo.Buffercalloc(int capacity) Returns a newVkMemoryAllocateInfo.Bufferinstance allocated withmemCalloc.static VkMemoryAllocateInfo.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newVkMemoryAllocateInfo.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkMemoryAllocateInfocalloc(org.lwjgl.system.MemoryStack stack) Returns a newVkMemoryAllocateInfoinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkMemoryAllocateInfoDeprecated.static VkMemoryAllocateInfo.BuffercallocStack(int capacity) Deprecated.static VkMemoryAllocateInfo.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.static VkMemoryAllocateInfocallocStack(org.lwjgl.system.MemoryStack stack) Deprecated.static VkMemoryAllocateInfocreate()Returns a newVkMemoryAllocateInfoinstance allocated withBufferUtils.static VkMemoryAllocateInfo.Buffercreate(int capacity) Returns a newVkMemoryAllocateInfo.Bufferinstance allocated withBufferUtils.static VkMemoryAllocateInfocreate(long address) Returns a newVkMemoryAllocateInfoinstance for the specified memory address.static VkMemoryAllocateInfo.Buffercreate(long address, int capacity) Create aVkMemoryAllocateInfo.Bufferinstance at the specified memory.static @Nullable VkMemoryAllocateInfocreateSafe(long address) static @Nullable VkMemoryAllocateInfo.BuffercreateSafe(long address, int capacity) static VkMemoryAllocateInfomalloc()Returns a newVkMemoryAllocateInfoinstance allocated withmemAlloc.static VkMemoryAllocateInfo.Buffermalloc(int capacity) Returns a newVkMemoryAllocateInfo.Bufferinstance allocated withmemAlloc.static VkMemoryAllocateInfo.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newVkMemoryAllocateInfo.Bufferinstance allocated on the specifiedMemoryStack.static VkMemoryAllocateInfomalloc(org.lwjgl.system.MemoryStack stack) Returns a newVkMemoryAllocateInfoinstance allocated on the specifiedMemoryStack.static VkMemoryAllocateInfoDeprecated.static VkMemoryAllocateInfo.BuffermallocStack(int capacity) Deprecated.static VkMemoryAllocateInfo.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.static VkMemoryAllocateInfomallocStack(org.lwjgl.system.MemoryStack stack) Deprecated.intan index identifying a memory type from thememoryTypesarray of theVkPhysicalDeviceMemoryPropertiesstructure.memoryTypeIndex(int value) Sets the specified value to thememoryTypeIndex()field.static longnallocationSize(long struct) Unsafe version ofallocationSize().static voidnallocationSize(long struct, long value) Unsafe version ofallocationSize.static intnmemoryTypeIndex(long struct) Unsafe version ofmemoryTypeIndex().static voidnmemoryTypeIndex(long struct, int value) Unsafe version ofmemoryTypeIndex.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.pNext(long value) Sets the specified value to thepNext()field.Prepends the specifiedVkDedicatedAllocationMemoryAllocateInfoNVvalue to thepNextchain.pNext(VkExportMemoryAllocateInfo value) Prepends the specifiedVkExportMemoryAllocateInfovalue to thepNextchain.Prepends the specifiedVkExportMemoryAllocateInfoKHRvalue to thepNextchain.Prepends the specifiedVkExportMemoryAllocateInfoNVvalue to thepNextchain.Prepends the specifiedVkExportMemoryWin32HandleInfoKHRvalue to thepNextchain.Prepends the specifiedVkExportMemoryWin32HandleInfoNVvalue to thepNextchain.Prepends the specifiedVkExportMetalObjectCreateInfoEXTvalue to thepNextchain.Prepends the specifiedVkImportAndroidHardwareBufferInfoANDROIDvalue to thepNextchain.pNext(VkImportMemoryFdInfoKHR value) Prepends the specifiedVkImportMemoryFdInfoKHRvalue to thepNextchain.Prepends the specifiedVkImportMemoryHostPointerInfoEXTvalue to thepNextchain.Prepends the specifiedVkImportMemoryWin32HandleInfoKHRvalue to thepNextchain.Prepends the specifiedVkImportMemoryWin32HandleInfoNVvalue to thepNextchain.pNext(VkImportMetalBufferInfoEXT value) Prepends the specifiedVkImportMetalBufferInfoEXTvalue to thepNextchain.pNext(VkMemoryAllocateFlagsInfo value) Prepends the specifiedVkMemoryAllocateFlagsInfovalue to thepNextchain.Prepends the specifiedVkMemoryAllocateFlagsInfoKHRvalue to thepNextchain.Prepends the specifiedVkMemoryDedicatedAllocateInfovalue to thepNextchain.Prepends the specifiedVkMemoryDedicatedAllocateInfoKHRvalue to thepNextchain.Prepends the specifiedVkMemoryOpaqueCaptureAddressAllocateInfovalue to thepNextchain.Prepends the specifiedVkMemoryOpaqueCaptureAddressAllocateInfoKHRvalue to thepNextchain.Prepends the specifiedVkMemoryPriorityAllocateInfoEXTvalue to thepNextchain.set(int sType, long pNext, long allocationSize, int memoryTypeIndex) Initializes this struct with the specified values.set(VkMemoryAllocateInfo src) Copies the specified struct data to this struct.intsizeof()intsType()aVkStructureTypevalue identifying this structure.sType(int value) Sets the specified value to thesType()field.Sets theSTRUCTURE_TYPE_MEMORY_ALLOCATE_INFOvalue to thesType()field.Methods inherited from class org.lwjgl.system.Struct
clear, free, isNull, validate, validateMethods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toStringMethods inherited from interface org.lwjgl.system.NativeResource
close, free
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
STYPE
public static final int STYPEThe struct member offsets. -
PNEXT
public static final int PNEXTThe struct member offsets. -
ALLOCATIONSIZE
public static final int ALLOCATIONSIZEThe struct member offsets. -
MEMORYTYPEINDEX
public static final int MEMORYTYPEINDEXThe struct member offsets.
-
-
Constructor Details
-
VkMemoryAllocateInfo
Creates aVkMemoryAllocateInfoinstance 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 Details
-
sizeof
public int sizeof()- Specified by:
sizeofin classorg.lwjgl.system.Struct<VkMemoryAllocateInfo>
-
sType
public int sType()aVkStructureTypevalue identifying this structure. -
pNext
public long pNext()NULLor a pointer to a structure extending this structure. -
allocationSize
public long allocationSize()the size of the allocation in bytes. -
memoryTypeIndex
public int memoryTypeIndex()an index identifying a memory type from thememoryTypesarray of theVkPhysicalDeviceMemoryPropertiesstructure. -
sType
Sets the specified value to thesType()field. -
sType$Default
Sets theSTRUCTURE_TYPE_MEMORY_ALLOCATE_INFOvalue to thesType()field. -
pNext
Sets the specified value to thepNext()field. -
pNext
Prepends the specifiedVkDedicatedAllocationMemoryAllocateInfoNVvalue to thepNextchain. -
pNext
Prepends the specifiedVkExportMemoryAllocateInfovalue to thepNextchain. -
pNext
Prepends the specifiedVkExportMemoryAllocateInfoKHRvalue to thepNextchain. -
pNext
Prepends the specifiedVkExportMemoryAllocateInfoNVvalue to thepNextchain. -
pNext
Prepends the specifiedVkExportMemoryWin32HandleInfoKHRvalue to thepNextchain. -
pNext
Prepends the specifiedVkExportMemoryWin32HandleInfoNVvalue to thepNextchain. -
pNext
Prepends the specifiedVkExportMetalObjectCreateInfoEXTvalue to thepNextchain. -
pNext
Prepends the specifiedVkImportAndroidHardwareBufferInfoANDROIDvalue to thepNextchain. -
pNext
Prepends the specifiedVkImportMemoryFdInfoKHRvalue to thepNextchain. -
pNext
Prepends the specifiedVkImportMemoryHostPointerInfoEXTvalue to thepNextchain. -
pNext
Prepends the specifiedVkImportMemoryWin32HandleInfoKHRvalue to thepNextchain. -
pNext
Prepends the specifiedVkImportMemoryWin32HandleInfoNVvalue to thepNextchain. -
pNext
Prepends the specifiedVkImportMetalBufferInfoEXTvalue to thepNextchain. -
pNext
Prepends the specifiedVkMemoryAllocateFlagsInfovalue to thepNextchain. -
pNext
Prepends the specifiedVkMemoryAllocateFlagsInfoKHRvalue to thepNextchain. -
pNext
Prepends the specifiedVkMemoryDedicatedAllocateInfovalue to thepNextchain. -
pNext
Prepends the specifiedVkMemoryDedicatedAllocateInfoKHRvalue to thepNextchain. -
pNext
Prepends the specifiedVkMemoryOpaqueCaptureAddressAllocateInfovalue to thepNextchain. -
pNext
Prepends the specifiedVkMemoryOpaqueCaptureAddressAllocateInfoKHRvalue to thepNextchain. -
pNext
Prepends the specifiedVkMemoryPriorityAllocateInfoEXTvalue to thepNextchain. -
allocationSize
Sets the specified value to theallocationSize()field. -
memoryTypeIndex
Sets the specified value to thememoryTypeIndex()field. -
set
Initializes this struct with the specified values. -
set
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
Returns a newVkMemoryAllocateInfoinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newVkMemoryAllocateInfoinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newVkMemoryAllocateInfoinstance allocated withBufferUtils. -
create
Returns a newVkMemoryAllocateInfoinstance for the specified memory address. -
createSafe
-
malloc
Returns a newVkMemoryAllocateInfo.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newVkMemoryAllocateInfo.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newVkMemoryAllocateInfo.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aVkMemoryAllocateInfo.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead. -
mallocStack
@Deprecated public static VkMemoryAllocateInfo.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 VkMemoryAllocateInfo.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead. -
malloc
Returns a newVkMemoryAllocateInfoinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newVkMemoryAllocateInfoinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newVkMemoryAllocateInfo.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newVkMemoryAllocateInfo.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
nsType
public static int nsType(long struct) Unsafe version ofsType(). -
npNext
public static long npNext(long struct) Unsafe version ofpNext(). -
nallocationSize
public static long nallocationSize(long struct) Unsafe version ofallocationSize(). -
nmemoryTypeIndex
public static int nmemoryTypeIndex(long struct) Unsafe version ofmemoryTypeIndex(). -
nsType
public static void nsType(long struct, int value) Unsafe version ofsType. -
npNext
public static void npNext(long struct, long value) Unsafe version ofpNext. -
nallocationSize
public static void nallocationSize(long struct, long value) Unsafe version ofallocationSize. -
nmemoryTypeIndex
public static void nmemoryTypeIndex(long struct, int value) Unsafe version ofmemoryTypeIndex.
-