vkCmdSetSampleLocationsEXT
To dynamically set the sample locations used for rasterization, call:
void vkCmdSetSampleLocationsEXT(
VkCommandBuffer commandBuffer,
const VkSampleLocationsInfoEXT* pSampleLocationsInfo);
commandBuffer
is the command buffer into which the command will be recorded.pSampleLocationsInfo
is the sample locations state to set.
This command sets the custom sample locations for subsequent drawing
commands
when drawing using shader objects, or
when the graphics pipeline is created with
VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT
set in
VkPipelineDynamicStateCreateInfo::pDynamicStates
, and when the
VkPipelineSampleLocationsStateCreateInfoEXT::sampleLocationsEnable
property of the bound graphics pipeline is VK_TRUE
.
Otherwise, this state is specified by the
VkPipelineSampleLocationsStateCreateInfoEXT::sampleLocationsInfo
values used to create the currently active pipeline.
Valid Usage
VUID-vkCmdSetSampleLocationsEXT-variableSampleLocations-01530
If
VkPhysicalDeviceSampleLocationsPropertiesEXT::variableSampleLocations
is VK_FALSE
then the current render pass must have been begun by
specifying a VkRenderPassSampleLocationsBeginInfoEXT structure
whose pPostSubpassSampleLocations
member contains an element with
a subpassIndex
matching the current subpass index and the
sampleLocationsInfo
member of that element must match the sample
locations state pointed to by pSampleLocationsInfo
Valid Usage (Implicit)
VUID-vkCmdSetSampleLocationsEXT-commandBuffer-parameter
commandBuffer
must be a valid VkCommandBuffer handle
VUID-vkCmdSetSampleLocationsEXT-pSampleLocationsInfo-parameter
pSampleLocationsInfo
must be a valid pointer to a valid VkSampleLocationsInfoEXT structure
VUID-vkCmdSetSampleLocationsEXT-commandBuffer-recording
commandBuffer
must be in the recording state
VUID-vkCmdSetSampleLocationsEXT-commandBuffer-cmdpool
The VkCommandPool
that commandBuffer
was allocated from must support graphics operations
VUID-vkCmdSetSampleLocationsEXT-videocoding
This command must only be called outside of a video coding scope
Host Synchronization
- Host access to
commandBuffer
must be externally synchronized - Host access to the
VkCommandPool
thatcommandBuffer
was allocated from must be externally synchronized ::