Package org.lwjgl.vulkan
Class VkCoarseSampleOrderCustomNV
- All Implemented Interfaces:
AutoCloseable
,NativeResource
,Pointer
public class VkCoarseSampleOrderCustomNV
extends Struct<VkCoarseSampleOrderCustomNV>
implements NativeResource
Structure specifying parameters controlling shading rate image usage.
Description
The VkCoarseSampleOrderCustomNV
structure is used with a coverage sample ordering type of COARSE_SAMPLE_ORDER_TYPE_CUSTOM_NV
to specify the order of coverage samples for one combination of fragment width, fragment height, and coverage sample count.
When using a custom sample ordering, element j in pSampleLocations
specifies a specific pixel location and sample index that corresponds to coverage index j in the multi-pixel fragment.
Valid Usage
shadingRate
must be a shading rate that generates fragments with more than one pixelsampleCount
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
Layout
struct VkCoarseSampleOrderCustomNV {
VkShadingRatePaletteEntryNV shadingRate()
;
uint32_t sampleCount()
;
uint32_t sampleLocationCount()
;
VkCoarseSampleLocationNV
const * pSampleLocations()
;
}
-
Nested Class Summary
Nested classes/interfaces inherited from class org.lwjgl.system.Struct
Struct.StructValidation
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
The struct alignment in bytes.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct size in bytes.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE
-
Constructor Summary
ConstructorDescriptionVkCoarseSampleOrderCustomNV
(ByteBuffer container) Creates aVkCoarseSampleOrderCustomNV
instance at the current position of the specifiedByteBuffer
container. -
Method Summary
Modifier and TypeMethodDescriptionstatic VkCoarseSampleOrderCustomNV
calloc()
Returns a newVkCoarseSampleOrderCustomNV
instance allocated withmemCalloc
.calloc
(int capacity) Returns a newVkCoarseSampleOrderCustomNV.Buffer
instance allocated withmemCalloc
.calloc
(int capacity, MemoryStack stack) Returns a newVkCoarseSampleOrderCustomNV.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkCoarseSampleOrderCustomNV
calloc
(MemoryStack stack) Returns a newVkCoarseSampleOrderCustomNV
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkCoarseSampleOrderCustomNV
Deprecated.callocStack
(int capacity) Deprecated.callocStack
(int capacity, MemoryStack stack) Deprecated.static VkCoarseSampleOrderCustomNV
callocStack
(MemoryStack stack) Deprecated.static VkCoarseSampleOrderCustomNV
create()
Returns a newVkCoarseSampleOrderCustomNV
instance allocated withBufferUtils
.create
(int capacity) Returns a newVkCoarseSampleOrderCustomNV.Buffer
instance allocated withBufferUtils
.static VkCoarseSampleOrderCustomNV
create
(long address) Returns a newVkCoarseSampleOrderCustomNV
instance for the specified memory address.create
(long address, int capacity) Create aVkCoarseSampleOrderCustomNV.Buffer
instance at the specified memory.static VkCoarseSampleOrderCustomNV
createSafe
(long address) createSafe
(long address, int capacity) static VkCoarseSampleOrderCustomNV
malloc()
Returns a newVkCoarseSampleOrderCustomNV
instance allocated withmemAlloc
.malloc
(int capacity) Returns a newVkCoarseSampleOrderCustomNV.Buffer
instance allocated withmemAlloc
.malloc
(int capacity, MemoryStack stack) Returns a newVkCoarseSampleOrderCustomNV.Buffer
instance allocated on the specifiedMemoryStack
.static VkCoarseSampleOrderCustomNV
malloc
(MemoryStack stack) Returns a newVkCoarseSampleOrderCustomNV
instance allocated on the specifiedMemoryStack
.static VkCoarseSampleOrderCustomNV
Deprecated.mallocStack
(int capacity) Deprecated.mallocStack
(int capacity, MemoryStack stack) Deprecated.static VkCoarseSampleOrderCustomNV
mallocStack
(MemoryStack stack) Deprecated.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
.a pointer to an array ofVkCoarseSampleLocationNV
structures specifying the location of each sample in the custom ordering.Sets the address of the specifiedVkCoarseSampleLocationNV.Buffer
to thepSampleLocations()
field.int
identifies the per-pixel coverage sample count for the combination of fragment area and coverage sample count to control.sampleCount
(int value) Sets the specified value to thesampleCount()
field.int
specifies the number of sample locations in the custom ordering.set
(int shadingRate, int sampleCount, VkCoarseSampleLocationNV.Buffer pSampleLocations) Initializes this struct with the specified values.Copies the specified struct data to this struct.int
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.shadingRate
(int value) Sets the specified value to theshadingRate()
field.int
sizeof()
Returnssizeof(struct)
.static void
validate
(long struct) Validates pointer members that should not beNULL
.Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
Methods 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. -
SHADINGRATE
public static final int SHADINGRATEThe struct member offsets. -
SAMPLECOUNT
public static final int SAMPLECOUNTThe struct member offsets. -
SAMPLELOCATIONCOUNT
public static final int SAMPLELOCATIONCOUNTThe struct member offsets. -
PSAMPLELOCATIONS
public static final int PSAMPLELOCATIONSThe struct member offsets.
-
-
Constructor Details
-
VkCoarseSampleOrderCustomNV
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 Details
-
sizeof
public int sizeof()Description copied from class:Struct
Returnssizeof(struct)
.- Specified by:
sizeof
in classStruct<VkCoarseSampleOrderCustomNV>
-
shadingRate
public int 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
public int sampleCount()identifies the per-pixel coverage sample count for the combination of fragment area and coverage sample count to control. -
sampleLocationCount
public int sampleLocationCount()specifies the number of sample locations in the custom ordering. -
pSampleLocations
a pointer to an array ofVkCoarseSampleLocationNV
structures specifying the location of each sample in the custom ordering. -
shadingRate
Sets the specified value to theshadingRate()
field. -
sampleCount
Sets the specified value to thesampleCount()
field. -
pSampleLocations
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
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
Returns a newVkCoarseSampleOrderCustomNV
instance allocated withmemAlloc
. The instance must be explicitly freed. -
calloc
Returns a newVkCoarseSampleOrderCustomNV
instance allocated withmemCalloc
. The instance must be explicitly freed. -
create
Returns a newVkCoarseSampleOrderCustomNV
instance allocated withBufferUtils
. -
create
Returns a newVkCoarseSampleOrderCustomNV
instance for the specified memory address. -
createSafe
-
malloc
Returns a newVkCoarseSampleOrderCustomNV.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
Returns a newVkCoarseSampleOrderCustomNV.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
Returns a newVkCoarseSampleOrderCustomNV.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
Create aVkCoarseSampleOrderCustomNV.Buffer
instance 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 VkCoarseSampleOrderCustomNV.Buffer mallocStack(int capacity, MemoryStack stack) Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)
instead. -
callocStack
@Deprecated public static VkCoarseSampleOrderCustomNV.Buffer callocStack(int capacity, MemoryStack stack) Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)
instead. -
malloc
Returns a newVkCoarseSampleOrderCustomNV
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
Returns a newVkCoarseSampleOrderCustomNV
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
malloc
Returns a newVkCoarseSampleOrderCustomNV.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
calloc
Returns a newVkCoarseSampleOrderCustomNV.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
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
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
Unsafe version ofpSampleLocations
. -
validate
public static void validate(long struct) Validates pointer members that should not beNULL
.- Parameters:
struct
- the struct to validate
-