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 fragment's 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 present, it is as if
coverageModulationModeisCOVERAGE_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
Member documentation
sType– the type of this structure.pNext–NULLor 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 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 Modifier and Type Method Description static VkPipelineCoverageModulationStateCreateInfoNVcalloc()Returns a newVkPipelineCoverageModulationStateCreateInfoNVinstance allocated withmemCalloc.static VkPipelineCoverageModulationStateCreateInfoNV.Buffercalloc(int capacity)Returns a newVkPipelineCoverageModulationStateCreateInfoNV.Bufferinstance allocated withmemCalloc.static VkPipelineCoverageModulationStateCreateInfoNVcallocStack()Returns a newVkPipelineCoverageModulationStateCreateInfoNVinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static VkPipelineCoverageModulationStateCreateInfoNV.BuffercallocStack(int capacity)Returns a newVkPipelineCoverageModulationStateCreateInfoNV.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static VkPipelineCoverageModulationStateCreateInfoNV.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkPipelineCoverageModulationStateCreateInfoNV.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkPipelineCoverageModulationStateCreateInfoNVcallocStack(org.lwjgl.system.MemoryStack stack)Returns a newVkPipelineCoverageModulationStateCreateInfoNVinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.intcoverageModulationMode()Returns the value of thecoverageModulationModefield.VkPipelineCoverageModulationStateCreateInfoNVcoverageModulationMode(int value)Sets the specified value to thecoverageModulationModefield.intcoverageModulationTableCount()Returns the value of thecoverageModulationTableCountfield.VkPipelineCoverageModulationStateCreateInfoNVcoverageModulationTableCount(int value)Sets the specified value to thecoverageModulationTableCountfield.booleancoverageModulationTableEnable()Returns the value of thecoverageModulationTableEnablefield.VkPipelineCoverageModulationStateCreateInfoNVcoverageModulationTableEnable(boolean value)Sets the specified value to thecoverageModulationTableEnablefield.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()Returns the value of theflagsfield.VkPipelineCoverageModulationStateCreateInfoNVflags(int value)Sets the specified value to theflagsfield.static VkPipelineCoverageModulationStateCreateInfoNVmalloc()Returns a newVkPipelineCoverageModulationStateCreateInfoNVinstance allocated withmemAlloc.static VkPipelineCoverageModulationStateCreateInfoNV.Buffermalloc(int capacity)Returns a newVkPipelineCoverageModulationStateCreateInfoNV.Bufferinstance allocated withmemAlloc.static VkPipelineCoverageModulationStateCreateInfoNVmallocStack()Returns a newVkPipelineCoverageModulationStateCreateInfoNVinstance allocated on the thread-localMemoryStack.static VkPipelineCoverageModulationStateCreateInfoNV.BuffermallocStack(int capacity)Returns a newVkPipelineCoverageModulationStateCreateInfoNV.Bufferinstance allocated on the thread-localMemoryStack.static VkPipelineCoverageModulationStateCreateInfoNV.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkPipelineCoverageModulationStateCreateInfoNV.Bufferinstance allocated on the specifiedMemoryStack.static VkPipelineCoverageModulationStateCreateInfoNVmallocStack(org.lwjgl.system.MemoryStack stack)Returns a newVkPipelineCoverageModulationStateCreateInfoNVinstance allocated on the specifiedMemoryStack.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()Returns aFloatBufferview of the data pointed to by thepCoverageModulationTablefield.VkPipelineCoverageModulationStateCreateInfoNVpCoverageModulationTable(java.nio.FloatBuffer value)Sets the address of the specifiedFloatBufferto thepCoverageModulationTablefield.longpNext()Returns the value of thepNextfield.VkPipelineCoverageModulationStateCreateInfoNVpNext(long value)Sets the specified value to thepNextfield.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()Returns the value of thesTypefield.VkPipelineCoverageModulationStateCreateInfoNVsType(int value)Sets the specified value to thesTypefield.
-
-
-
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()
Returns the value of thesTypefield.
-
pNext
public long pNext()
Returns the value of thepNextfield.
-
flags
public int flags()
Returns the value of theflagsfield.
-
coverageModulationMode
public int coverageModulationMode()
Returns the value of thecoverageModulationModefield.
-
coverageModulationTableEnable
public boolean coverageModulationTableEnable()
Returns the value of thecoverageModulationTableEnablefield.
-
coverageModulationTableCount
public int coverageModulationTableCount()
Returns the value of thecoverageModulationTableCountfield.
-
pCoverageModulationTable
@Nullable public java.nio.FloatBuffer pCoverageModulationTable()
Returns aFloatBufferview of the data pointed to by thepCoverageModulationTablefield.
-
sType
public VkPipelineCoverageModulationStateCreateInfoNV sType(int value)
Sets the specified value to thesTypefield.
-
pNext
public VkPipelineCoverageModulationStateCreateInfoNV pNext(long value)
Sets the specified value to thepNextfield.
-
flags
public VkPipelineCoverageModulationStateCreateInfoNV flags(int value)
Sets the specified value to theflagsfield.
-
coverageModulationMode
public VkPipelineCoverageModulationStateCreateInfoNV coverageModulationMode(int value)
Sets the specified value to thecoverageModulationModefield.
-
coverageModulationTableEnable
public VkPipelineCoverageModulationStateCreateInfoNV coverageModulationTableEnable(boolean value)
Sets the specified value to thecoverageModulationTableEnablefield.
-
coverageModulationTableCount
public VkPipelineCoverageModulationStateCreateInfoNV coverageModulationTableCount(int value)
Sets the specified value to thecoverageModulationTableCountfield.
-
pCoverageModulationTable
public VkPipelineCoverageModulationStateCreateInfoNV pCoverageModulationTable(@Nullable java.nio.FloatBuffer value)
Sets the address of the specifiedFloatBufferto thepCoverageModulationTablefield.
-
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
public static VkPipelineCoverageModulationStateCreateInfoNV mallocStack()
Returns a newVkPipelineCoverageModulationStateCreateInfoNVinstance allocated on the thread-localMemoryStack.
-
callocStack
public static VkPipelineCoverageModulationStateCreateInfoNV callocStack()
Returns a newVkPipelineCoverageModulationStateCreateInfoNVinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static VkPipelineCoverageModulationStateCreateInfoNV mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkPipelineCoverageModulationStateCreateInfoNVinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static VkPipelineCoverageModulationStateCreateInfoNV callocStack(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
-
mallocStack
public static VkPipelineCoverageModulationStateCreateInfoNV.Buffer mallocStack(int capacity)
Returns a newVkPipelineCoverageModulationStateCreateInfoNV.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static VkPipelineCoverageModulationStateCreateInfoNV.Buffer callocStack(int capacity)
Returns a newVkPipelineCoverageModulationStateCreateInfoNV.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacity
-
mallocStack
public static VkPipelineCoverageModulationStateCreateInfoNV.Buffer mallocStack(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
-
callocStack
public static VkPipelineCoverageModulationStateCreateInfoNV.Buffer callocStack(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.
-
-