Package org.lwjgl.vulkan
Class VkMemoryPriorityAllocateInfoEXT
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.vulkan.VkMemoryPriorityAllocateInfoEXT
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
public class VkMemoryPriorityAllocateInfoEXT extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource
Specify a memory allocation priority.Description
Memory allocations with higher priority may be more likely to stay in device-local memory when the system is under memory pressure.
If this structure is not included, it is as if the
priority
value were0.5
.Valid Usage
priority
must be between 0 and 1, inclusive
Valid Usage (Implicit)
sType
must beSTRUCTURE_TYPE_MEMORY_PRIORITY_ALLOCATE_INFO_EXT
Member documentation
sType
– the type of this structure.pNext
–NULL
or a pointer to an extension-specific structure.priority
– a floating-point value between 0 and 1, indicating the priority of the allocation relative to other memory allocations. Larger values are higher priority. The granularity of the priorities is implementation-dependent.
Layout
struct VkMemoryPriorityAllocateInfoEXT { VkStructureType sType; void const * pNext; float priority; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
VkMemoryPriorityAllocateInfoEXT.Buffer
An array ofVkMemoryPriorityAllocateInfoEXT
structs.
-
Constructor Summary
Constructors Constructor Description VkMemoryPriorityAllocateInfoEXT(java.nio.ByteBuffer container)
Creates aVkMemoryPriorityAllocateInfoEXT
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 VkMemoryPriorityAllocateInfoEXT
calloc()
Returns a newVkMemoryPriorityAllocateInfoEXT
instance allocated withmemCalloc
.static VkMemoryPriorityAllocateInfoEXT.Buffer
calloc(int capacity)
Returns a newVkMemoryPriorityAllocateInfoEXT.Buffer
instance allocated withmemCalloc
.static VkMemoryPriorityAllocateInfoEXT
callocStack()
Returns a newVkMemoryPriorityAllocateInfoEXT
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkMemoryPriorityAllocateInfoEXT.Buffer
callocStack(int capacity)
Returns a newVkMemoryPriorityAllocateInfoEXT.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkMemoryPriorityAllocateInfoEXT.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkMemoryPriorityAllocateInfoEXT.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkMemoryPriorityAllocateInfoEXT
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkMemoryPriorityAllocateInfoEXT
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkMemoryPriorityAllocateInfoEXT
create()
Returns a newVkMemoryPriorityAllocateInfoEXT
instance allocated withBufferUtils
.static VkMemoryPriorityAllocateInfoEXT.Buffer
create(int capacity)
Returns a newVkMemoryPriorityAllocateInfoEXT.Buffer
instance allocated withBufferUtils
.static VkMemoryPriorityAllocateInfoEXT
create(long address)
Returns a newVkMemoryPriorityAllocateInfoEXT
instance for the specified memory address.static VkMemoryPriorityAllocateInfoEXT.Buffer
create(long address, int capacity)
Create aVkMemoryPriorityAllocateInfoEXT.Buffer
instance at the specified memory.static VkMemoryPriorityAllocateInfoEXT
createSafe(long address)
static VkMemoryPriorityAllocateInfoEXT.Buffer
createSafe(long address, int capacity)
static VkMemoryPriorityAllocateInfoEXT
malloc()
Returns a newVkMemoryPriorityAllocateInfoEXT
instance allocated withmemAlloc
.static VkMemoryPriorityAllocateInfoEXT.Buffer
malloc(int capacity)
Returns a newVkMemoryPriorityAllocateInfoEXT.Buffer
instance allocated withmemAlloc
.static VkMemoryPriorityAllocateInfoEXT
mallocStack()
Returns a newVkMemoryPriorityAllocateInfoEXT
instance allocated on the thread-localMemoryStack
.static VkMemoryPriorityAllocateInfoEXT.Buffer
mallocStack(int capacity)
Returns a newVkMemoryPriorityAllocateInfoEXT.Buffer
instance allocated on the thread-localMemoryStack
.static VkMemoryPriorityAllocateInfoEXT.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkMemoryPriorityAllocateInfoEXT.Buffer
instance allocated on the specifiedMemoryStack
.static VkMemoryPriorityAllocateInfoEXT
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkMemoryPriorityAllocateInfoEXT
instance allocated on the specifiedMemoryStack
.static long
npNext(long struct)
Unsafe version ofpNext()
.static void
npNext(long struct, long value)
Unsafe version ofpNext
.static float
npriority(long struct)
Unsafe version ofpriority()
.static void
npriority(long struct, float value)
Unsafe version ofpriority
.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.VkMemoryPriorityAllocateInfoEXT
pNext(long value)
Sets the specified value to thepNext
field.float
priority()
Returns the value of thepriority
field.VkMemoryPriorityAllocateInfoEXT
priority(float value)
Sets the specified value to thepriority
field.VkMemoryPriorityAllocateInfoEXT
set(int sType, long pNext, float priority)
Initializes this struct with the specified values.VkMemoryPriorityAllocateInfoEXT
set(VkMemoryPriorityAllocateInfoEXT src)
Copies the specified struct data to this struct.int
sizeof()
int
sType()
Returns the value of thesType
field.VkMemoryPriorityAllocateInfoEXT
sType(int value)
Sets the specified value to thesType
field.
-
-
-
Constructor Detail
-
VkMemoryPriorityAllocateInfoEXT
public VkMemoryPriorityAllocateInfoEXT(java.nio.ByteBuffer container)
Creates aVkMemoryPriorityAllocateInfoEXT
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.
-
priority
public float priority()
Returns the value of thepriority
field.
-
sType
public VkMemoryPriorityAllocateInfoEXT sType(int value)
Sets the specified value to thesType
field.
-
pNext
public VkMemoryPriorityAllocateInfoEXT pNext(long value)
Sets the specified value to thepNext
field.
-
priority
public VkMemoryPriorityAllocateInfoEXT priority(float value)
Sets the specified value to thepriority
field.
-
set
public VkMemoryPriorityAllocateInfoEXT set(int sType, long pNext, float priority)
Initializes this struct with the specified values.
-
set
public VkMemoryPriorityAllocateInfoEXT set(VkMemoryPriorityAllocateInfoEXT src)
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
public static VkMemoryPriorityAllocateInfoEXT malloc()
Returns a newVkMemoryPriorityAllocateInfoEXT
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static VkMemoryPriorityAllocateInfoEXT calloc()
Returns a newVkMemoryPriorityAllocateInfoEXT
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static VkMemoryPriorityAllocateInfoEXT create()
Returns a newVkMemoryPriorityAllocateInfoEXT
instance allocated withBufferUtils
.
-
create
public static VkMemoryPriorityAllocateInfoEXT create(long address)
Returns a newVkMemoryPriorityAllocateInfoEXT
instance for the specified memory address.
-
createSafe
@Nullable public static VkMemoryPriorityAllocateInfoEXT createSafe(long address)
-
malloc
public static VkMemoryPriorityAllocateInfoEXT.Buffer malloc(int capacity)
Returns a newVkMemoryPriorityAllocateInfoEXT.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static VkMemoryPriorityAllocateInfoEXT.Buffer calloc(int capacity)
Returns a newVkMemoryPriorityAllocateInfoEXT.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static VkMemoryPriorityAllocateInfoEXT.Buffer create(int capacity)
Returns a newVkMemoryPriorityAllocateInfoEXT.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static VkMemoryPriorityAllocateInfoEXT.Buffer create(long address, int capacity)
Create aVkMemoryPriorityAllocateInfoEXT.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static VkMemoryPriorityAllocateInfoEXT.Buffer createSafe(long address, int capacity)
-
mallocStack
public static VkMemoryPriorityAllocateInfoEXT mallocStack()
Returns a newVkMemoryPriorityAllocateInfoEXT
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static VkMemoryPriorityAllocateInfoEXT callocStack()
Returns a newVkMemoryPriorityAllocateInfoEXT
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static VkMemoryPriorityAllocateInfoEXT mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkMemoryPriorityAllocateInfoEXT
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static VkMemoryPriorityAllocateInfoEXT callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkMemoryPriorityAllocateInfoEXT
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static VkMemoryPriorityAllocateInfoEXT.Buffer mallocStack(int capacity)
Returns a newVkMemoryPriorityAllocateInfoEXT.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static VkMemoryPriorityAllocateInfoEXT.Buffer callocStack(int capacity)
Returns a newVkMemoryPriorityAllocateInfoEXT.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static VkMemoryPriorityAllocateInfoEXT.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkMemoryPriorityAllocateInfoEXT.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static VkMemoryPriorityAllocateInfoEXT.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkMemoryPriorityAllocateInfoEXT.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()
.
-
npriority
public static float npriority(long struct)
Unsafe version ofpriority()
.
-
nsType
public static void nsType(long struct, int value)
Unsafe version ofsType
.
-
npNext
public static void npNext(long struct, long value)
Unsafe version ofpNext
.
-
npriority
public static void npriority(long struct, float value)
Unsafe version ofpriority
.
-
-