public class EXTSampleLocations
extends java.lang.Object
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| Modifier and Type | Field and Description |
|---|---|
static int |
VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT
Extends
VkDynamicState. |
static java.lang.String |
VK_EXT_SAMPLE_LOCATIONS_EXTENSION_NAME
The extension name.
|
static int |
VK_EXT_SAMPLE_LOCATIONS_SPEC_VERSION
The extension specification version.
|
static int |
VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT
Extends
VkImageCreateFlagBits. |
static int |
VK_STRUCTURE_TYPE_MULTISAMPLE_PROPERTIES_EXT
Extends
VkStructureType. |
static int |
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLE_LOCATIONS_PROPERTIES_EXT
Extends
VkStructureType. |
static int |
VK_STRUCTURE_TYPE_PIPELINE_SAMPLE_LOCATIONS_STATE_CREATE_INFO_EXT
Extends
VkStructureType. |
static int |
VK_STRUCTURE_TYPE_RENDER_PASS_SAMPLE_LOCATIONS_BEGIN_INFO_EXT
Extends
VkStructureType. |
static int |
VK_STRUCTURE_TYPE_SAMPLE_LOCATIONS_INFO_EXT
Extends
VkStructureType. |
| Modifier and Type | Method and Description |
|---|---|
static void |
nvkCmdSetSampleLocationsEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer,
long pSampleLocationsInfo)
Unsafe version of:
CmdSetSampleLocationsEXT |
static void |
nvkGetPhysicalDeviceMultisamplePropertiesEXT(org.lwjgl.vulkan.VkPhysicalDevice physicalDevice,
int samples,
long pMultisampleProperties)
Unsafe version of:
GetPhysicalDeviceMultisamplePropertiesEXT |
static void |
vkCmdSetSampleLocationsEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer,
VkSampleLocationsInfoEXT pSampleLocationsInfo)
Set the dynamic sample locations state.
|
static void |
vkGetPhysicalDeviceMultisamplePropertiesEXT(org.lwjgl.vulkan.VkPhysicalDevice physicalDevice,
int samples,
VkMultisamplePropertiesEXT pMultisampleProperties)
Report sample count specific multisampling capabilities of a physical device.
|
public static final int VK_EXT_SAMPLE_LOCATIONS_SPEC_VERSION
public static final java.lang.String VK_EXT_SAMPLE_LOCATIONS_EXTENSION_NAME
public static final int VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT
VkImageCreateFlagBits.public static final int VK_STRUCTURE_TYPE_SAMPLE_LOCATIONS_INFO_EXT
VkStructureType.
public static final int VK_STRUCTURE_TYPE_RENDER_PASS_SAMPLE_LOCATIONS_BEGIN_INFO_EXT
VkStructureType.
public static final int VK_STRUCTURE_TYPE_PIPELINE_SAMPLE_LOCATIONS_STATE_CREATE_INFO_EXT
VkStructureType.
public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLE_LOCATIONS_PROPERTIES_EXT
VkStructureType.
public static final int VK_STRUCTURE_TYPE_MULTISAMPLE_PROPERTIES_EXT
VkStructureType.
public static final int VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT
VkDynamicState.public static void nvkCmdSetSampleLocationsEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer,
long pSampleLocationsInfo)
CmdSetSampleLocationsEXTpublic static void vkCmdSetSampleLocationsEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer,
VkSampleLocationsInfoEXT pSampleLocationsInfo)
The custom sample locations used for rasterization when VkPipelineSampleLocationsStateCreateInfoEXT::sampleLocationsEnable is TRUE are specified by the VkPipelineSampleLocationsStateCreateInfoEXT::sampleLocationsInfo property of the bound graphics pipeline, if the pipeline was not created with DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT enabled.
Otherwise, the sample locations used for rasterization are set by calling vkCmdSetSampleLocationsEXT:
void vkCmdSetSampleLocationsEXT(
VkCommandBuffer commandBuffer,
const VkSampleLocationsInfoEXT* pSampleLocationsInfo);
DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT dynamic state enabledsampleLocationsPerPixel member of pSampleLocationsInfo must equal the rasterizationSamples member of the VkPipelineMultisampleStateCreateInfo structure the bound graphics pipeline has been created withVkPhysicalDeviceSampleLocationsPropertiesEXT::variableSampleLocations is 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 pSampleLocationsInfocommandBuffer must be a valid VkCommandBuffer handlepSampleLocationsInfo must be a valid pointer to a valid VkSampleLocationsInfoEXT structurecommandBuffer must be in the recording stateVkCommandPool that commandBuffer was allocated from must support graphics operationscommandBuffer must be externally synchronizedVkCommandPool that commandBuffer was allocated from must be externally synchronized| Command Buffer Levels | Render Pass Scope | Supported Queue Types | Pipeline Type |
|---|---|---|---|
| Primary Secondary | Both | Graphics |
commandBuffer - the command buffer into which the command will be recorded.pSampleLocationsInfo - the sample locations state to set.public static void nvkGetPhysicalDeviceMultisamplePropertiesEXT(org.lwjgl.vulkan.VkPhysicalDevice physicalDevice,
int samples,
long pMultisampleProperties)
GetPhysicalDeviceMultisamplePropertiesEXTpublic static void vkGetPhysicalDeviceMultisamplePropertiesEXT(org.lwjgl.vulkan.VkPhysicalDevice physicalDevice,
int samples,
VkMultisamplePropertiesEXT pMultisampleProperties)
In addition to the minimum capabilities described for (Limits) above, implementations may support additional multisampling capabilities specific to a particular sample count.
To query additional sample count specific multisampling capabilities, call:
void vkGetPhysicalDeviceMultisamplePropertiesEXT(
VkPhysicalDevice physicalDevice,
VkSampleCountFlagBits samples,
VkMultisamplePropertiesEXT* pMultisampleProperties);
physicalDevice must be a valid VkPhysicalDevice handlesamples must be a valid VkSampleCountFlagBits valuepMultisampleProperties must be a valid pointer to a VkMultisamplePropertiesEXT structurephysicalDevice - the physical device from which to query the additional multisampling capabilities.samples - the sample count to query the capabilities for.pMultisampleProperties - a pointer to a VkMultisamplePropertiesEXT structure in which information about the additional multisampling capabilities specific to the sample count is returned.Copyright LWJGL. All Rights Reserved. License terms.