Class VkPipelineCoverageModulationStateCreateInfoNV
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.vulkan.VkPipelineCoverageModulationStateCreateInfoNV
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,NativeResource
,Pointer
public class VkPipelineCoverageModulationStateCreateInfoNV extends Struct implements NativeResource
Structure specifying parameters controlling coverage modulation.Description
If
coverageModulationTableEnable
isFALSE
, then for each color sample the associated bits of the fragment's coverage are counted and divided by the number of associated bits to produce a modulation factorR
in the range(0,1]
(a value of zero would have been killed due to a color coverage of 0). Specifically:N
= value ofrasterizationSamples
M
= value ofVkAttachmentDescription
::samples
for any color attachmentsR = popcount(associated coverage bits) / (N / M)
If
coverageModulationTableEnable
isTRUE
, the valueR
is computed using a programmable lookup table. The lookup table hasN / M
elements, and the element of the table is selected by:R = pCoverageModulationTable[popcount(associated coverage bits)-1]
Note that the table does not have an entry for
popcount(associated coverage bits) = 0
, because such samples would have been killed.The values of
pCoverageModulationTable
may be rounded to an implementation-dependent precision, which is at least as fine as1 / N
, and clamped to[0,1]
.For each color attachment with a floating point or normalized color format, each fragment output color value is replicated to
M
values which can each be modulated (multiplied) by that color sample's associated value ofR
. Which components are modulated is controlled bycoverageModulationMode
.If this structure is not present, it is as if coverageModulationMode is
COVERAGE_MODULATION_MODE_NONE_NV
.Valid Usage
- If
coverageModulationTableEnable
isTRUE
,coverageModulationTableCount
must be equal to the number of rasterization samples divided by the number of color samples in the subpass.
Valid Usage (Implicit)
sType
must beSTRUCTURE_TYPE_PIPELINE_COVERAGE_MODULATION_STATE_CREATE_INFO_NV
flags
must be 0coverageModulationMode
must be a validVkCoverageModulationModeNV
valuecoverageModulationTableCount
must be greater than 0
Member documentation
sType
– the type of this structure.pNext
–NULL
or a pointer to an extension-specific structure.flags
– reserved for future use.coverageModulationMode
– controls which color components are modulated and is of typeVkCoverageModulationModeNV
.coverageModulationTableEnable
– controls whether the modulation factor is looked up from a table inpCoverageModulationTable
.coverageModulationTableCount
– the number of elements inpCoverageModulationTable
.pCoverageModulationTable
– a table of modulation factors containing a value for each number of covered samples.
Layout
struct VkPipelineCoverageModulationStateCreateInfoNV { VkStructureType sType; void const * pNext; VkPipelineCoverageModulationStateCreateFlagsNV flags; VkCoverageModulationModeNV coverageModulationMode; VkBool32 coverageModulationTableEnable; uint32_t coverageModulationTableCount; float const * pCoverageModulationTable; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
VkPipelineCoverageModulationStateCreateInfoNV.Buffer
An array ofVkPipelineCoverageModulationStateCreateInfoNV
structs.-
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
-
Field Summary
Fields Modifier and Type Field Description static int
ALIGNOF
The struct alignment in bytes.static int
COVERAGEMODULATIONMODE
COVERAGEMODULATIONTABLECOUNT
COVERAGEMODULATIONTABLEENABLE
FLAGS
PCOVERAGEMODULATIONTABLE
PNEXTThe struct member offsets.static int
SIZEOF
The struct size in bytes.static int
STYPE
The struct member offsets.-
Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, POINTER_SHIFT, POINTER_SIZE
-
-
Constructor Summary
Constructors Constructor Description VkPipelineCoverageModulationStateCreateInfoNV(java.nio.ByteBuffer container)
Creates aVkPipelineCoverageModulationStateCreateInfoNV
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 VkPipelineCoverageModulationStateCreateInfoNV
calloc()
Returns a newVkPipelineCoverageModulationStateCreateInfoNV
instance allocated withmemCalloc
.static VkPipelineCoverageModulationStateCreateInfoNV.Buffer
calloc(int capacity)
Returns a newVkPipelineCoverageModulationStateCreateInfoNV.Buffer
instance allocated withmemCalloc
.static VkPipelineCoverageModulationStateCreateInfoNV
callocStack()
Returns a newVkPipelineCoverageModulationStateCreateInfoNV
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkPipelineCoverageModulationStateCreateInfoNV.Buffer
callocStack(int capacity)
Returns a newVkPipelineCoverageModulationStateCreateInfoNV.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkPipelineCoverageModulationStateCreateInfoNV.Buffer
callocStack(int capacity, MemoryStack stack)
Returns a newVkPipelineCoverageModulationStateCreateInfoNV.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkPipelineCoverageModulationStateCreateInfoNV
callocStack(MemoryStack stack)
Returns a newVkPipelineCoverageModulationStateCreateInfoNV
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.int
coverageModulationMode()
Returns the value of thecoverageModulationMode
field.VkPipelineCoverageModulationStateCreateInfoNV
coverageModulationMode(int value)
Sets the specified value to thecoverageModulationMode
field.int
coverageModulationTableCount()
Returns the value of thecoverageModulationTableCount
field.VkPipelineCoverageModulationStateCreateInfoNV
coverageModulationTableCount(int value)
Sets the specified value to thecoverageModulationTableCount
field.boolean
coverageModulationTableEnable()
Returns the value of thecoverageModulationTableEnable
field.VkPipelineCoverageModulationStateCreateInfoNV
coverageModulationTableEnable(boolean value)
Sets the specified value to thecoverageModulationTableEnable
field.static VkPipelineCoverageModulationStateCreateInfoNV
create()
Returns a newVkPipelineCoverageModulationStateCreateInfoNV
instance allocated withBufferUtils
.static VkPipelineCoverageModulationStateCreateInfoNV.Buffer
create(int capacity)
Returns a newVkPipelineCoverageModulationStateCreateInfoNV.Buffer
instance allocated withBufferUtils
.static VkPipelineCoverageModulationStateCreateInfoNV
create(long address)
Returns a newVkPipelineCoverageModulationStateCreateInfoNV
instance for the specified memory address.static VkPipelineCoverageModulationStateCreateInfoNV.Buffer
create(long address, int capacity)
Create aVkPipelineCoverageModulationStateCreateInfoNV.Buffer
instance at the specified memory.static VkPipelineCoverageModulationStateCreateInfoNV
createSafe(long address)
static VkPipelineCoverageModulationStateCreateInfoNV.Buffer
createSafe(long address, int capacity)
int
flags()
Returns the value of theflags
field.VkPipelineCoverageModulationStateCreateInfoNV
flags(int value)
Sets the specified value to theflags
field.static VkPipelineCoverageModulationStateCreateInfoNV
malloc()
Returns a newVkPipelineCoverageModulationStateCreateInfoNV
instance allocated withmemAlloc
.static VkPipelineCoverageModulationStateCreateInfoNV.Buffer
malloc(int capacity)
Returns a newVkPipelineCoverageModulationStateCreateInfoNV.Buffer
instance allocated withmemAlloc
.static VkPipelineCoverageModulationStateCreateInfoNV
mallocStack()
Returns a newVkPipelineCoverageModulationStateCreateInfoNV
instance allocated on the thread-localMemoryStack
.static VkPipelineCoverageModulationStateCreateInfoNV.Buffer
mallocStack(int capacity)
Returns a newVkPipelineCoverageModulationStateCreateInfoNV.Buffer
instance allocated on the thread-localMemoryStack
.static VkPipelineCoverageModulationStateCreateInfoNV.Buffer
mallocStack(int capacity, MemoryStack stack)
Returns a newVkPipelineCoverageModulationStateCreateInfoNV.Buffer
instance allocated on the specifiedMemoryStack
.static VkPipelineCoverageModulationStateCreateInfoNV
mallocStack(MemoryStack stack)
Returns a newVkPipelineCoverageModulationStateCreateInfoNV
instance allocated on the specifiedMemoryStack
.static int
ncoverageModulationMode(long struct)
Unsafe version ofcoverageModulationMode()
.static void
ncoverageModulationMode(long struct, int value)
Unsafe version ofcoverageModulationMode
.static int
ncoverageModulationTableCount(long struct)
Unsafe version ofcoverageModulationTableCount()
.static void
ncoverageModulationTableCount(long struct, int value)
Sets the specified value to thecoverageModulationTableCount
field of the specifiedstruct
.static int
ncoverageModulationTableEnable(long struct)
Unsafe version ofcoverageModulationTableEnable()
.static void
ncoverageModulationTableEnable(long struct, int value)
Unsafe version ofcoverageModulationTableEnable
.static int
nflags(long struct)
Unsafe version offlags()
.static void
nflags(long struct, int value)
Unsafe version offlags
.static java.nio.FloatBuffer
npCoverageModulationTable(long struct)
Unsafe version ofpCoverageModulationTable
.static void
npCoverageModulationTable(long struct, java.nio.FloatBuffer value)
Unsafe version ofpCoverageModulationTable
.static long
npNext(long struct)
Unsafe version ofpNext()
.static void
npNext(long struct, long value)
Unsafe version ofpNext
.static int
nsType(long struct)
Unsafe version ofsType()
.static void
nsType(long struct, int value)
Unsafe version ofsType
.java.nio.FloatBuffer
pCoverageModulationTable()
Returns aFloatBuffer
view of the data pointed to by thepCoverageModulationTable
field.VkPipelineCoverageModulationStateCreateInfoNV
pCoverageModulationTable(java.nio.FloatBuffer value)
Sets the address of the specifiedFloatBuffer
to thepCoverageModulationTable
field.long
pNext()
Returns the value of thepNext
field.VkPipelineCoverageModulationStateCreateInfoNV
pNext(long value)
Sets the specified value to thepNext
field.VkPipelineCoverageModulationStateCreateInfoNV
set(int sType, long pNext, int flags, int coverageModulationMode, boolean coverageModulationTableEnable, int coverageModulationTableCount, java.nio.FloatBuffer pCoverageModulationTable)
Initializes this struct with the specified values.VkPipelineCoverageModulationStateCreateInfoNV
set(VkPipelineCoverageModulationStateCreateInfoNV src)
Copies the specified struct data to this struct.int
sizeof()
Returnssizeof(struct)
.int
sType()
Returns the value of thesType
field.VkPipelineCoverageModulationStateCreateInfoNV
sType(int value)
Sets the specified value to thesType
field.-
Methods inherited from interface org.lwjgl.system.NativeResource
close, free
-
Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
-
-
-
-
Constructor Detail
-
VkPipelineCoverageModulationStateCreateInfoNV
public VkPipelineCoverageModulationStateCreateInfoNV(java.nio.ByteBuffer container)
Creates aVkPipelineCoverageModulationStateCreateInfoNV
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()
Description copied from class:Struct
Returnssizeof(struct)
.
-
sType
public int sType()
Returns the value of thesType
field.
-
pNext
public long pNext()
Returns the value of thepNext
field.
-
flags
public int flags()
Returns the value of theflags
field.
-
coverageModulationMode
public int coverageModulationMode()
Returns the value of thecoverageModulationMode
field.
-
coverageModulationTableEnable
public boolean coverageModulationTableEnable()
Returns the value of thecoverageModulationTableEnable
field.
-
coverageModulationTableCount
public int coverageModulationTableCount()
Returns the value of thecoverageModulationTableCount
field.
-
pCoverageModulationTable
@Nullable public java.nio.FloatBuffer pCoverageModulationTable()
Returns aFloatBuffer
view of the data pointed to by thepCoverageModulationTable
field.
-
sType
public VkPipelineCoverageModulationStateCreateInfoNV sType(int value)
Sets the specified value to thesType
field.
-
pNext
public VkPipelineCoverageModulationStateCreateInfoNV pNext(long value)
Sets the specified value to thepNext
field.
-
flags
public VkPipelineCoverageModulationStateCreateInfoNV flags(int value)
Sets the specified value to theflags
field.
-
coverageModulationMode
public VkPipelineCoverageModulationStateCreateInfoNV coverageModulationMode(int value)
Sets the specified value to thecoverageModulationMode
field.
-
coverageModulationTableEnable
public VkPipelineCoverageModulationStateCreateInfoNV coverageModulationTableEnable(boolean value)
Sets the specified value to thecoverageModulationTableEnable
field.
-
coverageModulationTableCount
public VkPipelineCoverageModulationStateCreateInfoNV coverageModulationTableCount(int value)
Sets the specified value to thecoverageModulationTableCount
field.
-
pCoverageModulationTable
public VkPipelineCoverageModulationStateCreateInfoNV pCoverageModulationTable(@Nullable java.nio.FloatBuffer value)
Sets the address of the specifiedFloatBuffer
to thepCoverageModulationTable
field.
-
set
public VkPipelineCoverageModulationStateCreateInfoNV set(int sType, long pNext, int flags, int coverageModulationMode, boolean coverageModulationTableEnable, int coverageModulationTableCount, @Nullable java.nio.FloatBuffer pCoverageModulationTable)
Initializes this struct with the specified values.
-
set
public VkPipelineCoverageModulationStateCreateInfoNV set(VkPipelineCoverageModulationStateCreateInfoNV src)
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
public static VkPipelineCoverageModulationStateCreateInfoNV malloc()
Returns a newVkPipelineCoverageModulationStateCreateInfoNV
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static VkPipelineCoverageModulationStateCreateInfoNV calloc()
Returns a newVkPipelineCoverageModulationStateCreateInfoNV
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static VkPipelineCoverageModulationStateCreateInfoNV create()
Returns a newVkPipelineCoverageModulationStateCreateInfoNV
instance allocated withBufferUtils
.
-
create
public static VkPipelineCoverageModulationStateCreateInfoNV create(long address)
Returns a newVkPipelineCoverageModulationStateCreateInfoNV
instance for the specified memory address.
-
createSafe
@Nullable public static VkPipelineCoverageModulationStateCreateInfoNV createSafe(long address)
-
malloc
public static VkPipelineCoverageModulationStateCreateInfoNV.Buffer malloc(int capacity)
Returns a newVkPipelineCoverageModulationStateCreateInfoNV.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static VkPipelineCoverageModulationStateCreateInfoNV.Buffer calloc(int capacity)
Returns a newVkPipelineCoverageModulationStateCreateInfoNV.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static VkPipelineCoverageModulationStateCreateInfoNV.Buffer create(int capacity)
Returns a newVkPipelineCoverageModulationStateCreateInfoNV.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static VkPipelineCoverageModulationStateCreateInfoNV.Buffer create(long address, int capacity)
Create aVkPipelineCoverageModulationStateCreateInfoNV.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static VkPipelineCoverageModulationStateCreateInfoNV.Buffer createSafe(long address, int capacity)
-
mallocStack
public static VkPipelineCoverageModulationStateCreateInfoNV mallocStack()
Returns a newVkPipelineCoverageModulationStateCreateInfoNV
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static VkPipelineCoverageModulationStateCreateInfoNV callocStack()
Returns a newVkPipelineCoverageModulationStateCreateInfoNV
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static VkPipelineCoverageModulationStateCreateInfoNV mallocStack(MemoryStack stack)
Returns a newVkPipelineCoverageModulationStateCreateInfoNV
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static VkPipelineCoverageModulationStateCreateInfoNV callocStack(MemoryStack stack)
Returns a newVkPipelineCoverageModulationStateCreateInfoNV
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static VkPipelineCoverageModulationStateCreateInfoNV.Buffer mallocStack(int capacity)
Returns a newVkPipelineCoverageModulationStateCreateInfoNV.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static VkPipelineCoverageModulationStateCreateInfoNV.Buffer callocStack(int capacity)
Returns a newVkPipelineCoverageModulationStateCreateInfoNV.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static VkPipelineCoverageModulationStateCreateInfoNV.Buffer mallocStack(int capacity, MemoryStack stack)
Returns a newVkPipelineCoverageModulationStateCreateInfoNV.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static VkPipelineCoverageModulationStateCreateInfoNV.Buffer callocStack(int capacity, MemoryStack stack)
Returns a newVkPipelineCoverageModulationStateCreateInfoNV.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()
.
-
nflags
public static int nflags(long struct)
Unsafe version offlags()
.
-
ncoverageModulationMode
public static int ncoverageModulationMode(long struct)
Unsafe version ofcoverageModulationMode()
.
-
ncoverageModulationTableEnable
public static int ncoverageModulationTableEnable(long struct)
Unsafe version ofcoverageModulationTableEnable()
.
-
ncoverageModulationTableCount
public static int ncoverageModulationTableCount(long struct)
Unsafe version ofcoverageModulationTableCount()
.
-
npCoverageModulationTable
@Nullable public static java.nio.FloatBuffer npCoverageModulationTable(long struct)
Unsafe version ofpCoverageModulationTable
.
-
nsType
public static void nsType(long struct, int value)
Unsafe version ofsType
.
-
npNext
public static void npNext(long struct, long value)
Unsafe version ofpNext
.
-
nflags
public static void nflags(long struct, int value)
Unsafe version offlags
.
-
ncoverageModulationMode
public static void ncoverageModulationMode(long struct, int value)
Unsafe version ofcoverageModulationMode
.
-
ncoverageModulationTableEnable
public static void ncoverageModulationTableEnable(long struct, int value)
Unsafe version ofcoverageModulationTableEnable
.
-
ncoverageModulationTableCount
public static void ncoverageModulationTableCount(long struct, int value)
Sets the specified value to thecoverageModulationTableCount
field of the specifiedstruct
.
-
npCoverageModulationTable
public static void npCoverageModulationTable(long struct, @Nullable java.nio.FloatBuffer value)
Unsafe version ofpCoverageModulationTable
.
-
-