Registered Extension Number

333

Revision

1

Ratification Status

Not ratified

Extension and Version Dependencies

Contact

Other Extension Metadata

Last Modified Date

2020-06-16

Interactions and External Dependencies
  • Interacts with Vulkan 1.1

Contributors
  • Matthew Netsch, Qualcomm Technologies, Inc.

  • Jonathan Tinkham, Qualcomm Technologies, Inc.

  • Jonathan Wicks, Qualcomm Technologies, Inc.

  • Jan-Harald Fredriksen, ARM

Description

This extension adds additional features and properties to VK_EXT_fragment_density_map in order to reduce fragment density map host latency as well as improved queries for subsampled sampler implementation-dependent behavior.

New Structures

New Enum Constants

  • VK_EXT_FRAGMENT_DENSITY_MAP_2_EXTENSION_NAME

  • VK_EXT_FRAGMENT_DENSITY_MAP_2_SPEC_VERSION

  • Extending VkImageViewCreateFlagBits:

    • VK_IMAGE_VIEW_CREATE_FRAGMENT_DENSITY_MAP_DEFERRED_BIT_EXT

  • Extending VkStructureType:

    • VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_2_FEATURES_EXT

    • VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_2_PROPERTIES_EXT

Examples

Additional Limits for Subsampling

Some implementations may not support subsampled samplers if certain implementation limits are not observed by the app. VkPhysicalDeviceFragmentDensityMap2PropertiesEXT provides additional limits to require apps remain within these boundaries if they wish to use subsampling.

Improved Host Latency

By default, the fragment density map is locked by the host for reading between vkCmdBeginRenderPass during recording and VK_PIPELINE_STAGE_FRAGMENT_DENSITY_PROCESS_BIT_EXT during draw execution.

This can introduce large latency for certain use cases between recording the frame and displaying the frame. Apps may wish to modify the fragment density map just before draw execution.

VK_IMAGE_VIEW_CREATE_FRAGMENT_DENSITY_MAP_DEFERRED_BIT_EXT is intended to help address this for implementations that do not support the fragmentDensityMapDynamic feature by deferring the start of the locked range to vkEndCommandBuffer.

// Create view for fragment density map
VkImageViewCreateInfo createInfo =
{
   .sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO,
   // ...
   .viewType = VK_IMAGE_VIEW_CREATE_FRAGMENT_DENSITY_MAP_DEFERRED_BIT_EXT,
   .format = fdmImage, // Created with VK_IMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT
   // ...
};

// ...

// Begin fragment density map render pass with deferred view.
// By default, fdmImage must not be modified after this call
// unless view is created with the FDM dynamic or deferred flags.
vkCmdBeginRenderPass(commandBuffer, pRenderPassBegin, contents);

// ...

vkCmdEndRenderPass(VkCommandBuffer commandBuffer);

// Can keep making modifications to deferred fragment density maps
// while recording commandBuffer ...

result = vkEndCommandBuffer(commandBuffer);

// Must now freeze modifying fdmImage until after the
// VK_PIPELINE_STAGE_FRAGMENT_DENSITY_PROCESS_BIT_EXT of
// the last executing draw that uses the fdmImage in the
// last submit of commandBuffer.

Version History

  • Revision 1, 2020-06-16 (Matthew Netsch)

    • Initial version

See Also

No cross-references are available

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.

Copyright 2014-2024 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0