Package org.lwjgl.vulkan
Class VkCoarseSampleOrderCustomNV
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.vulkan.VkCoarseSampleOrderCustomNV
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
public class VkCoarseSampleOrderCustomNV extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource
Structure specifying parameters controlling shading rate image usage.Description
When using a custom sample ordering, element i in
pSampleLocations
specifies a specific pixel and per-pixel coverage sample number that corresponds to the coverage sample numbered i in the multi-pixel fragment.Valid Usage
shadingRate
must be a shading rate that generates fragments with more than one pixel.sampleCount
must correspond to a sample count enumerated inVkSampleCountFlags
whose corresponding bit is set inVkPhysicalDeviceLimits
::framebufferNoAttachmentsSampleCounts
.sampleLocationCount
must be equal to the product ofsampleCount
, the fragment width forshadingRate
, and the fragment height forshadingRate
.sampleLocationCount
must be less than or equal to the value ofVkPhysicalDeviceShadingRateImagePropertiesNV
::shadingRateMaxCoarseSamples
.- The array
pSampleLocations
must contain exactly one entry for every combination of valid values forpixelX
,pixelY
, andsample
in the structureVkCoarseSampleOrderCustomNV
.
Valid Usage (Implicit)
shadingRate
must be a validVkShadingRatePaletteEntryNV
valuepSampleLocations
must be a valid pointer to an array ofsampleLocationCount
VkCoarseSampleLocationNV
structuressampleLocationCount
must be greater than 0
See Also
VkCoarseSampleLocationNV
,VkPipelineViewportCoarseSampleOrderStateCreateInfoNV
,CmdSetCoarseSampleOrderNV
Member documentation
shadingRate
– a shading rate palette entry that identifies the fragment width and height for the combination of fragment area and per-pixel coverage sample count to control.sampleCount
– identifies the per-pixel coverage sample count for the combination of fragment area and coverage sample count to control.sampleLocationCount
– specifies the number of sample locations in the custom ordering.pSampleLocations
– a pointer to an array ofVkCoarseSampleOrderCustomNV
structures that specifies the location of each sample in the custom ordering.
Layout
struct VkCoarseSampleOrderCustomNV { VkShadingRatePaletteEntryNV shadingRate; uint32_t sampleCount; uint32_t sampleLocationCount;
VkCoarseSampleLocationNV
const * pSampleLocations; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
VkCoarseSampleOrderCustomNV.Buffer
An array ofVkCoarseSampleOrderCustomNV
structs.
-
Field Summary
Fields Modifier and Type Field Description static int
ALIGNOF
The struct alignment in bytes.static int
PSAMPLELOCATIONS
SAMPLECOUNT
SAMPLELOCATIONCOUNT
SHADINGRATEThe struct member offsets.static int
SIZEOF
The struct size in bytes.
-
Constructor Summary
Constructors Constructor Description VkCoarseSampleOrderCustomNV(java.nio.ByteBuffer container)
Creates aVkCoarseSampleOrderCustomNV
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 VkCoarseSampleOrderCustomNV
calloc()
Returns a newVkCoarseSampleOrderCustomNV
instance allocated withmemCalloc
.static VkCoarseSampleOrderCustomNV.Buffer
calloc(int capacity)
Returns a newVkCoarseSampleOrderCustomNV.Buffer
instance allocated withmemCalloc
.static VkCoarseSampleOrderCustomNV
callocStack()
Returns a newVkCoarseSampleOrderCustomNV
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkCoarseSampleOrderCustomNV.Buffer
callocStack(int capacity)
Returns a newVkCoarseSampleOrderCustomNV.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkCoarseSampleOrderCustomNV.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkCoarseSampleOrderCustomNV.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkCoarseSampleOrderCustomNV
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkCoarseSampleOrderCustomNV
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkCoarseSampleOrderCustomNV
create()
Returns a newVkCoarseSampleOrderCustomNV
instance allocated withBufferUtils
.static VkCoarseSampleOrderCustomNV.Buffer
create(int capacity)
Returns a newVkCoarseSampleOrderCustomNV.Buffer
instance allocated withBufferUtils
.static VkCoarseSampleOrderCustomNV
create(long address)
Returns a newVkCoarseSampleOrderCustomNV
instance for the specified memory address.static VkCoarseSampleOrderCustomNV.Buffer
create(long address, int capacity)
Create aVkCoarseSampleOrderCustomNV.Buffer
instance at the specified memory.static VkCoarseSampleOrderCustomNV
createSafe(long address)
static VkCoarseSampleOrderCustomNV.Buffer
createSafe(long address, int capacity)
static VkCoarseSampleOrderCustomNV
malloc()
Returns a newVkCoarseSampleOrderCustomNV
instance allocated withmemAlloc
.static VkCoarseSampleOrderCustomNV.Buffer
malloc(int capacity)
Returns a newVkCoarseSampleOrderCustomNV.Buffer
instance allocated withmemAlloc
.static VkCoarseSampleOrderCustomNV
mallocStack()
Returns a newVkCoarseSampleOrderCustomNV
instance allocated on the thread-localMemoryStack
.static VkCoarseSampleOrderCustomNV.Buffer
mallocStack(int capacity)
Returns a newVkCoarseSampleOrderCustomNV.Buffer
instance allocated on the thread-localMemoryStack
.static VkCoarseSampleOrderCustomNV.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkCoarseSampleOrderCustomNV.Buffer
instance allocated on the specifiedMemoryStack
.static VkCoarseSampleOrderCustomNV
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkCoarseSampleOrderCustomNV
instance allocated on the specifiedMemoryStack
.static VkCoarseSampleLocationNV.Buffer
npSampleLocations(long struct)
Unsafe version ofpSampleLocations()
.static void
npSampleLocations(long struct, VkCoarseSampleLocationNV.Buffer value)
Unsafe version ofpSampleLocations
.static int
nsampleCount(long struct)
Unsafe version ofsampleCount()
.static void
nsampleCount(long struct, int value)
Unsafe version ofsampleCount
.static int
nsampleLocationCount(long struct)
Unsafe version ofsampleLocationCount()
.static void
nsampleLocationCount(long struct, int value)
Sets the specified value to thesampleLocationCount
field of the specifiedstruct
.static int
nshadingRate(long struct)
Unsafe version ofshadingRate()
.static void
nshadingRate(long struct, int value)
Unsafe version ofshadingRate
.VkCoarseSampleLocationNV.Buffer
pSampleLocations()
Returns aVkCoarseSampleLocationNV.Buffer
view of the struct array pointed to by thepSampleLocations
field.VkCoarseSampleOrderCustomNV
pSampleLocations(VkCoarseSampleLocationNV.Buffer value)
Sets the address of the specifiedVkCoarseSampleLocationNV.Buffer
to thepSampleLocations
field.int
sampleCount()
Returns the value of thesampleCount
field.VkCoarseSampleOrderCustomNV
sampleCount(int value)
Sets the specified value to thesampleCount
field.int
sampleLocationCount()
Returns the value of thesampleLocationCount
field.VkCoarseSampleOrderCustomNV
set(int shadingRate, int sampleCount, VkCoarseSampleLocationNV.Buffer pSampleLocations)
Initializes this struct with the specified values.VkCoarseSampleOrderCustomNV
set(VkCoarseSampleOrderCustomNV src)
Copies the specified struct data to this struct.int
shadingRate()
Returns the value of theshadingRate
field.VkCoarseSampleOrderCustomNV
shadingRate(int value)
Sets the specified value to theshadingRate
field.int
sizeof()
static void
validate(long struct)
Validates pointer members that should not beNULL
.static void
validate(long array, int count)
Callsvalidate(long)
for each struct contained in the specified struct array.
-
-
-
Constructor Detail
-
VkCoarseSampleOrderCustomNV
public VkCoarseSampleOrderCustomNV(java.nio.ByteBuffer container)
Creates aVkCoarseSampleOrderCustomNV
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
-
shadingRate
public int shadingRate()
Returns the value of theshadingRate
field.
-
sampleCount
public int sampleCount()
Returns the value of thesampleCount
field.
-
sampleLocationCount
public int sampleLocationCount()
Returns the value of thesampleLocationCount
field.
-
pSampleLocations
public VkCoarseSampleLocationNV.Buffer pSampleLocations()
Returns aVkCoarseSampleLocationNV.Buffer
view of the struct array pointed to by thepSampleLocations
field.
-
shadingRate
public VkCoarseSampleOrderCustomNV shadingRate(int value)
Sets the specified value to theshadingRate
field.
-
sampleCount
public VkCoarseSampleOrderCustomNV sampleCount(int value)
Sets the specified value to thesampleCount
field.
-
pSampleLocations
public VkCoarseSampleOrderCustomNV pSampleLocations(VkCoarseSampleLocationNV.Buffer value)
Sets the address of the specifiedVkCoarseSampleLocationNV.Buffer
to thepSampleLocations
field.
-
set
public VkCoarseSampleOrderCustomNV set(int shadingRate, int sampleCount, VkCoarseSampleLocationNV.Buffer pSampleLocations)
Initializes this struct with the specified values.
-
set
public VkCoarseSampleOrderCustomNV set(VkCoarseSampleOrderCustomNV src)
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
public static VkCoarseSampleOrderCustomNV malloc()
Returns a newVkCoarseSampleOrderCustomNV
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static VkCoarseSampleOrderCustomNV calloc()
Returns a newVkCoarseSampleOrderCustomNV
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static VkCoarseSampleOrderCustomNV create()
Returns a newVkCoarseSampleOrderCustomNV
instance allocated withBufferUtils
.
-
create
public static VkCoarseSampleOrderCustomNV create(long address)
Returns a newVkCoarseSampleOrderCustomNV
instance for the specified memory address.
-
createSafe
@Nullable public static VkCoarseSampleOrderCustomNV createSafe(long address)
-
malloc
public static VkCoarseSampleOrderCustomNV.Buffer malloc(int capacity)
Returns a newVkCoarseSampleOrderCustomNV.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static VkCoarseSampleOrderCustomNV.Buffer calloc(int capacity)
Returns a newVkCoarseSampleOrderCustomNV.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static VkCoarseSampleOrderCustomNV.Buffer create(int capacity)
Returns a newVkCoarseSampleOrderCustomNV.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static VkCoarseSampleOrderCustomNV.Buffer create(long address, int capacity)
Create aVkCoarseSampleOrderCustomNV.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static VkCoarseSampleOrderCustomNV.Buffer createSafe(long address, int capacity)
-
mallocStack
public static VkCoarseSampleOrderCustomNV mallocStack()
Returns a newVkCoarseSampleOrderCustomNV
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static VkCoarseSampleOrderCustomNV callocStack()
Returns a newVkCoarseSampleOrderCustomNV
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static VkCoarseSampleOrderCustomNV mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkCoarseSampleOrderCustomNV
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static VkCoarseSampleOrderCustomNV callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkCoarseSampleOrderCustomNV
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static VkCoarseSampleOrderCustomNV.Buffer mallocStack(int capacity)
Returns a newVkCoarseSampleOrderCustomNV.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static VkCoarseSampleOrderCustomNV.Buffer callocStack(int capacity)
Returns a newVkCoarseSampleOrderCustomNV.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static VkCoarseSampleOrderCustomNV.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkCoarseSampleOrderCustomNV.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static VkCoarseSampleOrderCustomNV.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkCoarseSampleOrderCustomNV.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
nshadingRate
public static int nshadingRate(long struct)
Unsafe version ofshadingRate()
.
-
nsampleCount
public static int nsampleCount(long struct)
Unsafe version ofsampleCount()
.
-
nsampleLocationCount
public static int nsampleLocationCount(long struct)
Unsafe version ofsampleLocationCount()
.
-
npSampleLocations
public static VkCoarseSampleLocationNV.Buffer npSampleLocations(long struct)
Unsafe version ofpSampleLocations()
.
-
nshadingRate
public static void nshadingRate(long struct, int value)
Unsafe version ofshadingRate
.
-
nsampleCount
public static void nsampleCount(long struct, int value)
Unsafe version ofsampleCount
.
-
nsampleLocationCount
public static void nsampleLocationCount(long struct, int value)
Sets the specified value to thesampleLocationCount
field of the specifiedstruct
.
-
npSampleLocations
public static void npSampleLocations(long struct, VkCoarseSampleLocationNV.Buffer value)
Unsafe version ofpSampleLocations
.
-
validate
public static void validate(long struct)
Validates pointer members that should not beNULL
.- Parameters:
struct
- the struct to validate
-
validate
public static void validate(long array, int count)
Callsvalidate(long)
for each struct contained in the specified struct array.- Parameters:
array
- the struct array to validatecount
- the number of structs inarray
-
-