vulkan-2.0.0.1: Bindings to the Vulkan graphics API.

Safe HaskellNone
LanguageHaskell2010

Graphics.Vulkan.Extensions.VK_EXT_sample_locations

Synopsis

Documentation

pattern VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT :: VkDynamicState Source #

VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT specifies that the sampleLocationsInfo state in VkPipelineSampleLocationsStateCreateInfoEXT will be ignored and must be set dynamically with vkCmdSetSampleLocationsEXT before any draw or clear commands. Enabling custom sample locations is still indicated by the sampleLocationsEnable member of VkPipelineSampleLocationsStateCreateInfoEXT.

vkCmdSetSampleLocationsEXT :: ("commandBuffer" ::: VkCommandBuffer) -> ("pSampleLocationsInfo" ::: Ptr VkSampleLocationsInfoEXT) -> IO () Source #

vkCmdSetSampleLocationsEXT - Set the dynamic sample locations state

Parameters

  • commandBuffer is the command buffer into which the command will be recorded.
  • pSampleLocationsInfo is the sample locations state to set.

Valid Usage

  • The bound graphics pipeline must have been created with the VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT dynamic state enabled
  • The sampleLocationsPerPixel member of pSampleLocationsInfo must equal the rasterizationSamples member of the VkPipelineMultisampleStateCreateInfo structure the bound graphics pipeline has been created with
  • If VkPhysicalDeviceSampleLocationsPropertiesEXT::variableSampleLocations is VK_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 pSampleLocationsInfo

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

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 Levels Render Pass Scope Supported Queue Types Pipeline Type
Primary Secondary Both Graphics

See Also

VkCommandBuffer, VkSampleLocationsInfoEXT

vkGetPhysicalDeviceMultisamplePropertiesEXT :: ("physicalDevice" ::: VkPhysicalDevice) -> ("samples" ::: VkSampleCountFlagBits) -> ("pMultisampleProperties" ::: Ptr VkMultisamplePropertiesEXT) -> IO () Source #

vkGetPhysicalDeviceMultisamplePropertiesEXT - Report sample count specific multisampling capabilities of a physical device

Parameters

  • physicalDevice is the physical device from which to query the additional multisampling capabilities.
  • samples is the sample count to query the capabilities for.
  • pMultisampleProperties is a pointer to a structure of type VkMultisamplePropertiesEXT, in which information about the additional multisampling capabilities specific to the sample count is returned.

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, VkPhysicalDevice, VkSampleCountFlagBits

data VkSampleLocationEXT 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 VkSampleLocationEXT structure are always clamped to the implementation-dependent sample location coordinate range [sampleLocationCoordinateRange[0],sampleLocationCoordinateRange[1]] that can be queried by chaining the VkPhysicalDeviceSampleLocationsPropertiesEXT structure to the pNext chain of VkPhysicalDeviceProperties2.

See Also

VkSampleLocationsInfoEXT

Constructors

VkSampleLocationEXT 

Fields

  • vkX :: CFloat

    x is the horizontal coordinate of the sample’s location.

  • vkY :: CFloat

    y is the vertical coordinate of the sample’s location.

data VkSampleLocationsInfoEXT 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 VK_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].

Valid Usage

  • sampleLocationsCount must equal sampleLocationsPerPixel × sampleLocationGridSize.width × sampleLocationGridSize.height

Valid Usage (Implicit)

  • sType must be VK_STRUCTURE_TYPE_SAMPLE_LOCATIONS_INFO_EXT
  • sampleLocationsPerPixel must be a valid VkSampleCountFlagBits value
  • pSampleLocations must be a valid pointer to an array of sampleLocationsCount VkSampleLocationEXT structures
  • sampleLocationsCount must be greater than 0

See Also

VkAttachmentSampleLocationsEXT, VkExtent2D, VkPipelineSampleLocationsStateCreateInfoEXT, VkSampleCountFlagBits, VkSampleLocationEXT, VkStructureType, VkSubpassSampleLocationsEXT, vkCmdSetSampleLocationsEXT

Constructors

VkSampleLocationsInfoEXT 

Fields

data VkAttachmentSampleLocationsEXT 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 VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT then the values specified in sampleLocationsInfo are ignored.

Valid Usage

Valid Usage (Implicit)

  • sampleLocationsInfo must be a valid VkSampleLocationsInfoEXT structure

See Also

VkRenderPassSampleLocationsBeginInfoEXT, VkSampleLocationsInfoEXT

Constructors

VkAttachmentSampleLocationsEXT 

Fields

  • vkAttachmentIndex :: Word32

    attachmentIndex is the index of the attachment for which the sample locations state is provided.

  • vkSampleLocationsInfo :: VkSampleLocationsInfoEXT

    sampleLocationsInfo is the sample locations state to use for the layout transition of the given attachment from the initial layout of the attachment to the image layout specified for the attachment in the first subpass using it.

data VkSubpassSampleLocationsEXT 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 VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT or if the subpass does not use a depth/stencil attachment, and VkPhysicalDeviceSampleLocationsPropertiesEXT::variableSampleLocations is VK_TRUE then the values specified in sampleLocationsInfo are ignored.

Valid Usage

Valid Usage (Implicit)

  • sampleLocationsInfo must be a valid VkSampleLocationsInfoEXT structure

See Also

VkRenderPassSampleLocationsBeginInfoEXT, VkSampleLocationsInfoEXT

Constructors

VkSubpassSampleLocationsEXT 

Fields

  • vkSubpassIndex :: Word32

    subpassIndex is the index of the subpass for which the sample locations state is provided.

  • vkSampleLocationsInfo :: VkSampleLocationsInfoEXT

    sampleLocationsInfo is the sample locations state to use for the layout transition of the depth/stencil attachment away from the image layout the attachment is used with in the subpass specified in subpassIndex.

data VkRenderPassSampleLocationsBeginInfoEXT Source #

VkRenderPassSampleLocationsBeginInfoEXT - Structure specifying sample locations to use for the layout transition of custom sample locations compatible depth/stencil attachments

Valid Usage (Implicit)

  • sType must be VK_STRUCTURE_TYPE_RENDER_PASS_SAMPLE_LOCATIONS_BEGIN_INFO_EXT
  • If attachmentInitialSampleLocationsCount is not 0, pAttachmentInitialSampleLocations must be a valid pointer to an array of attachmentInitialSampleLocationsCount valid VkAttachmentSampleLocationsEXT structures
  • If postSubpassSampleLocationsCount is not 0, pPostSubpassSampleLocations must be a valid pointer to an array of postSubpassSampleLocationsCount valid VkSubpassSampleLocationsEXT structures

See Also

VkAttachmentSampleLocationsEXT, VkStructureType, VkSubpassSampleLocationsEXT

Constructors

VkRenderPassSampleLocationsBeginInfoEXT 

Fields

  • vkSType :: VkStructureType

    sType is the type of this structure.

  • vkPNext :: Ptr ()

    pNext is NULL or a pointer to an extension-specific structure.

  • vkAttachmentInitialSampleLocationsCount :: Word32

    attachmentInitialSampleLocationsCount is the number of elements in the pAttachmentInitialSampleLocations array.

  • vkPAttachmentInitialSampleLocations :: Ptr VkAttachmentSampleLocationsEXT

    pAttachmentInitialSampleLocations is an array of attachmentInitialSampleLocationsCount VkAttachmentSampleLocationsEXT structures specifying the attachment indices and their corresponding sample location state. Each element of pAttachmentInitialSampleLocations can specify the sample location state to use in the automatic layout transition performed to transition a depth/stencil attachment from the initial layout of the attachment to the image layout specified for the attachment in the first subpass using it.

  • vkPostSubpassSampleLocationsCount :: Word32

    postSubpassSampleLocationsCount is the number of elements in the pPostSubpassSampleLocations array.

  • vkPPostSubpassSampleLocations :: Ptr VkSubpassSampleLocationsEXT

    pPostSubpassSampleLocations is an array of postSubpassSampleLocationsCount VkSubpassSampleLocationsEXT structures specifying the subpass indices and their corresponding sample location state. Each element of pPostSubpassSampleLocations can specify the sample location state to use in the automatic layout transition performed to transition the depth/stencil attachment used by the specified subpass to the image layout specified in a dependent subpass or to the final layout of the attachment in case the specified subpass is the last subpass using that attachment. In addition, if VkPhysicalDeviceSampleLocationsPropertiesEXT::variableSampleLocations is VK_FALSE, each element of pPostSubpassSampleLocations must specify the sample location state that matches the sample locations used by all pipelines that will be bound to a command buffer during the specified subpass. If variableSampleLocations is VK_TRUE, the sample locations used for rasterization do not depend on pPostSubpassSampleLocations.

data VkPipelineSampleLocationsStateCreateInfoEXT Source #

VkPipelineSampleLocationsStateCreateInfoEXT - Structure specifying sample locations for a pipeline

Valid Usage (Implicit)

  • sType must be VK_STRUCTURE_TYPE_PIPELINE_SAMPLE_LOCATIONS_STATE_CREATE_INFO_EXT
  • sampleLocationsInfo must be a valid VkSampleLocationsInfoEXT structure

See Also

VkBool32, VkSampleLocationsInfoEXT, VkStructureType

Constructors

VkPipelineSampleLocationsStateCreateInfoEXT 

Fields

  • vkSType :: VkStructureType

    sType is the type of this structure.

  • vkPNext :: Ptr ()

    pNext is NULL or a pointer to an extension-specific structure.

  • vkSampleLocationsEnable :: VkBool32

    sampleLocationsEnable controls whether custom sample locations are used. If sampleLocationsEnable is VK_FALSE, the default sample locations are used and the values specified in sampleLocationsInfo are ignored.

  • vkSampleLocationsInfo :: VkSampleLocationsInfoEXT

    sampleLocationsInfo is the sample locations to use during rasterization if sampleLocationsEnable is VK_TRUE and the graphics pipeline isn’t created with VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT.

data VkPhysicalDeviceSampleLocationsPropertiesEXT Source #

VkPhysicalDeviceSampleLocationsPropertiesEXT - Structure describing sample location limits that can be supported by an implementation

Members

The members of the VkPhysicalDeviceSampleLocationsPropertiesEXT structure describe the following implementation-dependent limits:

Description

  • sampleLocationSampleCounts is a bitmask of VkSampleCountFlagBits indicating the sample counts supporting custom sample locations.
  • maxSampleLocationGridSize is the maximum size of the pixel grid in which sample locations can vary that is supported for all sample counts in sampleLocationSampleCounts.
  • sampleLocationCoordinateRange[2] is the range of supported sample location coordinates.
  • sampleLocationSubPixelBits is the number of bits of subpixel precision for sample locations.
  • variableSampleLocations specifies whether the sample locations used by all pipelines that will be bound to a command buffer during a subpass must match. If set to VK_TRUE, the implementation supports variable sample locations in a subpass. If set to VK_FALSE, then the sample locations must stay constant in each subpass.

Valid Usage (Implicit)

  • sType must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLE_LOCATIONS_PROPERTIES_EXT

If the VkPhysicalDeviceSampleLocationsPropertiesEXT structure is included in the pNext chain of VkPhysicalDeviceProperties2, it is filled with the implementation-dependent limits.

See Also

VkBool32, VkExtent2D, VkSampleCountFlags, VkStructureType

data VkMultisamplePropertiesEXT Source #

VkMultisamplePropertiesEXT - Structure returning information about sample count specific additional multisampling capabilities

Valid Usage (Implicit)

  • sType must be VK_STRUCTURE_TYPE_MULTISAMPLE_PROPERTIES_EXT
  • pNext must be NULL

See Also

VkExtent2D, VkStructureType, vkGetPhysicalDeviceMultisamplePropertiesEXT

Constructors

VkMultisamplePropertiesEXT 

Fields