Top Description Fields Constructors Methods
org.lwjgl.vulkan

public Class EXTSampleLocations

extends Object
Class Inheritance
Imports
org.lwjgl.system.*

This 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 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_locations
Name String
VK_EXT_sample_locations
Extension Type
Device extension
Registered Extension Number
144
Revision
1
Extension and Version Dependencies
VK_KHR_get_physical_device_properties2 or Version 1.1
Contact
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

Modifier and TypeField and Description
public static final int
public static final String
public static final int
VK_EXT_SAMPLE_LOCATIONS_SPEC_VERSION

The extension specification version.

public static final int
public static final int
public static final int
public static final int
public static final int
public static final int

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public static void
nvkCmdSetSampleLocationsEXT(VkCommandBuffer commandBuffer, long pSampleLocationsInfo)

Unsafe version of: CmdSetSampleLocationsEXT

public static void
nvkGetPhysicalDeviceMultisamplePropertiesEXT(VkPhysicalDevice physicalDevice, int samples, long pMultisampleProperties)

Unsafe version of: GetPhysicalDeviceMultisamplePropertiesEXT

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 VkSampleCountFlagBits value specifying the sample count to query capabilities for.
samples
,
VkMultisamplePropertiesEXT
a pointer to a VkMultisamplePropertiesEXT structure in which information about additional multisampling capabilities specific to the sample count is returned.
pMultisampleProperties
)

Report sample count specific multisampling capabilities of a physical device.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXTback to summary
public static final int VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT

Extends VkDynamicState.

VK_EXT_SAMPLE_LOCATIONS_EXTENSION_NAMEback to summary
public static final String VK_EXT_SAMPLE_LOCATIONS_EXTENSION_NAME

The extension name.

VK_EXT_SAMPLE_LOCATIONS_SPEC_VERSIONback to summary
public static final int VK_EXT_SAMPLE_LOCATIONS_SPEC_VERSION

The extension specification version.

VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXTback to summary
public static final int VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT

Extends VkImageCreateFlagBits.

VK_STRUCTURE_TYPE_MULTISAMPLE_PROPERTIES_EXTback to summary
public static final int VK_STRUCTURE_TYPE_MULTISAMPLE_PROPERTIES_EXT

Extends VkStructureType.

Enum values:
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLE_LOCATIONS_PROPERTIES_EXTback to summary
public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLE_LOCATIONS_PROPERTIES_EXT

Extends VkStructureType.

Enum values:
VK_STRUCTURE_TYPE_PIPELINE_SAMPLE_LOCATIONS_STATE_CREATE_INFO_EXTback to summary
public static final int VK_STRUCTURE_TYPE_PIPELINE_SAMPLE_LOCATIONS_STATE_CREATE_INFO_EXT

Extends VkStructureType.

Enum values:
VK_STRUCTURE_TYPE_RENDER_PASS_SAMPLE_LOCATIONS_BEGIN_INFO_EXTback to summary
public static final int VK_STRUCTURE_TYPE_RENDER_PASS_SAMPLE_LOCATIONS_BEGIN_INFO_EXT

Extends VkStructureType.

Enum values:
VK_STRUCTURE_TYPE_SAMPLE_LOCATIONS_INFO_EXTback to summary
public static final int VK_STRUCTURE_TYPE_SAMPLE_LOCATIONS_INFO_EXT

Extends VkStructureType.

Enum values:

Constructor Detail

EXTSampleLocationsback to summary
protected EXTSampleLocations()

Method Detail

nvkCmdSetSampleLocationsEXTback to summary
public static void nvkCmdSetSampleLocationsEXT(VkCommandBuffer commandBuffer, long pSampleLocationsInfo)

Unsafe version of: CmdSetSampleLocationsEXT

nvkGetPhysicalDeviceMultisamplePropertiesEXTback to summary
public static void nvkGetPhysicalDeviceMultisamplePropertiesEXT(VkPhysicalDevice physicalDevice, int samples, long pMultisampleProperties)

Unsafe version of: GetPhysicalDeviceMultisamplePropertiesEXT

vkCmdSetSampleLocationsEXTback to summary
public static void vkCmdSetSampleLocationsEXT(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 drawing using shader objects, or when the graphics pipeline is created with DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT set in VkPipelineDynamicStateCreateInfo::pDynamicStates, and when the VkPipelineSampleLocationsStateCreateInfoEXT::sampleLocationsEnable property of the bound graphics pipeline is TRUE. Otherwise, this state is specified by the VkPipelineSampleLocationsStateCreateInfoEXT::sampleLocationsInfo values used to create the currently active pipeline.

Valid Usage
Valid Usage (Implicit)
  • commandBuffer must be a valid VkCommandBuffer handle
  • pSampleLocationsInfo must be a valid pointer to a valid VkSampleLocationsInfoEXT structure
  • commandBuffer must be in the recording state
  • The VkCommandPool that commandBuffer was allocated from must support graphics operations
  • 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 that commandBuffer was allocated from must be externally synchronized
Command Properties
Command Buffer LevelsRender Pass ScopeVideo Coding ScopeSupported Queue TypesCommand Type
Primary SecondaryBothOutsideGraphicsState
See Also

VkSampleLocationsInfoEXT

Parameters
commandBuffer:VkCommandBuffer

the command buffer into which the command will be recorded.

pSampleLocationsInfo:VkSampleLocationsInfoEXT

the sample locations state to set.

vkGetPhysicalDeviceMultisamplePropertiesEXTback to summary
public static void vkGetPhysicalDeviceMultisamplePropertiesEXT(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)
  • physicalDevice must be a valid VkPhysicalDevice handle
  • samples must be a valid VkSampleCountFlagBits value
  • pMultisampleProperties must be a valid pointer to a VkMultisamplePropertiesEXT structure
See Also

VkMultisamplePropertiesEXT

Parameters
physicalDevice:VkPhysicalDevice

the physical device from which to query the additional multisampling capabilities.

samples:int

a VkSampleCountFlagBits value specifying the sample count to query capabilities for.

pMultisampleProperties:VkMultisamplePropertiesEXT

a pointer to a VkMultisamplePropertiesEXT structure in which information about additional multisampling capabilities specific to the sample count is returned.