vulkan
Safe HaskellNone
LanguageHaskell2010

Vulkan.Extensions.VK_HUAWEI_invocation_mask

Description

Name

VK_HUAWEI_invocation_mask - device extension

VK_HUAWEI_invocation_mask

Name String
VK_HUAWEI_invocation_mask
Extension Type
Device extension
Registered Extension Number
371
Revision
1
Ratification Status
Not ratified
Extension and Version Dependencies
VK_KHR_ray_tracing_pipeline and

VK_KHR_synchronization2      or

Vulkan Version 1.3

Contact
Extension Proposal
VK_HUAWEI_invocation_mask

Other Extension Metadata

Last Modified Date
2021-05-27
Interactions and External Dependencies
  • This extension requires VK_KHR_ray_tracing_pipeline, which allow to bind an invocation mask image before the ray tracing command
  • This extension requires VK_KHR_synchronization2, which allows new pipeline stage for the invocation mask image
Contributors
  • Yunpeng Zhu
  • Juntao Li, Huawei
  • Liang Chen, Huawei
  • Shaozhuang Shi, Huawei
  • Hailong Chu, Huawei

Description

The rays to trace may be sparse in some use cases. For example, the scene only have a few regions to reflect. Providing an invocation mask image to the ray tracing commands could potentially give the hardware the hint to do certain optimization without invoking an additional pass to compact the ray buffer.

New Commands

New Structures

New Enum Constants

Examples

RT mask is updated before each traceRay.

Step 1. Generate InvocationMask.

//the rt mask image bind as color attachment in the fragment shader
Layout(location = 2) out vec4 outRTmask
vec4 mask = vec4(x,x,x,x);
outRTmask = mask;

Step 2. traceRay with InvocationMask

vkCmdBindPipeline(
    commandBuffers[imageIndex],
    VK_PIPELINE_BIND_POINT_RAY_TRACING_KHR, m_rtPipeline);
    vkCmdBindDescriptorSets(commandBuffers[imageIndex],
    VK_PIPELINE_BIND_POINT_RAY_TRACING_NV,
    m_rtPipelineLayout, 0, 1, &m_rtDescriptorSet,
    0, nullptr);

vkCmdBindInvocationMaskHUAWEI(
    commandBuffers[imageIndex],
    InvocationMaskimageView,
    InvocationMaskimageLayout);
    vkCmdTraceRaysKHR(commandBuffers[imageIndex],
    pRaygenShaderBindingTable,
    pMissShaderBindingTable,
    swapChainExtent.width,
    swapChainExtent.height, 1);

Version History

  • Revision 1, 2021-05-27 (Yunpeng Zhu)

    • Initial draft.

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.

Synopsis

Documentation

cmdBindInvocationMaskHUAWEI Source #

Arguments

:: MonadIO io 
=> CommandBuffer

commandBuffer is the command buffer into which the command will be recorded

-> ImageView

imageView is an image view handle specifying the invocation mask image imageView may be NULL_HANDLE, which is equivalent to specifying a view of an image filled with ones value.

-> ImageLayout

imageLayout is the layout that the image subresources accessible from imageView will be in when the invocation mask image is accessed

-> io () 

vkCmdBindInvocationMaskHUAWEI - Bind an invocation mask image on a command buffer

Valid Usage

Valid Usage (Implicit)

  • If imageView is not NULL_HANDLE, imageView must be a valid ImageView handle
  • imageLayout must be a valid ImageLayout value
  • commandBuffer must be in the recording state
  • The CommandPool that commandBuffer was allocated from must support QUEUE_COMPUTE_BIT operations
  • This command must only be called outside of a render pass instance
  • This command must only be called outside of a video coding scope
  • Both of commandBuffer, and imageView that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the same Device

Host Synchronization

  • Host access to commandBuffer must be externally synchronized
  • Host access to the CommandPool that commandBuffer was allocated from must be externally synchronized

Command Properties

'

Command Buffer LevelsRender Pass ScopeVideo Coding ScopeSupported Queue TypesCommand Type
Primary SecondaryOutside Outside VK_QUEUE_COMPUTE_BIT State

Conditional Rendering

vkCmdBindInvocationMaskHUAWEI is not affected by conditional rendering

See Also

VK_HUAWEI_invocation_mask, CommandBuffer, ImageLayout, ImageView

data PhysicalDeviceInvocationMaskFeaturesHUAWEI Source #

VkPhysicalDeviceInvocationMaskFeaturesHUAWEI - Structure describing invocation mask features that can be supported by an implementation

Members

This structure describes the following feature:

Description

If the PhysicalDeviceInvocationMaskFeaturesHUAWEI 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. If the application wishes to use a Device with any features described by PhysicalDeviceInvocationMaskFeaturesHUAWEI, it must add an instance of the structure, with the desired feature members set to TRUE, to the pNext chain of DeviceCreateInfo when creating the Device.

Valid Usage (Implicit)

See Also

VK_HUAWEI_invocation_mask, Bool32, StructureType

Constructors

PhysicalDeviceInvocationMaskFeaturesHUAWEI 

Fields

  • invocationMask :: Bool

    invocationMask indicates that the implementation supports the use of an invocation mask image to optimize the ray dispatch.

Instances

Instances details
Eq PhysicalDeviceInvocationMaskFeaturesHUAWEI Source # 
Instance details

Defined in Vulkan.Extensions.VK_HUAWEI_invocation_mask

Storable PhysicalDeviceInvocationMaskFeaturesHUAWEI Source # 
Instance details

Defined in Vulkan.Extensions.VK_HUAWEI_invocation_mask

Show PhysicalDeviceInvocationMaskFeaturesHUAWEI Source # 
Instance details

Defined in Vulkan.Extensions.VK_HUAWEI_invocation_mask

FromCStruct PhysicalDeviceInvocationMaskFeaturesHUAWEI Source # 
Instance details

Defined in Vulkan.Extensions.VK_HUAWEI_invocation_mask

ToCStruct PhysicalDeviceInvocationMaskFeaturesHUAWEI Source # 
Instance details

Defined in Vulkan.Extensions.VK_HUAWEI_invocation_mask

Zero PhysicalDeviceInvocationMaskFeaturesHUAWEI Source # 
Instance details

Defined in Vulkan.Extensions.VK_HUAWEI_invocation_mask

type HUAWEI_INVOCATION_MASK_EXTENSION_NAME = "VK_HUAWEI_invocation_mask" Source #