VkPipelineMultisampleStateCreateInfo
The VkPipelineMultisampleStateCreateInfo
structure is defined as:
typedef struct VkPipelineMultisampleStateCreateInfo {
VkStructureType sType;
const void* pNext;
VkPipelineMultisampleStateCreateFlags flags;
VkSampleCountFlagBits rasterizationSamples;
VkBool32 sampleShadingEnable;
float minSampleShading;
const VkSampleMask* pSampleMask;
VkBool32 alphaToCoverageEnable;
VkBool32 alphaToOneEnable;
} VkPipelineMultisampleStateCreateInfo;
sType
is a VkStructureType value identifying this structure.pNext
isNULL
or a pointer to a structure extending this structure.flags
is reserved for future use.rasterizationSamples
is a VkSampleCountFlagBits value specifying the number of samples used in rasterization. This value is ignored for the purposes of setting the number of samples used in rasterization if the pipeline is created with theVK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT
dynamic state set, but ifVK_DYNAMIC_STATE_SAMPLE_MASK_EXT
dynamic state is not set, it is still used to define the size of thepSampleMask
array as described below.sampleShadingEnable
can be used to enable Sample Shading.minSampleShading
specifies a minimum fraction of sample shading ifsampleShadingEnable
isVK_TRUE
.pSampleMask
is a pointer to an array of VkSampleMask values used in the sample mask test.alphaToCoverageEnable
controls whether a temporary coverage value is generated based on the alpha component of the fragment’s first color output as specified in the Multisample Coverage section.alphaToOneEnable
controls whether the alpha component of the fragment’s first color output is replaced with one as described in Multisample Coverage.
Each bit in the sample mask is associated with a unique
sample index as defined for the
coverage mask.
Each bit b for mask word w in the sample mask corresponds to
sample index i, where i = 32 × w + b.
pSampleMask
has a length equal to ⌈
rasterizationSamples
/ 32 ⌉ words.
If pSampleMask
is NULL
, it is treated as if the mask has all bits
set to 1
.
Valid Usage
VUID-VkPipelineMultisampleStateCreateInfo-sampleShadingEnable-00784
If the sampleRateShading
feature
is not enabled, sampleShadingEnable
must be VK_FALSE
VUID-VkPipelineMultisampleStateCreateInfo-alphaToOneEnable-00785
If the alphaToOne
feature is not enabled,
alphaToOneEnable
must be VK_FALSE
VUID-VkPipelineMultisampleStateCreateInfo-minSampleShading-00786
minSampleShading
must be in the range [0,1]
VUID-VkPipelineMultisampleStateCreateInfo-rasterizationSamples-01415
If the VK_NV_framebuffer_mixed_samples extension is enabled,
and if the subpass has any color attachments and
rasterizationSamples
is greater than the number of color samples,
then sampleShadingEnable
must be VK_FALSE
Valid Usage (Implicit)
VUID-VkPipelineMultisampleStateCreateInfo-sType-sType
sType
must be VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO
VUID-VkPipelineMultisampleStateCreateInfo-pNext-pNext
Each pNext
member of any structure (including this one) in the pNext
chain must be either NULL
or a pointer to a valid instance of VkPipelineCoverageModulationStateCreateInfoNV, VkPipelineCoverageReductionStateCreateInfoNV, VkPipelineCoverageToColorStateCreateInfoNV, or VkPipelineSampleLocationsStateCreateInfoEXT
VUID-VkPipelineMultisampleStateCreateInfo-sType-unique
The sType
value of each struct in the pNext
chain must be unique
VUID-VkPipelineMultisampleStateCreateInfo-flags-zerobitmask
flags
must be 0
VUID-VkPipelineMultisampleStateCreateInfo-rasterizationSamples-parameter
rasterizationSamples
must be a valid VkSampleCountFlagBits value
VUID-VkPipelineMultisampleStateCreateInfo-pSampleMask-parameter
If pSampleMask
is not NULL
, pSampleMask
must be a valid pointer to an array of VkSampleMask values