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.NativeResourceStructure specifying parameters controlling shading rate image usage.Description
When using a custom sample ordering, element i in
pSampleLocationsspecifies a specific pixel and per-pixel coverage sample number that corresponds to the coverage sample numbered i in the multi-pixel fragment.Valid Usage
shadingRatemust be a shading rate that generates fragments with more than one pixel.sampleCountmust correspond to a sample count enumerated inVkSampleCountFlagswhose corresponding bit is set inVkPhysicalDeviceLimits::framebufferNoAttachmentsSampleCounts.sampleLocationCountmust be equal to the product ofsampleCount, the fragment width forshadingRate, and the fragment height forshadingRate.sampleLocationCountmust be less than or equal to the value ofVkPhysicalDeviceShadingRateImagePropertiesNV::shadingRateMaxCoarseSamples.- The array
pSampleLocationsmust contain exactly one entry for every combination of valid values forpixelX,pixelY, andsamplein the structureVkCoarseSampleOrderCustomNV.
Valid Usage (Implicit)
shadingRatemust be a validVkShadingRatePaletteEntryNVvaluepSampleLocationsmust be a valid pointer to an array ofsampleLocationCountVkCoarseSampleLocationNVstructuressampleLocationCountmust be greater than 0
See Also
VkCoarseSampleLocationNV,VkPipelineViewportCoarseSampleOrderStateCreateInfoNV,CmdSetCoarseSampleOrderNVMember 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 ofVkCoarseSampleOrderCustomNVstructures that specifies the location of each sample in the custom ordering.
Layout
struct VkCoarseSampleOrderCustomNV { VkShadingRatePaletteEntryNV shadingRate; uint32_t sampleCount; uint32_t sampleLocationCount;VkCoarseSampleLocationNVconst * pSampleLocations; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classVkCoarseSampleOrderCustomNV.BufferAn array ofVkCoarseSampleOrderCustomNVstructs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intPSAMPLELOCATIONS
SAMPLECOUNT
SAMPLELOCATIONCOUNT
SHADINGRATEThe struct member offsets.static intSIZEOFThe struct size in bytes.
-
Constructor Summary
Constructors Constructor Description VkCoarseSampleOrderCustomNV(java.nio.ByteBuffer container)Creates aVkCoarseSampleOrderCustomNVinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static VkCoarseSampleOrderCustomNVcalloc()Returns a newVkCoarseSampleOrderCustomNVinstance allocated withmemCalloc.static VkCoarseSampleOrderCustomNV.Buffercalloc(int capacity)Returns a newVkCoarseSampleOrderCustomNV.Bufferinstance allocated withmemCalloc.static VkCoarseSampleOrderCustomNVcallocStack()Returns a newVkCoarseSampleOrderCustomNVinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static VkCoarseSampleOrderCustomNV.BuffercallocStack(int capacity)Returns a newVkCoarseSampleOrderCustomNV.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static VkCoarseSampleOrderCustomNV.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkCoarseSampleOrderCustomNV.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkCoarseSampleOrderCustomNVcallocStack(org.lwjgl.system.MemoryStack stack)Returns a newVkCoarseSampleOrderCustomNVinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkCoarseSampleOrderCustomNVcreate()Returns a newVkCoarseSampleOrderCustomNVinstance allocated withBufferUtils.static VkCoarseSampleOrderCustomNV.Buffercreate(int capacity)Returns a newVkCoarseSampleOrderCustomNV.Bufferinstance allocated withBufferUtils.static VkCoarseSampleOrderCustomNVcreate(long address)Returns a newVkCoarseSampleOrderCustomNVinstance for the specified memory address.static VkCoarseSampleOrderCustomNV.Buffercreate(long address, int capacity)Create aVkCoarseSampleOrderCustomNV.Bufferinstance at the specified memory.static VkCoarseSampleOrderCustomNVcreateSafe(long address)static VkCoarseSampleOrderCustomNV.BuffercreateSafe(long address, int capacity)static VkCoarseSampleOrderCustomNVmalloc()Returns a newVkCoarseSampleOrderCustomNVinstance allocated withmemAlloc.static VkCoarseSampleOrderCustomNV.Buffermalloc(int capacity)Returns a newVkCoarseSampleOrderCustomNV.Bufferinstance allocated withmemAlloc.static VkCoarseSampleOrderCustomNVmallocStack()Returns a newVkCoarseSampleOrderCustomNVinstance allocated on the thread-localMemoryStack.static VkCoarseSampleOrderCustomNV.BuffermallocStack(int capacity)Returns a newVkCoarseSampleOrderCustomNV.Bufferinstance allocated on the thread-localMemoryStack.static VkCoarseSampleOrderCustomNV.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkCoarseSampleOrderCustomNV.Bufferinstance allocated on the specifiedMemoryStack.static VkCoarseSampleOrderCustomNVmallocStack(org.lwjgl.system.MemoryStack stack)Returns a newVkCoarseSampleOrderCustomNVinstance allocated on the specifiedMemoryStack.static VkCoarseSampleLocationNV.BuffernpSampleLocations(long struct)Unsafe version ofpSampleLocations().static voidnpSampleLocations(long struct, VkCoarseSampleLocationNV.Buffer value)Unsafe version ofpSampleLocations.static intnsampleCount(long struct)Unsafe version ofsampleCount().static voidnsampleCount(long struct, int value)Unsafe version ofsampleCount.static intnsampleLocationCount(long struct)Unsafe version ofsampleLocationCount().static voidnsampleLocationCount(long struct, int value)Sets the specified value to thesampleLocationCountfield of the specifiedstruct.static intnshadingRate(long struct)Unsafe version ofshadingRate().static voidnshadingRate(long struct, int value)Unsafe version ofshadingRate.VkCoarseSampleLocationNV.BufferpSampleLocations()Returns aVkCoarseSampleLocationNV.Bufferview of the struct array pointed to by thepSampleLocationsfield.VkCoarseSampleOrderCustomNVpSampleLocations(VkCoarseSampleLocationNV.Buffer value)Sets the address of the specifiedVkCoarseSampleLocationNV.Bufferto thepSampleLocationsfield.intsampleCount()Returns the value of thesampleCountfield.VkCoarseSampleOrderCustomNVsampleCount(int value)Sets the specified value to thesampleCountfield.intsampleLocationCount()Returns the value of thesampleLocationCountfield.VkCoarseSampleOrderCustomNVset(int shadingRate, int sampleCount, VkCoarseSampleLocationNV.Buffer pSampleLocations)Initializes this struct with the specified values.VkCoarseSampleOrderCustomNVset(VkCoarseSampleOrderCustomNV src)Copies the specified struct data to this struct.intshadingRate()Returns the value of theshadingRatefield.VkCoarseSampleOrderCustomNVshadingRate(int value)Sets the specified value to theshadingRatefield.intsizeof()static voidvalidate(long struct)Validates pointer members that should not beNULL.static voidvalidate(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 aVkCoarseSampleOrderCustomNVinstance 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
-
shadingRate
public int shadingRate()
Returns the value of theshadingRatefield.
-
sampleCount
public int sampleCount()
Returns the value of thesampleCountfield.
-
sampleLocationCount
public int sampleLocationCount()
Returns the value of thesampleLocationCountfield.
-
pSampleLocations
public VkCoarseSampleLocationNV.Buffer pSampleLocations()
Returns aVkCoarseSampleLocationNV.Bufferview of the struct array pointed to by thepSampleLocationsfield.
-
shadingRate
public VkCoarseSampleOrderCustomNV shadingRate(int value)
Sets the specified value to theshadingRatefield.
-
sampleCount
public VkCoarseSampleOrderCustomNV sampleCount(int value)
Sets the specified value to thesampleCountfield.
-
pSampleLocations
public VkCoarseSampleOrderCustomNV pSampleLocations(VkCoarseSampleLocationNV.Buffer value)
Sets the address of the specifiedVkCoarseSampleLocationNV.Bufferto thepSampleLocationsfield.
-
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 newVkCoarseSampleOrderCustomNVinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static VkCoarseSampleOrderCustomNV calloc()
Returns a newVkCoarseSampleOrderCustomNVinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static VkCoarseSampleOrderCustomNV create()
Returns a newVkCoarseSampleOrderCustomNVinstance allocated withBufferUtils.
-
create
public static VkCoarseSampleOrderCustomNV create(long address)
Returns a newVkCoarseSampleOrderCustomNVinstance for the specified memory address.
-
createSafe
@Nullable public static VkCoarseSampleOrderCustomNV createSafe(long address)
-
malloc
public static VkCoarseSampleOrderCustomNV.Buffer malloc(int capacity)
Returns a newVkCoarseSampleOrderCustomNV.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static VkCoarseSampleOrderCustomNV.Buffer calloc(int capacity)
Returns a newVkCoarseSampleOrderCustomNV.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static VkCoarseSampleOrderCustomNV.Buffer create(int capacity)
Returns a newVkCoarseSampleOrderCustomNV.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static VkCoarseSampleOrderCustomNV.Buffer create(long address, int capacity)
Create aVkCoarseSampleOrderCustomNV.Bufferinstance 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 newVkCoarseSampleOrderCustomNVinstance allocated on the thread-localMemoryStack.
-
callocStack
public static VkCoarseSampleOrderCustomNV callocStack()
Returns a newVkCoarseSampleOrderCustomNVinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static VkCoarseSampleOrderCustomNV mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkCoarseSampleOrderCustomNVinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static VkCoarseSampleOrderCustomNV callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkCoarseSampleOrderCustomNVinstance allocated on the specifiedMemoryStackand 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.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static VkCoarseSampleOrderCustomNV.Buffer callocStack(int capacity)
Returns a newVkCoarseSampleOrderCustomNV.Bufferinstance allocated on the thread-localMemoryStackand 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.Bufferinstance 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.Bufferinstance allocated on the specifiedMemoryStackand 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 thesampleLocationCountfield 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
-
-