Class EXTSampleLocations
- java.lang.Object
-
- org.lwjgl.vulkan.EXTSampleLocations
-
public class EXTSampleLocations extends java.lang.ObjectThis extension allows an application to modify the locations of samples within a pixel used in rasterization. Additionally, it allows applications to specify different sample locations for each pixel in a group of adjacent pixels, which can increase antialiasing quality (particularly if a custom resolve shader is used that takes advantage of these different locations).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
VkSampleLocationsInfoEXTstructure can be specified for each situation where an explicit or automatic layout transition has to take place.VkSampleLocationsInfoEXTcan be chained fromVkImageMemoryBarrierstructures to provide sample locations for layout transitions performed byCmdWaitEventsandCmdPipelineBarriercalls, andVkRenderPassSampleLocationsBeginInfoEXTcan be chained fromVkRenderPassBeginInfoto provide sample locations for layout transitions performed implicitly by a render pass instance.VK_EXT_sample_locations
- Name String
VK_EXT_sample_locations- Extension Type
- Device extension
- Registered Extension Number
- 144
- Revision
- 1
- Extension and Version Dependencies
- Requires Vulkan 1.0
- Requires
VK_KHR_get_physical_device_properties2
- Contact
- Daniel Rakos drakos-amd
Other Extension Metadata
- Last Modified Date
- 2017-08-02
- Contributors
- Mais Alnasser, AMD
- Matthaeus G. Chajdas, AMD
- Maciej Jesionowski, AMD
- Daniel Rakos, AMD
- Slawomir Grajewski, Intel
- Jeff Bolz, NVIDIA
- Bill Licea-Kane, Qualcomm
-
-
Field Summary
Fields Modifier and Type Field Description static intVK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXTExtendsVkDynamicState.static java.lang.StringVK_EXT_SAMPLE_LOCATIONS_EXTENSION_NAMEThe extension name.static intVK_EXT_SAMPLE_LOCATIONS_SPEC_VERSIONThe extension specification version.static intVK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXTExtendsVkImageCreateFlagBits.static intVK_STRUCTURE_TYPE_MULTISAMPLE_PROPERTIES_EXT
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLE_LOCATIONS_PROPERTIES_EXT
VK_STRUCTURE_TYPE_PIPELINE_SAMPLE_LOCATIONS_STATE_CREATE_INFO_EXT
VK_STRUCTURE_TYPE_RENDER_PASS_SAMPLE_LOCATIONS_BEGIN_INFO_EXT
VK_STRUCTURE_TYPE_SAMPLE_LOCATIONS_INFO_EXTExtendsVkStructureType.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidnvkCmdSetSampleLocationsEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, long pSampleLocationsInfo)Unsafe version of:CmdSetSampleLocationsEXTstatic voidnvkGetPhysicalDeviceMultisamplePropertiesEXT(org.lwjgl.vulkan.VkPhysicalDevice physicalDevice, int samples, long pMultisampleProperties)Unsafe version of:GetPhysicalDeviceMultisamplePropertiesEXTstatic voidvkCmdSetSampleLocationsEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, VkSampleLocationsInfoEXT pSampleLocationsInfo)Set sample locations dynamically for a command buffer.static voidvkGetPhysicalDeviceMultisamplePropertiesEXT(org.lwjgl.vulkan.VkPhysicalDevice physicalDevice, int samples, VkMultisamplePropertiesEXT pMultisampleProperties)Report sample count specific multisampling capabilities of a physical device.
-
-
-
Field Detail
-
VK_EXT_SAMPLE_LOCATIONS_SPEC_VERSION
The extension specification version.
-
VK_EXT_SAMPLE_LOCATIONS_EXTENSION_NAME
The extension name.
-
VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT
ExtendsVkImageCreateFlagBits.
-
VK_STRUCTURE_TYPE_SAMPLE_LOCATIONS_INFO_EXT, VK_STRUCTURE_TYPE_RENDER_PASS_SAMPLE_LOCATIONS_BEGIN_INFO_EXT, VK_STRUCTURE_TYPE_PIPELINE_SAMPLE_LOCATIONS_STATE_CREATE_INFO_EXT, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLE_LOCATIONS_PROPERTIES_EXT, VK_STRUCTURE_TYPE_MULTISAMPLE_PROPERTIES_EXT
ExtendsVkStructureType.Enum values:
-
VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT
ExtendsVkDynamicState.
-
-
Method Detail
-
nvkCmdSetSampleLocationsEXT
public static void nvkCmdSetSampleLocationsEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, long pSampleLocationsInfo)Unsafe version of:CmdSetSampleLocationsEXT
-
vkCmdSetSampleLocationsEXT
public static void vkCmdSetSampleLocationsEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, VkSampleLocationsInfoEXT pSampleLocationsInfo)Set sample locations dynamically for a command buffer.C Specification
To dynamically set the sample locations used for rasterization, call:
void vkCmdSetSampleLocationsEXT( VkCommandBuffer commandBuffer, const VkSampleLocationsInfoEXT* pSampleLocationsInfo);Description
This command sets the custom sample locations for subsequent drawing commands when the graphics pipeline is created with
DYNAMIC_STATE_SAMPLE_LOCATIONS_EXTset inVkPipelineDynamicStateCreateInfo::pDynamicStates, and when theVkPipelineSampleLocationsStateCreateInfoEXT::sampleLocationsEnableproperty of the bound graphics pipeline isTRUE. Otherwise, this state is specified by theVkPipelineSampleLocationsStateCreateInfoEXT::sampleLocationsInfovalues used to create the currently active pipeline.Valid Usage
- The
sampleLocationsPerPixelmember ofpSampleLocationsInfomust equal therasterizationSamplesmember of theVkPipelineMultisampleStateCreateInfostructure the bound graphics pipeline has been created with - If
VkPhysicalDeviceSampleLocationsPropertiesEXT::variableSampleLocationsisFALSEthen the current render pass must have been begun by specifying aVkRenderPassSampleLocationsBeginInfoEXTstructure whosepPostSubpassSampleLocationsmember contains an element with asubpassIndexmatching the current subpass index and thesampleLocationsInfomember of that element must match the sample locations state pointed to bypSampleLocationsInfo
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandlepSampleLocationsInfomust be a valid pointer to a validVkSampleLocationsInfoEXTstructurecommandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support graphics operations
Host Synchronization
- Host access to
commandBuffermust be externally synchronized - Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Supported Queue Types Primary Secondary Both Graphics See Also
- Parameters:
commandBuffer- the command buffer into which the command will be recorded.pSampleLocationsInfo- the sample locations state to set.
- The
-
nvkGetPhysicalDeviceMultisamplePropertiesEXT
public static void nvkGetPhysicalDeviceMultisamplePropertiesEXT(org.lwjgl.vulkan.VkPhysicalDevice physicalDevice, int samples, long pMultisampleProperties)Unsafe version of:GetPhysicalDeviceMultisamplePropertiesEXT
-
vkGetPhysicalDeviceMultisamplePropertiesEXT
public static void vkGetPhysicalDeviceMultisamplePropertiesEXT(org.lwjgl.vulkan.VkPhysicalDevice physicalDevice, int samples, VkMultisamplePropertiesEXT pMultisampleProperties)Report sample count specific multisampling capabilities of a physical device.C Specification
To query additional multisampling capabilities which may be supported for a specific sample count, beyond the minimum capabilities described for Limits above, call:
void vkGetPhysicalDeviceMultisamplePropertiesEXT( VkPhysicalDevice physicalDevice, VkSampleCountFlagBits samples, VkMultisamplePropertiesEXT* pMultisampleProperties);Valid Usage (Implicit)
physicalDevicemust be a validVkPhysicalDevicehandlesamplesmust be a validVkSampleCountFlagBitsvaluepMultisamplePropertiesmust be a valid pointer to aVkMultisamplePropertiesEXTstructure
See Also
- Parameters:
physicalDevice- the physical device from which to query the additional multisampling capabilities.samples- aVkSampleCountFlagBitsvalue specifying the sample count to query capabilities for.pMultisampleProperties- a pointer to aVkMultisamplePropertiesEXTstructure in which information about additional multisampling capabilities specific to the sample count is returned.
-
-