Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Name
VK_NV_shading_rate_image - device extension
VK_NV_shading_rate_image
- Name String
VK_NV_shading_rate_image
- Extension Type
- Device extension
- Registered Extension Number
- 165
- Revision
- 3
- Ratification Status
- Not ratified
- Extension and Version Dependencies
- VK_KHR_get_physical_device_properties2
- Contact
Other Extension Metadata
- Last Modified Date
- 2019-07-18
- Interactions and External Dependencies
- This extension requires SPV_NV_shading_rate
- This extension provides API support for GL_NV_shading_rate_image
- Contributors
- Pat Brown, NVIDIA
- Carsten Rohde, NVIDIA
- Jeff Bolz, NVIDIA
- Daniel Koch, NVIDIA
- Mathias Schott, NVIDIA
- Matthew Netsch, Qualcomm Technologies, Inc.
Description
This extension allows applications to use a variable shading rate when processing fragments of rasterized primitives. By default, Vulkan will spawn one fragment shader for each pixel covered by a primitive. In this extension, applications can bind a shading rate image that can be used to vary the number of fragment shader invocations across the framebuffer. Some portions of the screen may be configured to spawn up to 16 fragment shaders for each pixel, while other portions may use a single fragment shader invocation for a 4x4 block of pixels. This can be useful for use cases like eye tracking, where the portion of the framebuffer that the user is looking at directly can be processed at high frequency, while distant corners of the image can be processed at lower frequency. Each texel in the shading rate image represents a fixed-size rectangle in the framebuffer, covering 16x16 pixels in the initial implementation of this extension. When rasterizing a primitive covering one of these rectangles, the Vulkan implementation reads a texel in the bound shading rate image and looks up the fetched value in a palette to determine a base shading rate.
In addition to the API support controlling rasterization, this extension also adds Vulkan support for the SPV_NV_shading_rate extension to SPIR-V. That extension provides two fragment shader variable decorations that allow fragment shaders to determine the shading rate used for processing the fragment:
FragmentSizeNV
, which indicates the width and height of the set of pixels processed by the fragment shader.InvocationsPerPixel
, which indicates the maximum number of fragment shader invocations that could be spawned for the pixel(s) covered by the fragment.
When using SPIR-V in conjunction with the OpenGL Shading Language
(GLSL), the fragment shader capabilities are provided by the
GL_NV_shading_rate_image
language extension and correspond to the
built-in variables gl_FragmentSizeNV
and gl_InvocationsPerPixelNV
,
respectively.
New Commands
New Structures
CoarseSampleOrderCustomNV
ShadingRatePaletteNV
Extending
PhysicalDeviceFeatures2
,DeviceCreateInfo
:Extending
PhysicalDeviceProperties2
:Extending
PipelineViewportStateCreateInfo
:
New Enums
New Enum Constants
NV_SHADING_RATE_IMAGE_SPEC_VERSION
Extending
AccessFlagBits
:Extending
DynamicState
:Extending
ImageLayout
:Extending
ImageUsageFlagBits
:Extending
PipelineStageFlagBits
:Extending
StructureType
:
Issues
- When using shading rates specifying “coarse” fragments covering multiple pixels, we will generate a combined coverage mask that combines the coverage masks of all pixels covered by the fragment. By default, these masks are combined in an implementation-dependent order. Should we provide a mechanism allowing applications to query or specify an exact order?
RESOLVED: Yes, this feature is useful for cases where most of the fragment shader can be evaluated once for an entire coarse fragment, but where some per-pixel computations are also required. For example, a per-pixel alpha test may want to kill all the samples for some pixels in a coarse fragment. This sort of test can be implemented using an output sample mask, but such a shader would need to know which bit in the mask corresponds to each sample in the coarse fragment. We are including a mechanism to allow applications to specify the orders of coverage samples for each shading rate and sample count, either as static pipeline state or dynamically via a command buffer. This portion of the extension has its own feature bit.
We will not be providing a query to determine the implementation-dependent default ordering. The thinking here is that if an application cares enough about the coarse fragment sample ordering to perform such a query, it could instead just set its own order, also using custom per-pixel sample locations if required.
- For the pipeline stage
PIPELINE_STAGE_SHADING_RATE_IMAGE_BIT_NV
, should we specify a precise location in the pipeline the shading rate image is accessed (after geometry shading, but before the early fragment tests) or leave it under-specified in case there are other implementations that access the image in a different pipeline location?
RESOLVED We are specifying the pipeline stage to be between the
final
pre-rasterization shader stage
(PIPELINE_STAGE_GEOMETRY_SHADER_BIT
)
and before the first stage used for fragment processing
(PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT
),
which seems to be the natural place to access the shading rate image.
- How do centroid-sampled variables work with fragments larger than one pixel?
RESOLVED For single-pixel fragments, fragment shader inputs
decorated with Centroid
are sampled at an implementation-dependent
location in the intersection of the area of the primitive being
rasterized and the area of the pixel that corresponds to the fragment.
With multi-pixel fragments, we follow a similar pattern, using the
intersection of the primitive and the set of pixels corresponding to
the fragment.
One important thing to keep in mind when using such “coarse” shading rates is that fragment attributes are sampled at the center of the fragment by default, regardless of the set of pixels/samples covered by the fragment. For fragments with a size of 4x4 pixels, this center location will be more than two pixels (1.5 * sqrt(2)) away from the center of the pixels at the corners of the fragment. When rendering a primitive that covers only a small part of a coarse fragment, sampling a color outside the primitive can produce overly bright or dark color values if the color values have a large gradient. To deal with this, an application can use centroid sampling on attributes where “extrapolation” artifacts can lead to overly bright or dark pixels. Note that this same problem also exists for multisampling with single-pixel fragments, but is less severe because it only affects certain samples of a pixel and such bright/dark samples may be averaged with other samples that do not have a similar problem.
Version History
Revision 3, 2019-07-18 (Mathias Schott)
- Fully list extension interfaces in this appendix.
Revision 2, 2018-09-13 (Pat Brown)
- Miscellaneous edits preparing the specification for publication.
Revision 1, 2018-08-08 (Pat Brown)
- Internal revisions
See Also
CoarseSampleLocationNV
, CoarseSampleOrderCustomNV
,
CoarseSampleOrderTypeNV
, PhysicalDeviceShadingRateImageFeaturesNV
,
PhysicalDeviceShadingRateImagePropertiesNV
,
PipelineViewportCoarseSampleOrderStateCreateInfoNV
,
PipelineViewportShadingRateImageStateCreateInfoNV
,
ShadingRatePaletteEntryNV
, ShadingRatePaletteNV
,
cmdBindShadingRateImageNV
, cmdSetCoarseSampleOrderNV
,
cmdSetViewportShadingRatePaletteNV
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
- cmdBindShadingRateImageNV :: forall io. MonadIO io => CommandBuffer -> ImageView -> ImageLayout -> io ()
- cmdSetViewportShadingRatePaletteNV :: forall io. MonadIO io => CommandBuffer -> ("firstViewport" ::: Word32) -> ("shadingRatePalettes" ::: Vector ShadingRatePaletteNV) -> io ()
- cmdSetCoarseSampleOrderNV :: forall io. MonadIO io => CommandBuffer -> CoarseSampleOrderTypeNV -> ("customSampleOrders" ::: Vector CoarseSampleOrderCustomNV) -> io ()
- pattern IMAGE_LAYOUT_SHADING_RATE_OPTIMAL_NV :: ImageLayout
- pattern ACCESS_SHADING_RATE_IMAGE_READ_BIT_NV :: AccessFlagBits
- pattern IMAGE_USAGE_SHADING_RATE_IMAGE_BIT_NV :: ImageUsageFlagBits
- pattern PIPELINE_STAGE_SHADING_RATE_IMAGE_BIT_NV :: PipelineStageFlagBits
- data ShadingRatePaletteNV = ShadingRatePaletteNV {}
- data PipelineViewportShadingRateImageStateCreateInfoNV = PipelineViewportShadingRateImageStateCreateInfoNV {}
- data PhysicalDeviceShadingRateImageFeaturesNV = PhysicalDeviceShadingRateImageFeaturesNV {}
- data PhysicalDeviceShadingRateImagePropertiesNV = PhysicalDeviceShadingRateImagePropertiesNV {}
- data CoarseSampleLocationNV = CoarseSampleLocationNV {}
- data CoarseSampleOrderCustomNV = CoarseSampleOrderCustomNV {}
- data PipelineViewportCoarseSampleOrderStateCreateInfoNV = PipelineViewportCoarseSampleOrderStateCreateInfoNV {}
- newtype ShadingRatePaletteEntryNV where
- ShadingRatePaletteEntryNV Int32
- pattern SHADING_RATE_PALETTE_ENTRY_NO_INVOCATIONS_NV :: ShadingRatePaletteEntryNV
- pattern SHADING_RATE_PALETTE_ENTRY_16_INVOCATIONS_PER_PIXEL_NV :: ShadingRatePaletteEntryNV
- pattern SHADING_RATE_PALETTE_ENTRY_8_INVOCATIONS_PER_PIXEL_NV :: ShadingRatePaletteEntryNV
- pattern SHADING_RATE_PALETTE_ENTRY_4_INVOCATIONS_PER_PIXEL_NV :: ShadingRatePaletteEntryNV
- pattern SHADING_RATE_PALETTE_ENTRY_2_INVOCATIONS_PER_PIXEL_NV :: ShadingRatePaletteEntryNV
- pattern SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_PIXEL_NV :: ShadingRatePaletteEntryNV
- pattern SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X1_PIXELS_NV :: ShadingRatePaletteEntryNV
- pattern SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_1X2_PIXELS_NV :: ShadingRatePaletteEntryNV
- pattern SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X2_PIXELS_NV :: ShadingRatePaletteEntryNV
- pattern SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_4X2_PIXELS_NV :: ShadingRatePaletteEntryNV
- pattern SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X4_PIXELS_NV :: ShadingRatePaletteEntryNV
- pattern SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_4X4_PIXELS_NV :: ShadingRatePaletteEntryNV
- newtype CoarseSampleOrderTypeNV where
- CoarseSampleOrderTypeNV Int32
- pattern COARSE_SAMPLE_ORDER_TYPE_DEFAULT_NV :: CoarseSampleOrderTypeNV
- pattern COARSE_SAMPLE_ORDER_TYPE_CUSTOM_NV :: CoarseSampleOrderTypeNV
- pattern COARSE_SAMPLE_ORDER_TYPE_PIXEL_MAJOR_NV :: CoarseSampleOrderTypeNV
- pattern COARSE_SAMPLE_ORDER_TYPE_SAMPLE_MAJOR_NV :: CoarseSampleOrderTypeNV
- type NV_SHADING_RATE_IMAGE_SPEC_VERSION = 3
- pattern NV_SHADING_RATE_IMAGE_SPEC_VERSION :: forall a. Integral a => a
- type NV_SHADING_RATE_IMAGE_EXTENSION_NAME = "VK_NV_shading_rate_image"
- pattern NV_SHADING_RATE_IMAGE_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
Documentation
cmdBindShadingRateImageNV Source #
:: forall io. MonadIO io | |
=> CommandBuffer |
|
-> ImageView |
|
-> ImageLayout |
|
-> io () |
vkCmdBindShadingRateImageNV - Bind a shading rate image on a command buffer
Valid Usage
- The shadingRateImage feature must be enabled
- If
imageView
is notNULL_HANDLE
, it must be a validImageView
handle of typeIMAGE_VIEW_TYPE_2D
orIMAGE_VIEW_TYPE_2D_ARRAY
- If
imageView
is notNULL_HANDLE
, it must have a format ofFORMAT_R8_UINT
- If
imageView
is notNULL_HANDLE
, it must have been created with ausage
value includingIMAGE_USAGE_SHADING_RATE_IMAGE_BIT_NV
- If
imageView
is notNULL_HANDLE
,imageLayout
must match the actualImageLayout
of each subresource accessible fromimageView
at the time the subresource is accessed - If
imageView
is notNULL_HANDLE
,imageLayout
must beIMAGE_LAYOUT_SHADING_RATE_OPTIMAL_NV
orIMAGE_LAYOUT_GENERAL
Valid Usage (Implicit)
-
commandBuffer
must be a validCommandBuffer
handle
- If
imageView
is notNULL_HANDLE
,imageView
must be a validImageView
handle -
imageLayout
must be a validImageLayout
value -
commandBuffer
must be in the recording state - The
CommandPool
thatcommandBuffer
was allocated from must support graphics operations - This command must only be called outside of a video coding scope
- Both of
commandBuffer
, andimageView
that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the sameDevice
Host Synchronization
- Host access to
commandBuffer
must be externally synchronized
- Host access to the
CommandPool
thatcommandBuffer
was allocated from must be externally synchronized
Command Properties
'
Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type |
---|---|---|---|---|
Primary Secondary | Both | Outside | Graphics | State |
See Also
VK_NV_shading_rate_image,
CommandBuffer
,
ImageLayout
,
ImageView
cmdSetViewportShadingRatePaletteNV Source #
:: forall io. MonadIO io | |
=> CommandBuffer |
|
-> ("firstViewport" ::: Word32) |
|
-> ("shadingRatePalettes" ::: Vector ShadingRatePaletteNV) |
|
-> io () |
vkCmdSetViewportShadingRatePaletteNV - Set shading rate image palettes dynamically for a command buffer
Description
This command sets the per-viewport shading rate image palettes for
subsequent drawing commands when drawing using
shader objects,
or when the graphics pipeline is created with
DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV
set in
PipelineDynamicStateCreateInfo
::pDynamicStates
.
Otherwise, this state is specified by the
PipelineViewportShadingRateImageStateCreateInfoNV
::pShadingRatePalettes
values used to create the currently active pipeline.
Valid Usage
- The shadingRateImage feature must be enabled
- The
sum of
firstViewport
andviewportCount
must be between1
andPhysicalDeviceLimits
::maxViewports
, inclusive - If
the
multiViewport
feature is not enabled,
firstViewport
must be0
- If
the
multiViewport
feature is not enabled,
viewportCount
must be1
Valid Usage (Implicit)
-
commandBuffer
must be a validCommandBuffer
handle
-
pShadingRatePalettes
must be a valid pointer to an array ofviewportCount
validShadingRatePaletteNV
structures -
commandBuffer
must be in the recording state -
The
CommandPool
thatcommandBuffer
was allocated from must support graphics operations - This command must only be called outside of a video coding scope
-
viewportCount
must be greater than0
Host Synchronization
- Host access to
commandBuffer
must be externally synchronized
- Host access to the
CommandPool
thatcommandBuffer
was allocated from must be externally synchronized
Command Properties
'
Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type |
---|---|---|---|---|
Primary Secondary | Both | Outside | Graphics | State |
See Also
VK_NV_shading_rate_image,
CommandBuffer
, ShadingRatePaletteNV
cmdSetCoarseSampleOrderNV Source #
:: forall io. MonadIO io | |
=> CommandBuffer |
|
-> CoarseSampleOrderTypeNV |
|
-> ("customSampleOrders" ::: Vector CoarseSampleOrderCustomNV) |
|
-> io () |
vkCmdSetCoarseSampleOrderNV - Set order of coverage samples for coarse fragments dynamically for a command buffer
Description
If sampleOrderType
is COARSE_SAMPLE_ORDER_TYPE_CUSTOM_NV
, the
coverage sample order used for any combination of fragment area and
coverage sample count not enumerated in pCustomSampleOrders
will be
identical to that used for COARSE_SAMPLE_ORDER_TYPE_DEFAULT_NV
.
This command sets the order of coverage samples for subsequent drawing
commands when drawing using
shader objects,
or when the graphics pipeline is created with
DYNAMIC_STATE_VIEWPORT_COARSE_SAMPLE_ORDER_NV
set in
PipelineDynamicStateCreateInfo
::pDynamicStates
.
Otherwise, this state is specified by the
PipelineViewportCoarseSampleOrderStateCreateInfoNV
values used to
create the currently active pipeline.
Valid Usage
- If
sampleOrderType
is notCOARSE_SAMPLE_ORDER_TYPE_CUSTOM_NV
,customSamplerOrderCount
must be0
- The
array
pCustomSampleOrders
must not contain two structures with matching values for both theshadingRate
andsampleCount
members
Valid Usage (Implicit)
-
commandBuffer
must be a validCommandBuffer
handle
-
sampleOrderType
must be a validCoarseSampleOrderTypeNV
value - If
customSampleOrderCount
is not0
,pCustomSampleOrders
must be a valid pointer to an array ofcustomSampleOrderCount
validCoarseSampleOrderCustomNV
structures -
commandBuffer
must be in the recording state - The
CommandPool
thatcommandBuffer
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
CommandPool
thatcommandBuffer
was allocated from must be externally synchronized
Command Properties
'
Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type |
---|---|---|---|---|
Primary Secondary | Both | Outside | Graphics | State |
See Also
VK_NV_shading_rate_image,
CoarseSampleOrderCustomNV
, CoarseSampleOrderTypeNV
,
CommandBuffer
pattern IMAGE_LAYOUT_SHADING_RATE_OPTIMAL_NV :: ImageLayout Source #
data ShadingRatePaletteNV Source #
VkShadingRatePaletteNV - Structure specifying a single shading rate palette
Valid Usage (Implicit)
See Also
VK_NV_shading_rate_image,
PipelineViewportShadingRateImageStateCreateInfoNV
,
ShadingRatePaletteEntryNV
, cmdSetViewportShadingRatePaletteNV
ShadingRatePaletteNV | |
|
Instances
Show ShadingRatePaletteNV Source # | |
Defined in Vulkan.Extensions.VK_NV_shading_rate_image showsPrec :: Int -> ShadingRatePaletteNV -> ShowS # show :: ShadingRatePaletteNV -> String # showList :: [ShadingRatePaletteNV] -> ShowS # | |
FromCStruct ShadingRatePaletteNV Source # | |
ToCStruct ShadingRatePaletteNV Source # | |
Defined in Vulkan.Extensions.VK_NV_shading_rate_image withCStruct :: ShadingRatePaletteNV -> (Ptr ShadingRatePaletteNV -> IO b) -> IO b Source # pokeCStruct :: Ptr ShadingRatePaletteNV -> ShadingRatePaletteNV -> IO b -> IO b Source # withZeroCStruct :: (Ptr ShadingRatePaletteNV -> IO b) -> IO b Source # pokeZeroCStruct :: Ptr ShadingRatePaletteNV -> IO b -> IO b Source # cStructSize :: Int Source # | |
Zero ShadingRatePaletteNV Source # | |
data PipelineViewportShadingRateImageStateCreateInfoNV Source #
VkPipelineViewportShadingRateImageStateCreateInfoNV - Structure specifying parameters controlling shading rate image usage
Description
If this structure is not present, shadingRateImageEnable
is considered
to be FALSE
, and the shading rate image
and palettes are not used.
Valid Usage
-
If the
multiViewport
feature is not enabled,
viewportCount
must be0
or1
-
viewportCount
must be less than or equal toPhysicalDeviceLimits
::maxViewports
-
If
shadingRateImageEnable
isTRUE
,viewportCount
must be greater or equal to theviewportCount
member ofPipelineViewportStateCreateInfo
Valid Usage (Implicit)
See Also
VK_NV_shading_rate_image,
Bool32
, ShadingRatePaletteNV
,
StructureType
PipelineViewportShadingRateImageStateCreateInfoNV | |
|
Instances
data PhysicalDeviceShadingRateImageFeaturesNV Source #
VkPhysicalDeviceShadingRateImageFeaturesNV - Structure describing shading rate image features that can be supported by an implementation
Members
This structure describes the following features:
Description
See Shading Rate Image for more information.
If the PhysicalDeviceShadingRateImageFeaturesNV
structure is included
in the pNext
chain of the
PhysicalDeviceFeatures2
structure passed to
getPhysicalDeviceFeatures2
,
it is filled in to indicate whether each corresponding feature is
supported. PhysicalDeviceShadingRateImageFeaturesNV
can also be used
in the pNext
chain of DeviceCreateInfo
to
selectively enable these features.
Valid Usage (Implicit)
See Also
Instances
data PhysicalDeviceShadingRateImagePropertiesNV Source #
VkPhysicalDeviceShadingRateImagePropertiesNV - Structure describing shading rate image limits that can be supported by an implementation
Description
If the PhysicalDeviceShadingRateImagePropertiesNV
structure is
included in the pNext
chain of the
PhysicalDeviceProperties2
structure passed to
getPhysicalDeviceProperties2
,
it is filled in with each corresponding implementation-dependent
property.
These properties are related to the shading rate image feature.
Valid Usage (Implicit)
See Also
PhysicalDeviceShadingRateImagePropertiesNV | |
|
Instances
data CoarseSampleLocationNV Source #
VkCoarseSampleLocationNV - Structure specifying parameters controlling shading rate image usage
Valid Usage
See Also
Instances
data CoarseSampleOrderCustomNV Source #
VkCoarseSampleOrderCustomNV - Structure specifying parameters controlling shading rate image usage
Description
The CoarseSampleOrderCustomNV
structure is used with a coverage sample
ordering type of COARSE_SAMPLE_ORDER_TYPE_CUSTOM_NV
to specify the
order of coverage samples for one combination of fragment width,
fragment height, and coverage sample count.
When using a custom sample ordering, element j in pSampleLocations
specifies a specific pixel location and
sample index
that corresponds to
coverage index
j in the multi-pixel fragment.
Valid Usage
-
sampleCount
must correspond to a sample count enumerated inSampleCountFlags
whose corresponding bit is set inPhysicalDeviceLimits
::framebufferNoAttachmentsSampleCounts
-
sampleLocationCount
must be equal to the product ofsampleCount
, the fragment width forshadingRate
, and the fragment height forshadingRate
-
sampleLocationCount
must be less than or equal to the value ofPhysicalDeviceShadingRateImagePropertiesNV
::shadingRateMaxCoarseSamples
- The array
pSampleLocations
must contain exactly one entry for every combination of valid values forpixelX
,pixelY
, andsample
in the structureCoarseSampleOrderCustomNV
Valid Usage (Implicit)
-
shadingRate
must be a validShadingRatePaletteEntryNV
value
-
pSampleLocations
must be a valid pointer to an array ofsampleLocationCount
CoarseSampleLocationNV
structures -
sampleLocationCount
must be greater than0
See Also
VK_NV_shading_rate_image,
CoarseSampleLocationNV
,
PipelineViewportCoarseSampleOrderStateCreateInfoNV
,
ShadingRatePaletteEntryNV
, cmdSetCoarseSampleOrderNV
CoarseSampleOrderCustomNV | |
|
Instances
Show CoarseSampleOrderCustomNV Source # | |
Defined in Vulkan.Extensions.VK_NV_shading_rate_image showsPrec :: Int -> CoarseSampleOrderCustomNV -> ShowS # show :: CoarseSampleOrderCustomNV -> String # showList :: [CoarseSampleOrderCustomNV] -> ShowS # | |
FromCStruct CoarseSampleOrderCustomNV Source # | |
ToCStruct CoarseSampleOrderCustomNV Source # | |
Defined in Vulkan.Extensions.VK_NV_shading_rate_image withCStruct :: CoarseSampleOrderCustomNV -> (Ptr CoarseSampleOrderCustomNV -> IO b) -> IO b Source # pokeCStruct :: Ptr CoarseSampleOrderCustomNV -> CoarseSampleOrderCustomNV -> IO b -> IO b Source # withZeroCStruct :: (Ptr CoarseSampleOrderCustomNV -> IO b) -> IO b Source # pokeZeroCStruct :: Ptr CoarseSampleOrderCustomNV -> IO b -> IO b Source # cStructSize :: Int Source # | |
Zero CoarseSampleOrderCustomNV Source # | |
data PipelineViewportCoarseSampleOrderStateCreateInfoNV Source #
VkPipelineViewportCoarseSampleOrderStateCreateInfoNV - Structure specifying parameters controlling sample order in coarse fragments
Description
If this structure is not present, sampleOrderType
is considered to be
COARSE_SAMPLE_ORDER_TYPE_DEFAULT_NV
.
If sampleOrderType
is COARSE_SAMPLE_ORDER_TYPE_CUSTOM_NV
, the
coverage sample order used for any combination of fragment area and
coverage sample count not enumerated in pCustomSampleOrders
will be
identical to that used for COARSE_SAMPLE_ORDER_TYPE_DEFAULT_NV
.
If the pipeline was created with
DYNAMIC_STATE_VIEWPORT_COARSE_SAMPLE_ORDER_NV
,
the contents of this structure (if present) are ignored, and the
coverage sample order is instead specified by
cmdSetCoarseSampleOrderNV
.
Valid Usage
-
If
sampleOrderType
is notCOARSE_SAMPLE_ORDER_TYPE_CUSTOM_NV
,customSamplerOrderCount
must be0
-
The array
pCustomSampleOrders
must not contain two structures with matching values for both theshadingRate
andsampleCount
members
Valid Usage (Implicit)
-
sampleOrderType
must be a validCoarseSampleOrderTypeNV
value -
If
customSampleOrderCount
is not0
,pCustomSampleOrders
must be a valid pointer to an array ofcustomSampleOrderCount
validCoarseSampleOrderCustomNV
structures
See Also
VK_NV_shading_rate_image,
CoarseSampleOrderCustomNV
, CoarseSampleOrderTypeNV
,
StructureType
PipelineViewportCoarseSampleOrderStateCreateInfoNV | |
|
Instances
newtype ShadingRatePaletteEntryNV Source #
VkShadingRatePaletteEntryNV - Shading rate image palette entry types
Description
The following table indicates the width and height (in pixels) of each
fragment generated using the indicated shading rate, as well as the
maximum number of fragment shader invocations launched for each
fragment. When processing regions of a primitive that have a shading
rate of SHADING_RATE_PALETTE_ENTRY_NO_INVOCATIONS_NV
, no fragments
will be generated in that region.
See Also
VK_NV_shading_rate_image,
CoarseSampleOrderCustomNV
, ShadingRatePaletteNV
Instances
newtype CoarseSampleOrderTypeNV Source #
VkCoarseSampleOrderTypeNV - Shading rate image sample ordering types
See Also
VK_NV_shading_rate_image,
PipelineViewportCoarseSampleOrderStateCreateInfoNV
,
cmdSetCoarseSampleOrderNV
pattern COARSE_SAMPLE_ORDER_TYPE_DEFAULT_NV :: CoarseSampleOrderTypeNV |
|
pattern COARSE_SAMPLE_ORDER_TYPE_CUSTOM_NV :: CoarseSampleOrderTypeNV |
|
pattern COARSE_SAMPLE_ORDER_TYPE_PIXEL_MAJOR_NV :: CoarseSampleOrderTypeNV |
|
pattern COARSE_SAMPLE_ORDER_TYPE_SAMPLE_MAJOR_NV :: CoarseSampleOrderTypeNV |
|
Instances
type NV_SHADING_RATE_IMAGE_SPEC_VERSION = 3 Source #
pattern NV_SHADING_RATE_IMAGE_SPEC_VERSION :: forall a. Integral a => a Source #
type NV_SHADING_RATE_IMAGE_EXTENSION_NAME = "VK_NV_shading_rate_image" Source #
pattern NV_SHADING_RATE_IMAGE_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a Source #