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.NativeResource
Structure describing dedicated allocation requirements of buffer and image resources.Description
When the implementation sets
requiresDedicatedAllocation
toTRUE
, it must also setprefersDedicatedAllocation
toTRUE
.If the
VkMemoryDedicatedRequirements
structure is included in thepNext
chain of theVkMemoryRequirements2
structure passed as thepMemoryRequirements
parameter of avkGetBufferMemoryRequirements2
call,requiresDedicatedAllocation
may beTRUE
under one of the following conditions:- The
pNext
chain ofVkBufferCreateInfo
for the call tovkCreateBuffer
used to create the buffer being queried contained an instance ofVkExternalMemoryBufferCreateInfo
, and any of the handle types specified inVkExternalMemoryBufferCreateInfo
::handleTypes
requires dedicated allocation, as reported byGetPhysicalDeviceExternalBufferProperties
inVkExternalBufferProperties
::externalMemoryProperties
::externalMemoryFeatures
, therequiresDedicatedAllocation
field will be set toTRUE
.
In all other cases,
requiresDedicatedAllocation
must be set toFALSE
by the implementation whenever aVkMemoryDedicatedRequirements
structure is included in thepNext
chain of theVkMemoryRequirements2
structure passed to a call tovkGetBufferMemoryRequirements2
.If the
VkMemoryDedicatedRequirements
structure is included in thepNext
chain of theVkMemoryRequirements2
structure passed as thepMemoryRequirements
parameter of avkGetBufferMemoryRequirements2
call andBUFFER_CREATE_SPARSE_BINDING_BIT
was set inVkBufferCreateInfo
::flags
whenbuffer
was created then the implementation must set bothprefersDedicatedAllocation
andrequiresDedicatedAllocation
toFALSE
.If the
VkMemoryDedicatedRequirements
structure is included in thepNext
chain of theVkMemoryRequirements2
structure passed as thepMemoryRequirements
parameter of avkGetImageMemoryRequirements2
call,requiresDedicatedAllocation
may beTRUE
under one of the following conditions:- The
pNext
chain ofVkImageCreateInfo
for the call tovkCreateImage
used to create the image being queried contained an instance ofVkExternalMemoryImageCreateInfo
, and any of the handle types specified inVkExternalMemoryImageCreateInfo
::handleTypes
requires dedicated allocation, as reported byGetPhysicalDeviceImageFormatProperties2
inVkExternalImageFormatProperties
::externalMemoryProperties
::externalMemoryFeatures
, therequiresDedicatedAllocation
field will be set toTRUE
.
In all other cases,
requiresDedicatedAllocation
must be set toFALSE
by the implementation whenever aVkMemoryDedicatedRequirements
structure is included in thepNext
chain of theVkMemoryRequirements2
structure passed to a call tovkGetImageMemoryRequirements2
.If the
VkMemoryDedicatedRequirements
structure is included in thepNext
chain of theVkMemoryRequirements2
structure passed as thepMemoryRequirements
parameter of avkGetImageMemoryRequirements2
call andIMAGE_CREATE_SPARSE_BINDING_BIT
was set inVkImageCreateInfo
::flags
whenimage
was created then the implementation must set bothprefersDedicatedAllocation
andrequiresDedicatedAllocation
toFALSE
.Valid Usage (Implicit)
sType
must beSTRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS
Member documentation
sType
– the type of this structure.pNext
–NULL
or a pointer to an extension-specific structure.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
– specifies that a dedicated allocation is required for this resource.
Layout
struct VkMemoryDedicatedRequirements { VkStructureType sType; void * pNext; VkBool32 prefersDedicatedAllocation; VkBool32 requiresDedicatedAllocation; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
VkMemoryDedicatedRequirements.Buffer
An array ofVkMemoryDedicatedRequirements
structs.
-
Field Summary
Fields Modifier and Type Field Description static int
ALIGNOF
The struct alignment in bytes.static int
PNEXT
PREFERSDEDICATEDALLOCATION
REQUIRESDEDICATEDALLOCATIONThe struct member offsets.static int
SIZEOF
The struct size in bytes.static int
STYPE
The struct member offsets.
-
Constructor Summary
Constructors Constructor Description VkMemoryDedicatedRequirements(java.nio.ByteBuffer container)
Creates aVkMemoryDedicatedRequirements
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 VkMemoryDedicatedRequirements
calloc()
Returns a newVkMemoryDedicatedRequirements
instance allocated withmemCalloc
.static VkMemoryDedicatedRequirements.Buffer
calloc(int capacity)
Returns a newVkMemoryDedicatedRequirements.Buffer
instance allocated withmemCalloc
.static VkMemoryDedicatedRequirements
callocStack()
Returns a newVkMemoryDedicatedRequirements
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkMemoryDedicatedRequirements.Buffer
callocStack(int capacity)
Returns a newVkMemoryDedicatedRequirements.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkMemoryDedicatedRequirements.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkMemoryDedicatedRequirements.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkMemoryDedicatedRequirements
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkMemoryDedicatedRequirements
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkMemoryDedicatedRequirements
create()
Returns a newVkMemoryDedicatedRequirements
instance allocated withBufferUtils
.static VkMemoryDedicatedRequirements.Buffer
create(int capacity)
Returns a newVkMemoryDedicatedRequirements.Buffer
instance allocated withBufferUtils
.static VkMemoryDedicatedRequirements
create(long address)
Returns a newVkMemoryDedicatedRequirements
instance for the specified memory address.static VkMemoryDedicatedRequirements.Buffer
create(long address, int capacity)
Create aVkMemoryDedicatedRequirements.Buffer
instance at the specified memory.static VkMemoryDedicatedRequirements
createSafe(long address)
static VkMemoryDedicatedRequirements.Buffer
createSafe(long address, int capacity)
static VkMemoryDedicatedRequirements
malloc()
Returns a newVkMemoryDedicatedRequirements
instance allocated withmemAlloc
.static VkMemoryDedicatedRequirements.Buffer
malloc(int capacity)
Returns a newVkMemoryDedicatedRequirements.Buffer
instance allocated withmemAlloc
.static VkMemoryDedicatedRequirements
mallocStack()
Returns a newVkMemoryDedicatedRequirements
instance allocated on the thread-localMemoryStack
.static VkMemoryDedicatedRequirements.Buffer
mallocStack(int capacity)
Returns a newVkMemoryDedicatedRequirements.Buffer
instance allocated on the thread-localMemoryStack
.static VkMemoryDedicatedRequirements.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkMemoryDedicatedRequirements.Buffer
instance allocated on the specifiedMemoryStack
.static VkMemoryDedicatedRequirements
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkMemoryDedicatedRequirements
instance allocated on the specifiedMemoryStack
.static long
npNext(long struct)
Unsafe version ofpNext()
.static void
npNext(long struct, long value)
Unsafe version ofpNext
.static int
nprefersDedicatedAllocation(long struct)
Unsafe version ofprefersDedicatedAllocation()
.static int
nrequiresDedicatedAllocation(long struct)
Unsafe version ofrequiresDedicatedAllocation()
.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.VkMemoryDedicatedRequirements
pNext(long value)
Sets the specified value to thepNext
field.boolean
prefersDedicatedAllocation()
Returns the value of theprefersDedicatedAllocation
field.boolean
requiresDedicatedAllocation()
Returns the value of therequiresDedicatedAllocation
field.VkMemoryDedicatedRequirements
set(int sType, long pNext)
Initializes this struct with the specified values.VkMemoryDedicatedRequirements
set(VkMemoryDedicatedRequirements src)
Copies the specified struct data to this struct.int
sizeof()
int
sType()
Returns the value of thesType
field.VkMemoryDedicatedRequirements
sType(int value)
Sets the specified value to thesType
field.
-
-
-
Constructor Detail
-
VkMemoryDedicatedRequirements
public VkMemoryDedicatedRequirements(java.nio.ByteBuffer container)
Creates aVkMemoryDedicatedRequirements
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.
-
prefersDedicatedAllocation
public boolean prefersDedicatedAllocation()
Returns the value of theprefersDedicatedAllocation
field.
-
requiresDedicatedAllocation
public boolean requiresDedicatedAllocation()
Returns the value of therequiresDedicatedAllocation
field.
-
sType
public VkMemoryDedicatedRequirements sType(int value)
Sets the specified value 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 newVkMemoryDedicatedRequirements
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static VkMemoryDedicatedRequirements calloc()
Returns a newVkMemoryDedicatedRequirements
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static VkMemoryDedicatedRequirements create()
Returns a newVkMemoryDedicatedRequirements
instance allocated withBufferUtils
.
-
create
public static VkMemoryDedicatedRequirements create(long address)
Returns a newVkMemoryDedicatedRequirements
instance for the specified memory address.
-
createSafe
@Nullable public static VkMemoryDedicatedRequirements createSafe(long address)
-
malloc
public static VkMemoryDedicatedRequirements.Buffer malloc(int capacity)
Returns a newVkMemoryDedicatedRequirements.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static VkMemoryDedicatedRequirements.Buffer calloc(int capacity)
Returns a newVkMemoryDedicatedRequirements.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static VkMemoryDedicatedRequirements.Buffer create(int capacity)
Returns a newVkMemoryDedicatedRequirements.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static VkMemoryDedicatedRequirements.Buffer create(long address, int capacity)
Create aVkMemoryDedicatedRequirements.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static VkMemoryDedicatedRequirements.Buffer createSafe(long address, int capacity)
-
mallocStack
public static VkMemoryDedicatedRequirements mallocStack()
Returns a newVkMemoryDedicatedRequirements
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static VkMemoryDedicatedRequirements callocStack()
Returns a newVkMemoryDedicatedRequirements
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static VkMemoryDedicatedRequirements mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkMemoryDedicatedRequirements
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static VkMemoryDedicatedRequirements callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkMemoryDedicatedRequirements
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static VkMemoryDedicatedRequirements.Buffer mallocStack(int capacity)
Returns a newVkMemoryDedicatedRequirements.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static VkMemoryDedicatedRequirements.Buffer callocStack(int capacity)
Returns a newVkMemoryDedicatedRequirements.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static VkMemoryDedicatedRequirements.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkMemoryDedicatedRequirements.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static VkMemoryDedicatedRequirements.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkMemoryDedicatedRequirements.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()
.
-
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
.
-
-