| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Vulkan.Extensions.VK_EXT_sample_locations
Description
Name
VK_EXT_sample_locations - device extension
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
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
Description
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 SampleLocationsInfoEXT structure can be specified for each
situation where an explicit or automatic layout transition has to take
place. SampleLocationsInfoEXT can be chained from
ImageMemoryBarrier structures to provide
sample locations for layout transitions performed by
cmdWaitEvents and
cmdPipelineBarrier calls, and
RenderPassSampleLocationsBeginInfoEXT can be chained from
RenderPassBeginInfo to provide
sample locations for layout transitions performed implicitly by a render
pass instance.
New Commands
New Structures
MultisamplePropertiesEXTSampleLocationEXTSubpassSampleLocationsEXTExtending
ImageMemoryBarrier,ImageMemoryBarrier2KHR:Extending
PhysicalDeviceProperties2:Extending
PipelineMultisampleStateCreateInfo:Extending
RenderPassBeginInfo:
New Enum Constants
EXT_SAMPLE_LOCATIONS_SPEC_VERSIONExtending
DynamicState:Extending
ImageCreateFlagBits:Extending
StructureType:
Version History
Revision 1, 2017-08-02 (Daniel Rakos)
- Internal revisions
See Also
AttachmentSampleLocationsEXT, MultisamplePropertiesEXT,
PhysicalDeviceSampleLocationsPropertiesEXT,
PipelineSampleLocationsStateCreateInfoEXT,
RenderPassSampleLocationsBeginInfoEXT, SampleLocationEXT,
SampleLocationsInfoEXT, SubpassSampleLocationsEXT,
cmdSetSampleLocationsEXT, getPhysicalDeviceMultisamplePropertiesEXT
Document Notes
For more information, see the Vulkan Specification
This page is a generated document. Fixes and changes should be made to the generator scripts, not directly.
Synopsis
- cmdSetSampleLocationsEXT :: forall io. MonadIO io => CommandBuffer -> SampleLocationsInfoEXT -> io ()
- getPhysicalDeviceMultisamplePropertiesEXT :: forall io. MonadIO io => PhysicalDevice -> ("samples" ::: SampleCountFlagBits) -> io MultisamplePropertiesEXT
- data SampleLocationEXT = SampleLocationEXT {}
- data SampleLocationsInfoEXT = SampleLocationsInfoEXT {}
- data AttachmentSampleLocationsEXT = AttachmentSampleLocationsEXT {}
- data SubpassSampleLocationsEXT = SubpassSampleLocationsEXT {}
- data RenderPassSampleLocationsBeginInfoEXT = RenderPassSampleLocationsBeginInfoEXT {}
- data PipelineSampleLocationsStateCreateInfoEXT = PipelineSampleLocationsStateCreateInfoEXT {}
- data PhysicalDeviceSampleLocationsPropertiesEXT = PhysicalDeviceSampleLocationsPropertiesEXT {}
- data MultisamplePropertiesEXT = MultisamplePropertiesEXT {}
- type EXT_SAMPLE_LOCATIONS_SPEC_VERSION = 1
- pattern EXT_SAMPLE_LOCATIONS_SPEC_VERSION :: forall a. Integral a => a
- type EXT_SAMPLE_LOCATIONS_EXTENSION_NAME = "VK_EXT_sample_locations"
- pattern EXT_SAMPLE_LOCATIONS_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
Documentation
cmdSetSampleLocationsEXT Source #
Arguments
| :: forall io. MonadIO io | |
| => CommandBuffer |
|
| -> SampleLocationsInfoEXT |
|
| -> io () |
vkCmdSetSampleLocationsEXT - Set the dynamic sample locations state
Valid Usage
- The
sampleLocationsPerPixelmember ofpSampleLocationsInfomust equal therasterizationSamplesmember of thePipelineMultisampleStateCreateInfostructure the bound graphics pipeline has been created with
- If
PhysicalDeviceSampleLocationsPropertiesEXT::variableSampleLocationsisFALSEthen the current render pass must have been begun by specifying aRenderPassSampleLocationsBeginInfoEXTstructure 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 validCommandBufferhandle
-
pSampleLocationsInfomust be a valid pointer to a validSampleLocationsInfoEXTstructure -
commandBuffermust be in the recording state - The
CommandPoolthatcommandBufferwas allocated from must support graphics operations
Host Synchronization
- Host access to
commandBuffermust be externally synchronized
- Host access to the
CommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
'
| Command Buffer Levels | Render Pass Scope | Supported Queue Types |
|---|---|---|
| Primary Secondary | Both | Graphics |
See Also
getPhysicalDeviceMultisamplePropertiesEXT Source #
Arguments
| :: forall io. MonadIO io | |
| => PhysicalDevice |
|
| -> ("samples" ::: SampleCountFlagBits) |
|
| -> io MultisamplePropertiesEXT |
vkGetPhysicalDeviceMultisamplePropertiesEXT - Report sample count specific multisampling capabilities of a physical device
Valid Usage (Implicit)
See Also
MultisamplePropertiesEXT, PhysicalDevice,
SampleCountFlagBits
data SampleLocationEXT Source #
VkSampleLocationEXT - Structure specifying the coordinates of a sample location
Description
The domain space of the sample location coordinates has an upper-left origin within the pixel in framebuffer space.
The values specified in a SampleLocationEXT structure are always
clamped to the implementation-dependent sample location coordinate range
[sampleLocationCoordinateRange[0],sampleLocationCoordinateRange[1]]
that can be queried using
PhysicalDeviceSampleLocationsPropertiesEXT.
See Also
Constructors
| SampleLocationEXT | |
Instances
data SampleLocationsInfoEXT Source #
VkSampleLocationsInfoEXT - Structure specifying a set of sample locations
Description
This structure can be used either to specify the sample locations to
be used for rendering or to specify the set of sample locations an image
subresource has been last rendered with for the purposes of layout
transitions of depth/stencil images created with
IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT.
The sample locations in pSampleLocations specify
sampleLocationsPerPixel number of sample locations for each pixel in
the grid of the size specified in sampleLocationGridSize. The sample
location for sample i at the pixel grid location (x,y) is taken from
pSampleLocations[(x + y × sampleLocationGridSize.width) ×
sampleLocationsPerPixel + i].
If the render pass has a fragment density map, the implementation will
choose the sample locations for the fragment and the contents of
pSampleLocations may be ignored.
Valid Usage
-
sampleLocationsPerPixelmust be a bit value that is set inPhysicalDeviceSampleLocationsPropertiesEXT::sampleLocationSampleCounts
-
sampleLocationsCountmust equalsampleLocationsPerPixel×sampleLocationGridSize.width×sampleLocationGridSize.height
Valid Usage (Implicit)
-
sTypemust beSTRUCTURE_TYPE_SAMPLE_LOCATIONS_INFO_EXT
- If
sampleLocationsCountis not0,pSampleLocationsmust be a valid pointer to an array ofsampleLocationsCountSampleLocationEXTstructures
See Also
AttachmentSampleLocationsEXT,
Extent2D,
PipelineSampleLocationsStateCreateInfoEXT,
SampleCountFlagBits,
SampleLocationEXT, StructureType,
SubpassSampleLocationsEXT, cmdSetSampleLocationsEXT
Constructors
| SampleLocationsInfoEXT | |
Fields
| |
Instances
| Show SampleLocationsInfoEXT Source # | |
Defined in Vulkan.Extensions.VK_EXT_sample_locations Methods showsPrec :: Int -> SampleLocationsInfoEXT -> ShowS # show :: SampleLocationsInfoEXT -> String # showList :: [SampleLocationsInfoEXT] -> ShowS # | |
| FromCStruct SampleLocationsInfoEXT Source # | |
Defined in Vulkan.Extensions.VK_EXT_sample_locations Methods peekCStruct :: Ptr SampleLocationsInfoEXT -> IO SampleLocationsInfoEXT Source # | |
| ToCStruct SampleLocationsInfoEXT Source # | |
Defined in Vulkan.Extensions.VK_EXT_sample_locations Methods withCStruct :: SampleLocationsInfoEXT -> (Ptr SampleLocationsInfoEXT -> IO b) -> IO b Source # pokeCStruct :: Ptr SampleLocationsInfoEXT -> SampleLocationsInfoEXT -> IO b -> IO b Source # withZeroCStruct :: (Ptr SampleLocationsInfoEXT -> IO b) -> IO b Source # pokeZeroCStruct :: Ptr SampleLocationsInfoEXT -> IO b -> IO b Source # cStructSize :: Int Source # | |
| Zero SampleLocationsInfoEXT Source # | |
Defined in Vulkan.Extensions.VK_EXT_sample_locations Methods | |
data AttachmentSampleLocationsEXT Source #
VkAttachmentSampleLocationsEXT - Structure specifying the sample locations state to use in the initial layout transition of attachments
Description
If the image referenced by the framebuffer attachment at index
attachmentIndex was not created with
IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT
then the values specified in sampleLocationsInfo are ignored.
Valid Usage (Implicit)
See Also
RenderPassSampleLocationsBeginInfoEXT, SampleLocationsInfoEXT
Constructors
| AttachmentSampleLocationsEXT | |
Fields
| |
Instances
| Show AttachmentSampleLocationsEXT Source # | |
Defined in Vulkan.Extensions.VK_EXT_sample_locations Methods showsPrec :: Int -> AttachmentSampleLocationsEXT -> ShowS # show :: AttachmentSampleLocationsEXT -> String # showList :: [AttachmentSampleLocationsEXT] -> ShowS # | |
| FromCStruct AttachmentSampleLocationsEXT Source # | |
Defined in Vulkan.Extensions.VK_EXT_sample_locations | |
| ToCStruct AttachmentSampleLocationsEXT Source # | |
Defined in Vulkan.Extensions.VK_EXT_sample_locations Methods withCStruct :: AttachmentSampleLocationsEXT -> (Ptr AttachmentSampleLocationsEXT -> IO b) -> IO b Source # pokeCStruct :: Ptr AttachmentSampleLocationsEXT -> AttachmentSampleLocationsEXT -> IO b -> IO b Source # withZeroCStruct :: (Ptr AttachmentSampleLocationsEXT -> IO b) -> IO b Source # pokeZeroCStruct :: Ptr AttachmentSampleLocationsEXT -> IO b -> IO b Source # cStructSize :: Int Source # | |
| Zero AttachmentSampleLocationsEXT Source # | |
Defined in Vulkan.Extensions.VK_EXT_sample_locations Methods | |
data SubpassSampleLocationsEXT Source #
VkSubpassSampleLocationsEXT - Structure specifying the sample locations state to use for layout transitions of attachments performed after a given subpass
Description
If the image referenced by the depth/stencil attachment used in the
subpass identified by subpassIndex was not created with
IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT
or if the subpass does not use a depth/stencil attachment, and
PhysicalDeviceSampleLocationsPropertiesEXT::variableSampleLocations
is TRUE then the values specified in
sampleLocationsInfo are ignored.
Valid Usage (Implicit)
See Also
RenderPassSampleLocationsBeginInfoEXT, SampleLocationsInfoEXT
Constructors
| SubpassSampleLocationsEXT | |
Fields
| |
Instances
data RenderPassSampleLocationsBeginInfoEXT Source #
VkRenderPassSampleLocationsBeginInfoEXT - Structure specifying sample locations to use for the layout transition of custom sample locations compatible depth/stencil attachments
Valid Usage (Implicit)
-
If
attachmentInitialSampleLocationsCountis not0,pAttachmentInitialSampleLocationsmust be a valid pointer to an array ofattachmentInitialSampleLocationsCountvalidAttachmentSampleLocationsEXTstructures -
If
postSubpassSampleLocationsCountis not0,pPostSubpassSampleLocationsmust be a valid pointer to an array ofpostSubpassSampleLocationsCountvalidSubpassSampleLocationsEXTstructures
See Also
AttachmentSampleLocationsEXT,
StructureType,
SubpassSampleLocationsEXT
Constructors
| RenderPassSampleLocationsBeginInfoEXT | |
Fields
| |
Instances
data PipelineSampleLocationsStateCreateInfoEXT Source #
VkPipelineSampleLocationsStateCreateInfoEXT - Structure specifying sample locations for a pipeline
Valid Usage (Implicit)
See Also
Constructors
| PipelineSampleLocationsStateCreateInfoEXT | |
Fields
| |
Instances
data PhysicalDeviceSampleLocationsPropertiesEXT Source #
VkPhysicalDeviceSampleLocationsPropertiesEXT - Structure describing sample location limits that can be supported by an implementation
Description
If the PhysicalDeviceSampleLocationsPropertiesEXT structure is
included in the pNext chain of the
PhysicalDeviceProperties2
structure passed to
getPhysicalDeviceProperties2,
it is filled in with each corresponding implementation-dependent
property.
Valid Usage (Implicit)
See Also
Constructors
| PhysicalDeviceSampleLocationsPropertiesEXT | |
Fields
| |
Instances
data MultisamplePropertiesEXT Source #
VkMultisamplePropertiesEXT - Structure returning information about sample count specific additional multisampling capabilities
Valid Usage (Implicit)
See Also
Extent2D,
StructureType,
getPhysicalDeviceMultisamplePropertiesEXT
Constructors
| MultisamplePropertiesEXT | |
Fields
| |
Instances
type EXT_SAMPLE_LOCATIONS_SPEC_VERSION = 1 Source #
pattern EXT_SAMPLE_LOCATIONS_SPEC_VERSION :: forall a. Integral a => a Source #
type EXT_SAMPLE_LOCATIONS_EXTENSION_NAME = "VK_EXT_sample_locations" Source #
pattern EXT_SAMPLE_LOCATIONS_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a Source #