Package org.lwjgl.vulkan
Class VkMemoryDedicatedRequirements
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.vulkan.VkMemoryDedicatedRequirements
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
- Direct Known Subclasses:
VkMemoryDedicatedRequirementsKHR
public class VkMemoryDedicatedRequirements extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceStructure describing dedicated allocation requirements of buffer and image resources.Description
To determine the dedicated allocation requirements of a buffer or image resource, add a
VkMemoryDedicatedRequirementsstructure to thepNextchain of theVkMemoryRequirements2structure passed as thepMemoryRequirementsparameter ofGetBufferMemoryRequirements2orGetImageMemoryRequirements2, respectively.Constraints on the values returned for buffer resources are:
requiresDedicatedAllocationmay beTRUEif thepNextchain ofVkBufferCreateInfofor the call tovkCreateBufferused to create the buffer being queried included aVkExternalMemoryBufferCreateInfostructure, and any of the handle types specified inVkExternalMemoryBufferCreateInfo::handleTypesrequires dedicated allocation, as reported byGetPhysicalDeviceExternalBufferPropertiesinVkExternalBufferProperties::externalMemoryProperties.externalMemoryFeatures. Otherwise,requiresDedicatedAllocationwill beFALSE.- When the implementation sets
requiresDedicatedAllocationtoTRUE, it must also setprefersDedicatedAllocationtoTRUE. - If
BUFFER_CREATE_SPARSE_BINDING_BITwas set inVkBufferCreateInfo::flagswhenbufferwas created, then bothprefersDedicatedAllocationandrequiresDedicatedAllocationwill beFALSE.
Constraints on the values returned for image resources are:
requiresDedicatedAllocationmay beTRUEif thepNextchain ofVkImageCreateInfofor the call toCreateImageused to create the image being queried included aVkExternalMemoryImageCreateInfostructure, and any of the handle types specified inVkExternalMemoryImageCreateInfo::handleTypesrequires dedicated allocation, as reported byGetPhysicalDeviceImageFormatProperties2inVkExternalImageFormatProperties::externalMemoryProperties.externalMemoryFeatures. Otherwise,requiresDedicatedAllocationwill beFALSE.- If
IMAGE_CREATE_SPARSE_BINDING_BITwas set inVkImageCreateInfo::flagswhenimagewas created, then bothprefersDedicatedAllocationandrequiresDedicatedAllocationwill beFALSE.
Valid Usage (Implicit)
sTypemust beSTRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS
Layout
struct VkMemoryDedicatedRequirements { VkStructureTypesType(); void *pNext(); VkBool32prefersDedicatedAllocation(); VkBool32requiresDedicatedAllocation(); }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classVkMemoryDedicatedRequirements.BufferAn array ofVkMemoryDedicatedRequirementsstructs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intPNEXT
PREFERSDEDICATEDALLOCATION
REQUIRESDEDICATEDALLOCATIONThe struct member offsets.static intSIZEOFThe struct size in bytes.static intSTYPEThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description VkMemoryDedicatedRequirements(java.nio.ByteBuffer container)Creates aVkMemoryDedicatedRequirementsinstance 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 VkMemoryDedicatedRequirementscalloc()Returns a newVkMemoryDedicatedRequirementsinstance allocated withmemCalloc.static VkMemoryDedicatedRequirements.Buffercalloc(int capacity)Returns a newVkMemoryDedicatedRequirements.Bufferinstance allocated withmemCalloc.static VkMemoryDedicatedRequirements.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkMemoryDedicatedRequirements.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkMemoryDedicatedRequirementscalloc(org.lwjgl.system.MemoryStack stack)Returns a newVkMemoryDedicatedRequirementsinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkMemoryDedicatedRequirementscallocStack()Deprecated.static VkMemoryDedicatedRequirements.BuffercallocStack(int capacity)Deprecated.static VkMemoryDedicatedRequirements.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static VkMemoryDedicatedRequirementscallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.static VkMemoryDedicatedRequirementscreate()Returns a newVkMemoryDedicatedRequirementsinstance allocated withBufferUtils.static VkMemoryDedicatedRequirements.Buffercreate(int capacity)Returns a newVkMemoryDedicatedRequirements.Bufferinstance allocated withBufferUtils.static VkMemoryDedicatedRequirementscreate(long address)Returns a newVkMemoryDedicatedRequirementsinstance for the specified memory address.static VkMemoryDedicatedRequirements.Buffercreate(long address, int capacity)Create aVkMemoryDedicatedRequirements.Bufferinstance at the specified memory.static VkMemoryDedicatedRequirementscreateSafe(long address)static VkMemoryDedicatedRequirements.BuffercreateSafe(long address, int capacity)static VkMemoryDedicatedRequirementsmalloc()Returns a newVkMemoryDedicatedRequirementsinstance allocated withmemAlloc.static VkMemoryDedicatedRequirements.Buffermalloc(int capacity)Returns a newVkMemoryDedicatedRequirements.Bufferinstance allocated withmemAlloc.static VkMemoryDedicatedRequirements.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkMemoryDedicatedRequirements.Bufferinstance allocated on the specifiedMemoryStack.static VkMemoryDedicatedRequirementsmalloc(org.lwjgl.system.MemoryStack stack)Returns a newVkMemoryDedicatedRequirementsinstance allocated on the specifiedMemoryStack.static VkMemoryDedicatedRequirementsmallocStack()Deprecated.static VkMemoryDedicatedRequirements.BuffermallocStack(int capacity)Deprecated.static VkMemoryDedicatedRequirements.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static VkMemoryDedicatedRequirementsmallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.static longnpNext(long struct)Unsafe version ofpNext().static voidnpNext(long struct, long value)Unsafe version ofpNext.static intnprefersDedicatedAllocation(long struct)Unsafe version ofprefersDedicatedAllocation().static intnrequiresDedicatedAllocation(long struct)Unsafe version ofrequiresDedicatedAllocation().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.VkMemoryDedicatedRequirementspNext(long value)Sets the specified value to thepNext()field.booleanprefersDedicatedAllocation()specifies that the implementation would prefer a dedicated allocation for this resource.booleanrequiresDedicatedAllocation()specifies that a dedicated allocation is required for this resource.VkMemoryDedicatedRequirementsset(int sType, long pNext)Initializes this struct with the specified values.VkMemoryDedicatedRequirementsset(VkMemoryDedicatedRequirements src)Copies the specified struct data to this struct.intsizeof()intsType()the type of this structure.VkMemoryDedicatedRequirementssType(int value)Sets the specified value to thesType()field.VkMemoryDedicatedRequirementssType$Default()Sets theSTRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTSvalue to thesType()field.
-
-
-
Constructor Detail
-
VkMemoryDedicatedRequirements
public VkMemoryDedicatedRequirements(java.nio.ByteBuffer container)
Creates aVkMemoryDedicatedRequirementsinstance 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.
-
prefersDedicatedAllocation
public boolean prefersDedicatedAllocation()
specifies that the implementation would prefer a dedicated allocation for this resource. The application is still free to suballocate the resource but it may get better performance if a dedicated allocation is used.
-
requiresDedicatedAllocation
public boolean requiresDedicatedAllocation()
specifies that a dedicated allocation is required for this resource.
-
sType
public VkMemoryDedicatedRequirements sType(int value)
Sets the specified value to thesType()field.
-
sType$Default
public VkMemoryDedicatedRequirements sType$Default()
Sets theSTRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTSvalue to thesType()field.
-
pNext
public VkMemoryDedicatedRequirements pNext(long value)
Sets the specified value to thepNext()field.
-
set
public VkMemoryDedicatedRequirements set(int sType, long pNext)
Initializes this struct with the specified values.
-
set
public VkMemoryDedicatedRequirements set(VkMemoryDedicatedRequirements src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static VkMemoryDedicatedRequirements malloc()
Returns a newVkMemoryDedicatedRequirementsinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static VkMemoryDedicatedRequirements calloc()
Returns a newVkMemoryDedicatedRequirementsinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static VkMemoryDedicatedRequirements create()
Returns a newVkMemoryDedicatedRequirementsinstance allocated withBufferUtils.
-
create
public static VkMemoryDedicatedRequirements create(long address)
Returns a newVkMemoryDedicatedRequirementsinstance for the specified memory address.
-
createSafe
@Nullable public static VkMemoryDedicatedRequirements createSafe(long address)
-
malloc
public static VkMemoryDedicatedRequirements.Buffer malloc(int capacity)
Returns a newVkMemoryDedicatedRequirements.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static VkMemoryDedicatedRequirements.Buffer calloc(int capacity)
Returns a newVkMemoryDedicatedRequirements.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static VkMemoryDedicatedRequirements.Buffer create(int capacity)
Returns a newVkMemoryDedicatedRequirements.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static VkMemoryDedicatedRequirements.Buffer create(long address, int capacity)
Create aVkMemoryDedicatedRequirements.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static VkMemoryDedicatedRequirements.Buffer createSafe(long address, int capacity)
-
mallocStack
@Deprecated public static VkMemoryDedicatedRequirements mallocStack()
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static VkMemoryDedicatedRequirements callocStack()
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static VkMemoryDedicatedRequirements mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static VkMemoryDedicatedRequirements callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static VkMemoryDedicatedRequirements.Buffer mallocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static VkMemoryDedicatedRequirements.Buffer callocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
mallocStack
@Deprecated public static VkMemoryDedicatedRequirements.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 VkMemoryDedicatedRequirements.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
malloc
public static VkMemoryDedicatedRequirements malloc(org.lwjgl.system.MemoryStack stack)
Returns a newVkMemoryDedicatedRequirementsinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static VkMemoryDedicatedRequirements calloc(org.lwjgl.system.MemoryStack stack)
Returns a newVkMemoryDedicatedRequirementsinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static VkMemoryDedicatedRequirements.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkMemoryDedicatedRequirements.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static VkMemoryDedicatedRequirements.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkMemoryDedicatedRequirements.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().
-
nprefersDedicatedAllocation
public static int nprefersDedicatedAllocation(long struct)
Unsafe version ofprefersDedicatedAllocation().
-
nrequiresDedicatedAllocation
public static int nrequiresDedicatedAllocation(long struct)
Unsafe version ofrequiresDedicatedAllocation().
-
nsType
public static void nsType(long struct, int value)Unsafe version ofsType.
-
npNext
public static void npNext(long struct, long value)Unsafe version ofpNext.
-
-