Class VkPipelineCoverageModulationStateCreateInfoNV
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.vulkan.VkPipelineCoverageModulationStateCreateInfoNV
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class VkPipelineCoverageModulationStateCreateInfoNV extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceStructure specifying parameters controlling coverage modulation.Description
If
coverageModulationTableEnableisFALSE, then for each color sample the associated bits of the pixel coverage are counted and divided by the number of associated bits to produce a modulation factorRin the range(0,1](a value of zero would have been killed due to a color coverage of 0). Specifically:N= value ofrasterizationSamplesM= value ofVkAttachmentDescription::samplesfor any color attachmentsR = popcount(associated coverage bits) / (N / M)
If
coverageModulationTableEnableisTRUE, the valueRis computed using a programmable lookup table. The lookup table hasN / Melements, 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
pCoverageModulationTablemay 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
Mvalues 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 included in the
pNextchain, it is as ifcoverageModulationModeisCOVERAGE_MODULATION_MODE_NONE_NV.If the coverage reduction mode is
COVERAGE_REDUCTION_MODE_TRUNCATE_NV, each color sample is associated with only a single coverage sample. In this case, it is as ifcoverageModulationModeisCOVERAGE_MODULATION_MODE_NONE_NV.Valid Usage
- If
coverageModulationTableEnableisTRUE,coverageModulationTableCountmust be equal to the number of rasterization samples divided by the number of color samples in the subpass
Valid Usage (Implicit)
sTypemust beSTRUCTURE_TYPE_PIPELINE_COVERAGE_MODULATION_STATE_CREATE_INFO_NVflagsmust be 0coverageModulationModemust be a validVkCoverageModulationModeNVvalue
Layout
struct VkPipelineCoverageModulationStateCreateInfoNV { VkStructureTypesType(); void const *pNext(); VkPipelineCoverageModulationStateCreateFlagsNVflags(); VkCoverageModulationModeNVcoverageModulationMode(); VkBool32coverageModulationTableEnable(); uint32_tcoverageModulationTableCount(); float const *pCoverageModulationTable(); }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classVkPipelineCoverageModulationStateCreateInfoNV.BufferAn array ofVkPipelineCoverageModulationStateCreateInfoNVstructs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intCOVERAGEMODULATIONMODE
COVERAGEMODULATIONTABLECOUNT
COVERAGEMODULATIONTABLEENABLE
FLAGS
PCOVERAGEMODULATIONTABLE
PNEXTThe struct member offsets.static intSIZEOFThe struct size in bytes.static intSTYPEThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description VkPipelineCoverageModulationStateCreateInfoNV(java.nio.ByteBuffer container)Creates aVkPipelineCoverageModulationStateCreateInfoNVinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static VkPipelineCoverageModulationStateCreateInfoNVcalloc()Returns a newVkPipelineCoverageModulationStateCreateInfoNVinstance allocated withmemCalloc.static VkPipelineCoverageModulationStateCreateInfoNV.Buffercalloc(int capacity)Returns a newVkPipelineCoverageModulationStateCreateInfoNV.Bufferinstance allocated withmemCalloc.static VkPipelineCoverageModulationStateCreateInfoNV.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkPipelineCoverageModulationStateCreateInfoNV.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkPipelineCoverageModulationStateCreateInfoNVcalloc(org.lwjgl.system.MemoryStack stack)Returns a newVkPipelineCoverageModulationStateCreateInfoNVinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkPipelineCoverageModulationStateCreateInfoNVcallocStack()Deprecated.static VkPipelineCoverageModulationStateCreateInfoNV.BuffercallocStack(int capacity)Deprecated.static VkPipelineCoverageModulationStateCreateInfoNV.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static VkPipelineCoverageModulationStateCreateInfoNVcallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.intcoverageModulationMode()aVkCoverageModulationModeNVvalue controlling which color components are modulated.VkPipelineCoverageModulationStateCreateInfoNVcoverageModulationMode(int value)Sets the specified value to thecoverageModulationMode()field.intcoverageModulationTableCount()the number of elements inpCoverageModulationTable.VkPipelineCoverageModulationStateCreateInfoNVcoverageModulationTableCount(int value)Sets the specified value to thecoverageModulationTableCount()field.booleancoverageModulationTableEnable()controls whether the modulation factor is looked up from a table inpCoverageModulationTable.VkPipelineCoverageModulationStateCreateInfoNVcoverageModulationTableEnable(boolean value)Sets the specified value to thecoverageModulationTableEnable()field.static VkPipelineCoverageModulationStateCreateInfoNVcreate()Returns a newVkPipelineCoverageModulationStateCreateInfoNVinstance allocated withBufferUtils.static VkPipelineCoverageModulationStateCreateInfoNV.Buffercreate(int capacity)Returns a newVkPipelineCoverageModulationStateCreateInfoNV.Bufferinstance allocated withBufferUtils.static VkPipelineCoverageModulationStateCreateInfoNVcreate(long address)Returns a newVkPipelineCoverageModulationStateCreateInfoNVinstance for the specified memory address.static VkPipelineCoverageModulationStateCreateInfoNV.Buffercreate(long address, int capacity)Create aVkPipelineCoverageModulationStateCreateInfoNV.Bufferinstance at the specified memory.static VkPipelineCoverageModulationStateCreateInfoNVcreateSafe(long address)static VkPipelineCoverageModulationStateCreateInfoNV.BuffercreateSafe(long address, int capacity)intflags()reserved for future use.VkPipelineCoverageModulationStateCreateInfoNVflags(int value)Sets the specified value to theflags()field.static VkPipelineCoverageModulationStateCreateInfoNVmalloc()Returns a newVkPipelineCoverageModulationStateCreateInfoNVinstance allocated withmemAlloc.static VkPipelineCoverageModulationStateCreateInfoNV.Buffermalloc(int capacity)Returns a newVkPipelineCoverageModulationStateCreateInfoNV.Bufferinstance allocated withmemAlloc.static VkPipelineCoverageModulationStateCreateInfoNV.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkPipelineCoverageModulationStateCreateInfoNV.Bufferinstance allocated on the specifiedMemoryStack.static VkPipelineCoverageModulationStateCreateInfoNVmalloc(org.lwjgl.system.MemoryStack stack)Returns a newVkPipelineCoverageModulationStateCreateInfoNVinstance allocated on the specifiedMemoryStack.static VkPipelineCoverageModulationStateCreateInfoNVmallocStack()Deprecated.static VkPipelineCoverageModulationStateCreateInfoNV.BuffermallocStack(int capacity)Deprecated.static VkPipelineCoverageModulationStateCreateInfoNV.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static VkPipelineCoverageModulationStateCreateInfoNVmallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.static intncoverageModulationMode(long struct)Unsafe version ofcoverageModulationMode().static voidncoverageModulationMode(long struct, int value)Unsafe version ofcoverageModulationMode.static intncoverageModulationTableCount(long struct)Unsafe version ofcoverageModulationTableCount().static voidncoverageModulationTableCount(long struct, int value)Sets the specified value to thecoverageModulationTableCountfield of the specifiedstruct.static intncoverageModulationTableEnable(long struct)Unsafe version ofcoverageModulationTableEnable().static voidncoverageModulationTableEnable(long struct, int value)Unsafe version ofcoverageModulationTableEnable.static intnflags(long struct)Unsafe version offlags().static voidnflags(long struct, int value)Unsafe version offlags.static java.nio.FloatBuffernpCoverageModulationTable(long struct)Unsafe version ofpCoverageModulationTable.static voidnpCoverageModulationTable(long struct, java.nio.FloatBuffer value)Unsafe version ofpCoverageModulationTable.static longnpNext(long struct)Unsafe version ofpNext().static voidnpNext(long struct, long value)Unsafe version ofpNext.static intnsType(long struct)Unsafe version ofsType().static voidnsType(long struct, int value)Unsafe version ofsType.java.nio.FloatBufferpCoverageModulationTable()a table of modulation factors containing a value for each number of covered samples.VkPipelineCoverageModulationStateCreateInfoNVpCoverageModulationTable(java.nio.FloatBuffer value)Sets the address of the specifiedFloatBufferto thepCoverageModulationTable()field.longpNext()NULLor a pointer to a structure extending this structure.VkPipelineCoverageModulationStateCreateInfoNVpNext(long value)Sets the specified value to thepNext()field.VkPipelineCoverageModulationStateCreateInfoNVset(int sType, long pNext, int flags, int coverageModulationMode, boolean coverageModulationTableEnable, int coverageModulationTableCount, java.nio.FloatBuffer pCoverageModulationTable)Initializes this struct with the specified values.VkPipelineCoverageModulationStateCreateInfoNVset(VkPipelineCoverageModulationStateCreateInfoNV src)Copies the specified struct data to this struct.intsizeof()intsType()the type of this structure.VkPipelineCoverageModulationStateCreateInfoNVsType(int value)Sets the specified value to thesType()field.VkPipelineCoverageModulationStateCreateInfoNVsType$Default()Sets theSTRUCTURE_TYPE_PIPELINE_COVERAGE_MODULATION_STATE_CREATE_INFO_NVvalue to thesType()field.
-
-
-
Constructor Detail
-
VkPipelineCoverageModulationStateCreateInfoNV
public VkPipelineCoverageModulationStateCreateInfoNV(java.nio.ByteBuffer container)
Creates aVkPipelineCoverageModulationStateCreateInfoNVinstance 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
-
sType
public int sType()
the type of this structure.
-
pNext
public long pNext()
NULLor a pointer to a structure extending this structure.
-
flags
public int flags()
reserved for future use.
-
coverageModulationMode
public int coverageModulationMode()
aVkCoverageModulationModeNVvalue controlling which color components are modulated.
-
coverageModulationTableEnable
public boolean coverageModulationTableEnable()
controls whether the modulation factor is looked up from a table inpCoverageModulationTable.
-
coverageModulationTableCount
public int coverageModulationTableCount()
the number of elements inpCoverageModulationTable.
-
pCoverageModulationTable
@Nullable public java.nio.FloatBuffer pCoverageModulationTable()
a table of modulation factors containing a value for each number of covered samples.
-
sType
public VkPipelineCoverageModulationStateCreateInfoNV sType(int value)
Sets the specified value to thesType()field.
-
sType$Default
public VkPipelineCoverageModulationStateCreateInfoNV sType$Default()
Sets theSTRUCTURE_TYPE_PIPELINE_COVERAGE_MODULATION_STATE_CREATE_INFO_NVvalue 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 specifiedFloatBufferto 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 newVkPipelineCoverageModulationStateCreateInfoNVinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static VkPipelineCoverageModulationStateCreateInfoNV calloc()
Returns a newVkPipelineCoverageModulationStateCreateInfoNVinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static VkPipelineCoverageModulationStateCreateInfoNV create()
Returns a newVkPipelineCoverageModulationStateCreateInfoNVinstance allocated withBufferUtils.
-
create
public static VkPipelineCoverageModulationStateCreateInfoNV create(long address)
Returns a newVkPipelineCoverageModulationStateCreateInfoNVinstance for the specified memory address.
-
createSafe
@Nullable public static VkPipelineCoverageModulationStateCreateInfoNV createSafe(long address)
-
malloc
public static VkPipelineCoverageModulationStateCreateInfoNV.Buffer malloc(int capacity)
Returns a newVkPipelineCoverageModulationStateCreateInfoNV.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static VkPipelineCoverageModulationStateCreateInfoNV.Buffer calloc(int capacity)
Returns a newVkPipelineCoverageModulationStateCreateInfoNV.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static VkPipelineCoverageModulationStateCreateInfoNV.Buffer create(int capacity)
Returns a newVkPipelineCoverageModulationStateCreateInfoNV.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static VkPipelineCoverageModulationStateCreateInfoNV.Buffer create(long address, int capacity)
Create aVkPipelineCoverageModulationStateCreateInfoNV.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static VkPipelineCoverageModulationStateCreateInfoNV.Buffer createSafe(long address, int capacity)
-
mallocStack
@Deprecated public static VkPipelineCoverageModulationStateCreateInfoNV mallocStack()
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static VkPipelineCoverageModulationStateCreateInfoNV callocStack()
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static VkPipelineCoverageModulationStateCreateInfoNV mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static VkPipelineCoverageModulationStateCreateInfoNV callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static VkPipelineCoverageModulationStateCreateInfoNV.Buffer mallocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static VkPipelineCoverageModulationStateCreateInfoNV.Buffer callocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
mallocStack
@Deprecated public static VkPipelineCoverageModulationStateCreateInfoNV.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static VkPipelineCoverageModulationStateCreateInfoNV.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
malloc
public static VkPipelineCoverageModulationStateCreateInfoNV malloc(org.lwjgl.system.MemoryStack stack)
Returns a newVkPipelineCoverageModulationStateCreateInfoNVinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static VkPipelineCoverageModulationStateCreateInfoNV calloc(org.lwjgl.system.MemoryStack stack)
Returns a newVkPipelineCoverageModulationStateCreateInfoNVinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static VkPipelineCoverageModulationStateCreateInfoNV.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkPipelineCoverageModulationStateCreateInfoNV.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static VkPipelineCoverageModulationStateCreateInfoNV.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkPipelineCoverageModulationStateCreateInfoNV.Bufferinstance allocated on the specifiedMemoryStackand 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 thecoverageModulationTableCountfield of the specifiedstruct.
-
npCoverageModulationTable
public static void npCoverageModulationTable(long struct, @Nullable java.nio.FloatBuffer value)Unsafe version ofpCoverageModulationTable.
-
-