| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Vulkan.Extensions.VK_KHR_fragment_shading_rate
Synopsis
- cmdSetFragmentShadingRateKHR :: forall io. MonadIO io => CommandBuffer -> ("fragmentSize" ::: Extent2D) -> ("combinerOps" ::: (FragmentShadingRateCombinerOpKHR, FragmentShadingRateCombinerOpKHR)) -> io ()
- getPhysicalDeviceFragmentShadingRatesKHR :: forall io. MonadIO io => PhysicalDevice -> io (Result, "fragmentShadingRates" ::: Vector PhysicalDeviceFragmentShadingRateKHR)
- pattern IMAGE_LAYOUT_FRAGMENT_SHADING_RATE_ATTACHMENT_OPTIMAL_KHR :: ImageLayout
- pattern ACCESS_FRAGMENT_SHADING_RATE_ATTACHMENT_READ_BIT_KHR :: AccessFlagBits
- pattern IMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR :: ImageUsageFlagBits
- pattern PIPELINE_STAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR :: PipelineStageFlagBits
- data FragmentShadingRateAttachmentInfoKHR = FragmentShadingRateAttachmentInfoKHR {}
- data PipelineFragmentShadingRateStateCreateInfoKHR = PipelineFragmentShadingRateStateCreateInfoKHR {}
- data PhysicalDeviceFragmentShadingRateFeaturesKHR = PhysicalDeviceFragmentShadingRateFeaturesKHR {}
- data PhysicalDeviceFragmentShadingRatePropertiesKHR = PhysicalDeviceFragmentShadingRatePropertiesKHR {
- minFragmentShadingRateAttachmentTexelSize :: Extent2D
- maxFragmentShadingRateAttachmentTexelSize :: Extent2D
- maxFragmentShadingRateAttachmentTexelSizeAspectRatio :: Word32
- primitiveFragmentShadingRateWithMultipleViewports :: Bool
- layeredShadingRateAttachments :: Bool
- fragmentShadingRateNonTrivialCombinerOps :: Bool
- maxFragmentSize :: Extent2D
- maxFragmentSizeAspectRatio :: Word32
- maxFragmentShadingRateCoverageSamples :: Word32
- maxFragmentShadingRateRasterizationSamples :: SampleCountFlagBits
- fragmentShadingRateWithShaderDepthStencilWrites :: Bool
- fragmentShadingRateWithSampleMask :: Bool
- fragmentShadingRateWithShaderSampleMask :: Bool
- fragmentShadingRateWithConservativeRasterization :: Bool
- fragmentShadingRateWithFragmentShaderInterlock :: Bool
- fragmentShadingRateWithCustomSampleLocations :: Bool
- fragmentShadingRateStrictMultiplyCombiner :: Bool
- data PhysicalDeviceFragmentShadingRateKHR = PhysicalDeviceFragmentShadingRateKHR {}
- newtype FragmentShadingRateCombinerOpKHR where
- FragmentShadingRateCombinerOpKHR Int32
- pattern FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHR :: FragmentShadingRateCombinerOpKHR
- pattern FRAGMENT_SHADING_RATE_COMBINER_OP_REPLACE_KHR :: FragmentShadingRateCombinerOpKHR
- pattern FRAGMENT_SHADING_RATE_COMBINER_OP_MIN_KHR :: FragmentShadingRateCombinerOpKHR
- pattern FRAGMENT_SHADING_RATE_COMBINER_OP_MAX_KHR :: FragmentShadingRateCombinerOpKHR
- pattern FRAGMENT_SHADING_RATE_COMBINER_OP_MUL_KHR :: FragmentShadingRateCombinerOpKHR
- type KHR_FRAGMENT_SHADING_RATE_SPEC_VERSION = 1
- pattern KHR_FRAGMENT_SHADING_RATE_SPEC_VERSION :: forall a. Integral a => a
- type KHR_FRAGMENT_SHADING_RATE_EXTENSION_NAME = "VK_KHR_fragment_shading_rate"
- pattern KHR_FRAGMENT_SHADING_RATE_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
Documentation
cmdSetFragmentShadingRateKHR Source #
Arguments
| :: forall io. MonadIO io | |
| => CommandBuffer |
|
| -> ("fragmentSize" ::: Extent2D) |
|
| -> ("combinerOps" ::: (FragmentShadingRateCombinerOpKHR, FragmentShadingRateCombinerOpKHR)) |
|
| -> io () |
vkCmdSetFragmentShadingRateKHR - Set pipeline fragment shading rate dynamically
Valid Usage
- If
pipelineFragmentShadingRate
is not enabled,
pFragmentSize->widthmust be1
- If
pipelineFragmentShadingRate
is not enabled,
pFragmentSize->heightmust be1 - One of pipelineFragmentShadingRate, primitiveFragmentShadingRate, or attachmentFragmentShadingRate must be enabled
- If the
primitiveFragmentShadingRate feature
is not enabled,
combinerOps[0] must beFRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHR - If the
attachmentFragmentShadingRate feature
is not enabled,
combinerOps[1] must beFRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHR - If the
fragmentSizeNonTrivialCombinerOps
limit is not supported, elements of
combinerOpsmust be eitherFRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHRorFRAGMENT_SHADING_RATE_COMBINER_OP_REPLACE_KHR pFragmentSize->widthmust be greater than or equal to1pFragmentSize->heightmust be greater than or equal to1pFragmentSize->widthmust be a power-of-two valuepFragmentSize->heightmust be a power-of-two valuepFragmentSize->widthmust be less than or equal to4pFragmentSize->heightmust be less than or equal to4
Valid Usage (Implicit)
commandBuffermust be a validCommandBufferhandle
pFragmentSizemust be a valid pointer to a validExtent2Dstructure- Any given element of
combinerOpsmust be a validFragmentShadingRateCombinerOpKHRvalue 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 | Pipeline Type |
|---|---|---|---|
| Primary Secondary | Both | Graphics |
See Also
getPhysicalDeviceFragmentShadingRatesKHR Source #
Arguments
| :: forall io. MonadIO io | |
| => PhysicalDevice |
|
| -> io (Result, "fragmentShadingRates" ::: Vector PhysicalDeviceFragmentShadingRateKHR) |
vkGetPhysicalDeviceFragmentShadingRatesKHR - Get available shading rates for a physical device
Description
If pFragmentShadingRates is NULL, then the number of fragment
shading rates available is returned in pFragmentShadingRateCount.
Otherwise, pFragmentShadingRateCount must point to a variable set by
the user to the number of elements in the pFragmentShadingRates array,
and on return the variable is overwritten with the number of structures
actually written to pFragmentShadingRates. If
pFragmentShadingRateCount is less than the number of fragment shading
rates available, at most pFragmentShadingRateCount structures will be
written, and INCOMPLETE will be returned
instead of SUCCESS, to indicate that not
all the available fragment shading rates were returned.
The returned array of fragment shading rates must be ordered from
largest fragmentSize.width value to smallest, and each set of fragment
shading rates with the same fragmentSize.width value must be ordered
from largest fragmentSize.height to smallest. Any two entries in the
array must not have the same fragmentSize values.
For any entry in the array, the following rules also apply:
- The value of
fragmentSize.widthmust be less than or equal to maxFragmentSize.width. - The value of
fragmentSize.widthmust be greater than or equal to1. - The value of
fragmentSize.widthmust be a power-of-two. - The value of
fragmentSize.heightmust be less than or equal to maxFragmentSize.height. - The value of
fragmentSize.heightmust be greater than or equal to1. - The value of
fragmentSize.heightmust be a power-of-two. - The highest sample count in
sampleCountsmust be less than or equal to maxFragmentShadingRateRasterizationSamples. - The product of
fragmentSize.width,fragmentSize.height, and the highest sample count insampleCountsmust be less than or equal to maxFragmentShadingRateCoverageSamples.
Implementations must support at least the following shading rates:
sampleCounts | fragmentSize |
|---|---|
SAMPLE_COUNT_1_BIT
|
SAMPLE_COUNT_4_BIT | {2,2} |
SAMPLE_COUNT_1_BIT
|
SAMPLE_COUNT_4_BIT | {2,1} |
| ~0 | {1,1} |
If
framebufferColorSampleCounts,
includes SAMPLE_COUNT_2_BIT,
the required rates must also include
SAMPLE_COUNT_2_BIT.
Note
Including the {1,1} fragment size is done for completeness; it has no actual effect on the support of rendering without setting the fragment size. All sample counts are supported for this rate.
Valid Usage (Implicit)
physicalDevicemust be a validPhysicalDevicehandle
pFragmentShadingRateCountmust be a valid pointer to auint32_tvalue- If the value referenced by
pFragmentShadingRateCountis not0, andpFragmentShadingRatesis notNULL,pFragmentShadingRatesmust be a valid pointer to an array ofpFragmentShadingRateCountPhysicalDeviceFragmentShadingRateKHRstructures
Return Codes
See Also
data FragmentShadingRateAttachmentInfoKHR Source #
VkFragmentShadingRateAttachmentInfoKHR - Structure specifying a fragment shading rate attachment for a subpass
Description
If no shading rate attachment is specified, or if this structure isn’t specified, the implementation behaves as if a valid shading rate attachment was specified with all texels specifying a single pixel per fragment.
Valid Usage
- If
pFragmentShadingRateAttachmentis notNULLand itsattachmentmember is notATTACHMENT_UNUSEDthen it must have a format whose features containFORMAT_FEATURE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR
- If
pFragmentShadingRateAttachmentis notNULLand itsattachmentmember is notATTACHMENT_UNUSED, itslayoutmember must be equal toIMAGE_LAYOUT_GENERALorIMAGE_LAYOUT_FRAGMENT_SHADING_RATE_ATTACHMENT_OPTIMAL_KHR - If
pFragmentShadingRateAttachmentis notNULLand itsattachmentmember is notATTACHMENT_UNUSED,shadingRateAttachmentTexelSize.widthmust be a power of two value - If
pFragmentShadingRateAttachmentis notNULLand itsattachmentmember is notATTACHMENT_UNUSED,shadingRateAttachmentTexelSize.widthmust be less than or equal to maxFragmentShadingRateAttachmentTexelSize.width - If
pFragmentShadingRateAttachmentis notNULLand itsattachmentmember is notATTACHMENT_UNUSED,shadingRateAttachmentTexelSize.widthmust be greater than or equal to minFragmentShadingRateAttachmentTexelSize.width - If
pFragmentShadingRateAttachmentis notNULLand itsattachmentmember is notATTACHMENT_UNUSED,shadingRateAttachmentTexelSize.heightmust be a power of two value - If
pFragmentShadingRateAttachmentis notNULLand itsattachmentmember is notATTACHMENT_UNUSED,shadingRateAttachmentTexelSize.heightmust be less than or equal to maxFragmentShadingRateAttachmentTexelSize.height - If
pFragmentShadingRateAttachmentis notNULLand itsattachmentmember is notATTACHMENT_UNUSED,shadingRateAttachmentTexelSize.heightmust be greater than or equal to minFragmentShadingRateAttachmentTexelSize.height - If
pFragmentShadingRateAttachmentis notNULLand itsattachmentmember is notATTACHMENT_UNUSED, the quotient ofshadingRateAttachmentTexelSize.widthandshadingRateAttachmentTexelSize.heightmust be less than or equal to maxFragmentShadingRateAttachmentTexelSizeAspectRatio - If
pFragmentShadingRateAttachmentis notNULLand itsattachmentmember is notATTACHMENT_UNUSED, the quotient ofshadingRateAttachmentTexelSize.heightandshadingRateAttachmentTexelSize.widthmust be less than or equal to maxFragmentShadingRateAttachmentTexelSizeAspectRatio
Valid Usage (Implicit)
sTypemust beSTRUCTURE_TYPE_FRAGMENT_SHADING_RATE_ATTACHMENT_INFO_KHR
pFragmentShadingRateAttachmentmust be a valid pointer to a validAttachmentReference2structure
See Also
Constructors
| FragmentShadingRateAttachmentInfoKHR | |
Fields
| |
Instances
data PipelineFragmentShadingRateStateCreateInfoKHR Source #
VkPipelineFragmentShadingRateStateCreateInfoKHR - Structure specifying parameters controlling the fragment shading rate
Description
If the pNext chain of
GraphicsPipelineCreateInfo includes a
PipelineFragmentShadingRateStateCreateInfoKHR structure, then that
structure includes parameters that control the pipeline fragment shading
rate.
If this structure is not present, fragmentSize is considered to be
equal to (1,1), and both elements of combinerOps are considered to be
equal to FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHR.
Valid Usage (Implicit)
- Any given element of
combinerOpsmust be a validFragmentShadingRateCombinerOpKHRvalue
See Also
Constructors
| PipelineFragmentShadingRateStateCreateInfoKHR | |
Fields
| |
Instances
data PhysicalDeviceFragmentShadingRateFeaturesKHR Source #
VkPhysicalDeviceFragmentShadingRateFeaturesKHR - Structure indicating support for variable rate fragment shading
Members
The members of the PhysicalDeviceFragmentShadingRateFeaturesKHR
structure describe the following features:
Description
If the PhysicalDeviceFragmentShadingRateFeaturesKHR structure is
included in the pNext chain of
PhysicalDeviceFeatures2,
it is filled with values indicating whether each feature is supported.
PhysicalDeviceFragmentShadingRateFeaturesKHR can also be used in the
pNext chain of DeviceCreateInfo to enable these
features.
Valid Usage (Implicit)
See Also
Constructors
| PhysicalDeviceFragmentShadingRateFeaturesKHR | |
Fields
| |
Instances
data PhysicalDeviceFragmentShadingRatePropertiesKHR Source #
VkPhysicalDeviceFragmentShadingRatePropertiesKHR - Structure describing variable fragment shading rate limits that can be supported by an implementation
Members
The members of the PhysicalDeviceFragmentShadingRatePropertiesKHR
structure describe the following implementation-dependent properties
related to
fragment shading rates:
Description
Note
Multiplication of the combiner rates using the fragment width/height in linear space is equivalent to an addition of those values in log2 space. Some implementations inadvertently implemented an addition in linear space due to unclear requirements originating outside of this specification. This resulted in fragmentShadingRateStrictMultiplyCombiner being added. Fortunately, this only affects situations where a rate of 1 in either dimension is combined with another rate of 1. All other combinations result in the exact same result as if multiplication was performed in linear space due to the clamping logic, and the fact that both the sum and product of 2 and 2 are equal. In many cases, this limit will not affect the correct operation of applications.
If the PhysicalDeviceFragmentShadingRatePropertiesKHR structure is
included in the pNext chain of
PhysicalDeviceProperties2,
it is filled with the implementation-dependent limits.
Valid Usage (Implicit)
See Also
Constructors
| PhysicalDeviceFragmentShadingRatePropertiesKHR | |
Fields
| |
Instances
data PhysicalDeviceFragmentShadingRateKHR Source #
VkPhysicalDeviceFragmentShadingRateKHR - Structure returning information about sample count specific additional multisampling capabilities
Valid Usage (Implicit)
See Also
Extent2D,
SampleCountFlags,
StructureType,
getPhysicalDeviceFragmentShadingRatesKHR
Constructors
| PhysicalDeviceFragmentShadingRateKHR | |
Fields
| |
Instances
newtype FragmentShadingRateCombinerOpKHR Source #
VkFragmentShadingRateCombinerOpKHR - Control how fragment shading rates are combined
Description
where combine(Axy,Bxy) is the combine operation, and Axy and Bxy are the inputs to the operation.
If
fragmentShadingRateStrictMultiplyCombiner
is FALSE, using
FRAGMENT_SHADING_RATE_COMBINER_OP_MUL_KHR with values of 1 for both A
and B in the same dimension results in the value 2 being produced for
that dimension. See the definition of
fragmentShadingRateStrictMultiplyCombiner
for more information.
These operations are performed in a component-wise fashion.
See Also
PipelineFragmentShadingRateStateCreateInfoKHR,
cmdSetFragmentShadingRateKHR
Constructors
| FragmentShadingRateCombinerOpKHR Int32 |
Bundled Patterns
| pattern FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHR :: FragmentShadingRateCombinerOpKHR |
|
| pattern FRAGMENT_SHADING_RATE_COMBINER_OP_REPLACE_KHR :: FragmentShadingRateCombinerOpKHR |
|
| pattern FRAGMENT_SHADING_RATE_COMBINER_OP_MIN_KHR :: FragmentShadingRateCombinerOpKHR |
|
| pattern FRAGMENT_SHADING_RATE_COMBINER_OP_MAX_KHR :: FragmentShadingRateCombinerOpKHR |
|
| pattern FRAGMENT_SHADING_RATE_COMBINER_OP_MUL_KHR :: FragmentShadingRateCombinerOpKHR |
|
Instances
pattern KHR_FRAGMENT_SHADING_RATE_SPEC_VERSION :: forall a. Integral a => a Source #
type KHR_FRAGMENT_SHADING_RATE_EXTENSION_NAME = "VK_KHR_fragment_shading_rate" Source #
pattern KHR_FRAGMENT_SHADING_RATE_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a Source #