It is common for implementations to optimize the storage of depth values by storing values that can be used to reconstruct depth at each sample location, rather than storing separate depth values for each sample. For example, the depth values from a single triangle may be represented using plane equations. When the depth value for a sample is needed, it is automatically evaluated at the sample location. Modifying the sample locations causes the reconstruction to no longer evaluate the same depth values as when the samples were originally generated, thus the depth aspect of a depth/stencil attachment must be cleared before rendering to it using different sample locations.
Some implementations may need to evaluate depth image values while performing image layout transitions. To accommodate this, instances of the VkSampleLocationsInfoEXT structure can be specified for each situation where an explicit or automatic layout transition has to take place. VkSampleLocationsInfoEXT can be chained from VkImageMemoryBarrier structures to provide sample locations for layout transitions performed by CmdWaitEvents and CmdPipelineBarrier calls, and VkRenderPassSampleLocationsBeginInfoEXT can be chained from VkRenderPassBeginInfo to provide sample locations for layout transitions performed implicitly by a render pass instance.
VK_EXT_sample_locationsVK_KHR_get_physical_device_properties2 or Version 1.1| Modifier and Type | Field and Description |
|---|---|
| public static final int | VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT
Extends |
| public static final String | VK_EXT_SAMPLE_LOCATIONS_EXTENSION_NAME
The extension name. |
| public static final int | VK_EXT_SAMPLE_LOCATIONS_SPEC_VERSION
The extension specification version. |
| public static final int | VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT
Extends |
| public static final int | VK_STRUCTURE_TYPE_MULTISAMPLE_PROPERTIES_EXT
Extends |
| public static final int | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLE_LOCATIONS_PROPERTIES_EXT
Extends |
| public static final int | VK_STRUCTURE_TYPE_PIPELINE_SAMPLE_LOCATIONS_STATE_CREATE_INFO_EXT
Extends |
| public static final int | VK_STRUCTURE_TYPE_RENDER_PASS_SAMPLE_LOCATIONS_BEGIN_INFO_EXT
Extends |
| public static final int | VK_STRUCTURE_TYPE_SAMPLE_LOCATIONS_INFO_EXT
Extends |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public static void | nvkCmdSetSampleLocationsEXT(VkCommandBuffer commandBuffer, long pSampleLocationsInfo)
Unsafe version of: |
| public static void | nvkGetPhysicalDeviceMultisamplePropertiesEXT(VkPhysicalDevice physicalDevice, int samples, long pMultisampleProperties)
Unsafe version of: |
| public static void | vkCmdSetSampleLocationsEXT(VkCommandBuffer
the command buffer into which the command will be recorded. commandBuffer, VkSampleLocationsInfoEXT the sample locations state to set. pSampleLocationsInfo)Set sample locations dynamically for a command buffer. |
| public static void | vkGetPhysicalDeviceMultisamplePropertiesEXT(VkPhysicalDevice
the physical device from which to query the additional multisampling capabilities. physicalDevice, int a samples, VkMultisamplePropertiesEXT VkSampleCountFlagBits value specifying the sample count to query capabilities for.a pointer to a pMultisampleProperties)VkMultisamplePropertiesEXT structure in which information about additional multisampling capabilities specific to the sample count is returned.Report sample count specific multisampling capabilities of a physical device. |
| VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT | back to summary |
|---|---|
| public static final int VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT Extends | |
| VK_EXT_SAMPLE_LOCATIONS_EXTENSION_NAME | back to summary |
|---|---|
| public static final String VK_EXT_SAMPLE_LOCATIONS_EXTENSION_NAME The extension name. | |
| VK_EXT_SAMPLE_LOCATIONS_SPEC_VERSION | back to summary |
|---|---|
| public static final int VK_EXT_SAMPLE_LOCATIONS_SPEC_VERSION The extension specification version. | |
| VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT | back to summary |
|---|---|
| public static final int VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT Extends | |
| VK_STRUCTURE_TYPE_MULTISAMPLE_PROPERTIES_EXT | back to summary |
|---|---|
| public static final int VK_STRUCTURE_TYPE_MULTISAMPLE_PROPERTIES_EXT Extends Enum values: | |
| VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLE_LOCATIONS_PROPERTIES_EXT | back to summary |
|---|---|
| public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLE_LOCATIONS_PROPERTIES_EXT Extends Enum values: | |
| VK_STRUCTURE_TYPE_PIPELINE_SAMPLE_LOCATIONS_STATE_CREATE_INFO_EXT | back to summary |
|---|---|
| public static final int VK_STRUCTURE_TYPE_PIPELINE_SAMPLE_LOCATIONS_STATE_CREATE_INFO_EXT Extends Enum values: | |
| VK_STRUCTURE_TYPE_RENDER_PASS_SAMPLE_LOCATIONS_BEGIN_INFO_EXT | back to summary |
|---|---|
| public static final int VK_STRUCTURE_TYPE_RENDER_PASS_SAMPLE_LOCATIONS_BEGIN_INFO_EXT Extends Enum values: | |
| VK_STRUCTURE_TYPE_SAMPLE_LOCATIONS_INFO_EXT | back to summary |
|---|---|
| public static final int VK_STRUCTURE_TYPE_SAMPLE_LOCATIONS_INFO_EXT Extends Enum values: | |
| EXTSampleLocations | back to summary |
|---|---|
| protected EXTSampleLocations() | |
| nvkCmdSetSampleLocationsEXT | back to summary |
|---|---|
| public static void nvkCmdSetSampleLocationsEXT(VkCommandBuffer commandBuffer, long pSampleLocationsInfo) Unsafe version of: | |
| nvkGetPhysicalDeviceMultisamplePropertiesEXT | back to summary |
|---|---|
| public static void nvkGetPhysicalDeviceMultisamplePropertiesEXT(VkPhysicalDevice physicalDevice, int samples, long pMultisampleProperties) Unsafe version of: | |
| vkCmdSetSampleLocationsEXT | back to summary | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| public static void vkCmdSetSampleLocationsEXT(VkCommandBuffer commandBuffer, VkSampleLocationsInfoEXT pSampleLocationsInfo) Set sample locations dynamically for a command buffer. C SpecificationTo dynamically set the sample locations used for rasterization, call:
DescriptionThis command sets the custom sample locations for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with Valid Usage
Valid Usage (Implicit)
Host Synchronization
Command Properties
See Also
| |||||||||||
| vkGetPhysicalDeviceMultisamplePropertiesEXT | back to summary |
|---|---|
| public static void vkGetPhysicalDeviceMultisamplePropertiesEXT(VkPhysicalDevice physicalDevice, int samples, VkMultisamplePropertiesEXT pMultisampleProperties) Report sample count specific multisampling capabilities of a physical device. C SpecificationTo query additional multisampling capabilities which may be supported for a specific sample count, beyond the minimum capabilities described for Limits above, call:
Valid Usage (Implicit)
See Also
| |