vulkan-3.13: Bindings to the Vulkan graphics API.
Safe HaskellNone
LanguageHaskell2010

Vulkan.Extensions.VK_HUAWEI_subpass_shading

Description

Name

VK_HUAWEI_subpass_shading - device extension

VK_HUAWEI_subpass_shading

Name String
VK_HUAWEI_subpass_shading
Extension Type
Device extension
Registered Extension Number
370
Revision
2
Extension and Version Dependencies
  • Requires Vulkan 1.0
  • Requires VK_KHR_create_renderpass2
  • Requires VK_KHR_synchronization2
Contact

Other Extension Metadata

Last Modified Date
2021-06-01
Interactions and External Dependencies
Contributors
  • Hueilong Wang

Description

This extension allows applications to execute a subpass shading pipeline in a subpass of a render pass in order to save memory bandwidth for algorithms like tile-based deferred rendering and forward plus. A subpass shading pipeline is a pipeline with the compute pipeline ability, allowed to read values from input attachments, and only allowed to be dispatched inside a stand-alone subpass. Its work dimension is defined by the render pass’s render area size. Its workgroup size (width, height) shall be a power-of-two number in width or height, with minimum value from 8, and maximum value shall be decided from the render pass attachments and sample counts but depends on implementation.

The GlobalInvocationId.xy of a subpass shading pipeline is equal to the FragCoord.xy of a graphic pipeline in the same render pass subtracted the offset of the RenderPassBeginInfo::renderArea. GlobalInvocationId.z is mapped to the Layer if VK_EXT_shader_viewport_index_layer is supported. The GlobalInvocationId.xy is equal to the index of the local workgroup multiplied by the size of the local workgroup plus the LocalInvocationId and the offset of the RenderPassBeginInfo::renderArea.

This extension allows a subpass’s pipeline bind point to be PIPELINE_BIND_POINT_SUBPASS_SHADING_HUAWEI.

New Commands

New Structures

New Enum Constants

Sample Code

Example of subpass shading in a GLSL shader

#extension GL_HUAWEI_subpass_shading: enable
#extension GL_KHR_shader_subgroup_arithmetic: enable

layout(constant_id = 0) const uint tileWidth = 16;
layout(constant_id = 1) const uint tileHeight = 16;
layout(local_size_x_id = 0, local_size_y_id = 1, local_size_z = 1) in;
layout (set=0, binding=0, input_attachment_index=0) uniform subpassInput depth;

void main()
{
  float d = subpassLoad(depth);
  float minD = subgroupMin(d);
  float maxD = subgroupMax(d);
}

Example of subpass shading dispatching in a subpass

vkCmdNextSubpass(commandBuffer, VK_SUBPASS_CONTENTS_INLINE);
vkCmdBindPipeline(commandBuffer, VK_PIPELINE_BIND_POINT_SUBPASS_SHADING_HUAWEI, subpassShadingPipeline);
vkCmdBindDescriptorSets(commandBuffer, VK_PIPELINE_BIND_POINT_SUBPASS_SHADING_HUAWEI, subpassShadingPipelineLayout,
  firstSet, descriptorSetCount, pDescriptorSets, dynamicOffsetCount, pDynamicOffsets);
vkCmdSubpassShadingHUAWEI(commandBuffer)
vkCmdEndRenderPass(commandBuffer);

Example of subpass shading render pass creation

VkAttachmentDescription2 attachments[] = {
  {
    VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_2, NULL,
    0, VK_FORMAT_R8G8B8A8_UNORM, VK_SAMPLE_COUNT_1_BIT,
    VK_ATTACHMENT_LOAD_OP_CLEAR, VK_ATTACHMENT_STORE_OP_DONT_CARE,
    VK_ATTACHMENT_LOAD_OP_DONT_CARE, VK_ATTACHMENT_LOAD_OP_DONT_CARE,
    VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL, VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL
  },
  {
    VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_2, NULL,
    0, VK_FORMAT_R8G8B8A8_UNORM, VK_SAMPLE_COUNT_1_BIT,
    VK_ATTACHMENT_LOAD_OP_CLEAR, VK_ATTACHMENT_STORE_OP_DONT_CARE,
    VK_ATTACHMENT_LOAD_OP_DONT_CARE, VK_ATTACHMENT_LOAD_OP_DONT_CARE,
    VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL, VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL
  },
  {
    VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_2, NULL,
    0, VK_FORMAT_R8G8B8A8_UNORM, VK_SAMPLE_COUNT_1_BIT,
    VK_ATTACHMENT_LOAD_OP_CLEAR, VK_ATTACHMENT_STORE_OP_DONT_CARE,
    VK_ATTACHMENT_LOAD_OP_DONT_CARE, VK_ATTACHMENT_LOAD_OP_DONT_CARE,
    VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL, VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL
  },
  {
    VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_2, NULL,
    0, VK_FORMAT_D24_UNORM_S8_UINT, VK_SAMPLE_COUNT_1_BIT,
    VK_ATTACHMENT_LOAD_OP_CLEAR, VK_ATTACHMENT_STORE_OP_DONT_CARE,
    VK_ATTACHMENT_LOAD_OP_CLEAR, VK_ATTACHMENT_LOAD_OP_DONT_CARE,
    VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL, VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL
  },
  {
    VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_2, NULL,
    0, VK_FORMAT_R8G8B8A8_UNORM, VK_SAMPLE_COUNT_1_BIT,
    VK_ATTACHMENT_LOAD_OP_CLEAR, VK_ATTACHMENT_STORE_OP_STORE,
    VK_ATTACHMENT_LOAD_OP_DONT_CARE, VK_ATTACHMENT_LOAD_OP_DONT_CARE,
    VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL, VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL
  }
};

VkAttachmentReference2 gBufferAttachmentReferences[] = {
  { VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_2, NULL, 0, VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL, VK_IMAGE_ASPECT_COLOR_BIT },
  { VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_2, NULL, 1, VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL, VK_IMAGE_ASPECT_COLOR_BIT },
  { VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_2, NULL, 2, VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL, VK_IMAGE_ASPECT_COLOR_BIT }
};
VkAttachmentReference2 gBufferDepthStencilAttachmentReferences =
  { VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_2, NULL, 3, VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL, VK_IMAGE_ASPECT_DEPTH_BIT|VK_IMAGE_ASPECT_STENCIL_BIT };
VkAttachmentReference2 depthInputAttachmentReferences[] = {
  { VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_2, NULL, 3, VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL, VK_IMAGE_ASPECT_DEPTH_BIT|VK_IMAGE_ASPECT_STENCIL_BIT };
};
VkAttachmentReference2 preserveAttachmentReferences[] = {
  { VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_2, NULL, 0, VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL, VK_IMAGE_ASPECT_COLOR_BIT },
  { VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_2, NULL, 1, VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL, VK_IMAGE_ASPECT_COLOR_BIT },
  { VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_2, NULL, 2, VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL, VK_IMAGE_ASPECT_COLOR_BIT },
  { VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_2, NULL, 3, VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL, VK_IMAGE_ASPECT_DEPTH_BIT|VK_IMAGE_ASPECT_STENCIL_BIT }
}; // G buffer including depth/stencil
VkAttachmentReference2 colorAttachmentReferences[] = {
  { VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_2, NULL, 4, VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL, VK_IMAGE_ASPECT_COLOR_BIT }
};
VkAttachmentReference2 resolveAttachmentReference =
  { VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_2, NULL, 4, VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL, VK_IMAGE_ASPECT_COLOR_BIT };

VkSubpassDescription2 subpasses[] = {
  {
    VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_2, NULL, 0, VK_PIPELINE_BIND_POINT_GRAPHICS, 0,
    0, NULL, // input
    sizeof(gBufferAttachmentReferences)/sizeof(gBufferAttachmentReferences[0]), gBufferAttachmentReferences, // color
    NULL, &gBufferDepthStencilAttachmentReferences, // resolve & DS
    0, NULL
  },
  {
    VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_2, NULL, 0, VK_PIPELINE_BIND_POINT_SUBPASS_SHADING_HUAWEI , 0,
    sizeof(depthInputAttachmentReferences)/sizeof(depthInputAttachmentReferences[0]), depthInputAttachmentReferences, // input
    0, NULL, // color
    NULL, NULL, // resolve & DS
    sizeof(preserveAttachmentReferences)/sizeof(preserveAttachmentReferences[0]), preserveAttachmentReferences,
  },
  {
    VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_2, NULL, 0, VK_PIPELINE_BIND_POINT_GRAPHICS, 0,
    sizeof(gBufferAttachmentReferences)/sizeof(gBufferAttachmentReferences[0]), gBufferAttachmentReferences, // input
    sizeof(colorAttachmentReferences)/sizeof(colorAttachmentReferences[0]), colorAttachmentReferences, // color
    &resolveAttachmentReference, &gBufferDepthStencilAttachmentReferences, // resolve & DS
    0, NULL
  },
};

VkMemoryBarrier2KHR fragmentToSubpassShading = {
  VK_STRUCTURE_TYPE_MEMORY_BARRIER_2_KHR, NULL,
  VK_PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT_KHR, VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT|VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT,
  VK_PIPELINE_STAGE_2_SUBPASS_SHADING_BIT_HUAWEI, VK_ACCESS_INPUT_ATTACHMENT_READ_BIT
};

VkMemoryBarrier2KHR subpassShadingToFragment = {
  VK_STRUCTURE_TYPE_MEMORY_BARRIER_2_KHR, NULL,
  VK_PIPELINE_STAGE_2_SUBPASS_SHADING_BIT_HUAWEI, VK_ACCESS_SHADER_WRITE_BIT,
  VK_PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT_KHR, VK_ACCESS_SHADER_READ_BIT
};

VkSubpassDependency2 dependencies[] = {
  {
    VK_STRUCTURE_TYPE_SUBPASS_DEPENDENCY_2, &fragmentToSubpassShading,
    0, 1,
    0, 0, 0, 0,
    0, 0
  },
  {
    VK_STRUCTURE_TYPE_SUBPASS_DEPENDENCY_2, &subpassShadingToFragment,
    1, 2,
    0, 0, 0, 0,
    0, 0
  },
};

VkRenderPassCreateInfo2 renderPassCreateInfo = {
  VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO_2, NULL, 0,
    sizeof(attachments)/sizeof(attachments[0]), attachments,
    sizeof(subpasses)/sizeof(subpasses[0]), subpasses,
    sizeof(dependencies)/sizeof(dependencies[0]), dependencies,
    0, NULL
};
VKRenderPass renderPass;
vkCreateRenderPass2(device, &renderPassCreateInfo, NULL, &renderPass);

Example of subpass shading pipeline creation

VkExtent2D maxWorkgroupSize;

VkSpecializationMapEntry subpassShadingConstantMapEntries[] = {
  { 0, 0 * sizeof(uint32_t), sizeof(uint32_t) },
  { 1, 1 * sizeof(uint32_t), sizeof(uint32_t) }
};

VkSpecializationInfo subpassShadingConstants = {
  2, subpassShadingConstantMapEntries,
  sizeof(VkExtent2D), &maxWorkgroupSize
};

VkSubpassShadingPipelineCreateInfoHUAWEI subpassShadingPipelineCreateInfo {
  VK_STRUCTURE_TYPE_SUBPASSS_SHADING_PIPELINE_CREATE_INFO_HUAWEI, NULL,
  renderPass, 1
};

VkPipelineShaderStageCreateInfo subpassShadingPipelineStageCreateInfo {
  VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO, NULL,
  0, VK_SHADER_STAGE_SUBPASS_SHADING_BIT_HUAWEI,
  shaderModule, "subpass shading example",
  &subpassShadingConstants
};

VkComputePipelineCreateInfo subpassShadingComputePipelineCreateInfo = {
  VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO, NULL,
  0, &subpassShadingPipelineCreateInfo,
  pipelineLayout, basePipelineHandle, basePipelineIndex
};

VKPipeline pipeline;

vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI(device, renderPass, &maxWorkgroupSize);
vkCreateComputePipelines(device, pipelineCache, 1, &subpassShadingComputePipelineCreateInfo, NULL, &pipeline);

Version History

  • Revision 2, 2021-06-28 (Hueilong Wang)

    • Change vkGetSubpassShadingMaxWorkgroupSizeHUAWEI to vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI to resolve issue pub1564
  • Revision 1, 2020-12-15 (Hueilong Wang)

    • Initial draft.

See Also

PhysicalDeviceSubpassShadingFeaturesHUAWEI, PhysicalDeviceSubpassShadingPropertiesHUAWEI, SubpassShadingPipelineCreateInfoHUAWEI, cmdSubpassShadingHUAWEI, getDeviceSubpassShadingMaxWorkgroupSizeHUAWEI

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

getDeviceSubpassShadingMaxWorkgroupSizeHUAWEI Source #

Arguments

:: forall io. MonadIO io 
=> Device

device is a handle to a local device object that was used to create the given render pass.

device must be a valid Device handle

-> RenderPass

renderpass must be a valid RenderPass handle

renderpass must have been created, allocated, or retrieved from device

-> io (Result, "maxWorkgroupSize" ::: Extent2D) 

vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI - Query maximum supported subpass shading workgroup size for a give render pass

Return Codes

Success
Failure

See Also

VK_HUAWEI_subpass_shading, Device, Extent2D, RenderPass

cmdSubpassShadingHUAWEI Source #

Arguments

:: forall io. MonadIO io 
=> CommandBuffer

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

-> io () 

vkCmdSubpassShadingHUAWEI - Dispatch compute work items

Description

When the command is executed, a global workgroup consisting of ceil (render area size / local workgroup size) local workgroups is assembled.

Valid Usage

  • If a Sampler created with mipmapMode equal to SAMPLER_MIPMAP_MODE_LINEAR and compareEnable equal to FALSE is used to sample a ImageView as a result of this command, then the image view’s format features must contain FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT
  • If a ImageView is accessed using atomic operations as a result of this command, then the image view’s format features must contain FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT
  • If a ImageView is sampled with FILTER_CUBIC_EXT as a result of this command, then the image view’s format features must contain FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT
  • Any ImageView being sampled with FILTER_CUBIC_EXT as a result of this command must have a ImageViewType and format that supports cubic filtering, as specified by FilterCubicImageViewImageFormatPropertiesEXT::filterCubic returned by getPhysicalDeviceImageFormatProperties2
  • Any ImageView being sampled with FILTER_CUBIC_EXT with a reduction mode of either SAMPLER_REDUCTION_MODE_MIN or SAMPLER_REDUCTION_MODE_MAX as a result of this command must have a ImageViewType and format that supports cubic filtering together with minmax filtering, as specified by FilterCubicImageViewImageFormatPropertiesEXT::filterCubicMinmax returned by getPhysicalDeviceImageFormatProperties2
  • Any Image created with a ImageCreateInfo::flags containing IMAGE_CREATE_CORNER_SAMPLED_BIT_NV sampled as a result of this command must only be sampled using a SamplerAddressMode of SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE
  • Any ImageView or BufferView being written as a storage image or storage texel buffer where the image format field of the OpTypeImage is Unknown must have image format features that support FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT_KHR
  • Any ImageView or BufferView being read as a storage image or storage texel buffer where the image format field of the OpTypeImage is Unknown must have image format features that support FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT_KHR
  • For each set n that is statically used by the Pipeline bound to the pipeline bind point used by this command, a descriptor set must have been bound to n at the same pipeline bind point, with a PipelineLayout that is compatible for set n, with the PipelineLayout used to create the current Pipeline, as described in ???
  • If the maintenance4 feature is not enabled, then for each push constant that is statically used by the Pipeline bound to the pipeline bind point used by this command, a push constant value must have been set for the same pipeline bind point, with a PipelineLayout that is compatible for push constants, with the PipelineLayout used to create the current Pipeline, as described in ???
  • Descriptors in each bound descriptor set, specified via cmdBindDescriptorSets, must be valid if they are statically used by the Pipeline bound to the pipeline bind point used by this command
  • A valid pipeline must be bound to the pipeline bind point used by this command
  • If the Pipeline object bound to the pipeline bind point used by this command requires any dynamic state, that state must have been set or inherited (if the VK_NV_inherited_viewport_scissor extension is enabled) for commandBuffer, and done so after any previously bound pipeline with the corresponding state not specified as dynamic
  • There must not have been any calls to dynamic state setting commands for any state not specified as dynamic in the Pipeline object bound to the pipeline bind point used by this command, since that pipeline was bound
  • If the Pipeline object bound to the pipeline bind point used by this command accesses a Sampler object that uses unnormalized coordinates, that sampler must not be used to sample from any Image with a ImageView of the type IMAGE_VIEW_TYPE_3D, IMAGE_VIEW_TYPE_CUBE, IMAGE_VIEW_TYPE_1D_ARRAY, IMAGE_VIEW_TYPE_2D_ARRAY or IMAGE_VIEW_TYPE_CUBE_ARRAY, in any shader stage
  • If the Pipeline object bound to the pipeline bind point used by this command accesses a Sampler object that uses unnormalized coordinates, that sampler must not be used with any of the SPIR-V OpImageSample* or OpImageSparseSample* instructions with ImplicitLod, Dref or Proj in their name, in any shader stage
  • If the Pipeline object bound to the pipeline bind point used by this command accesses a Sampler object that uses unnormalized coordinates, that sampler must not be used with any of the SPIR-V OpImageSample* or OpImageSparseSample* instructions that includes a LOD bias or any offset values, in any shader stage
  • If the robust buffer access feature is not enabled, and if the Pipeline object bound to the pipeline bind point used by this command accesses a uniform buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point
  • If the robust buffer access feature is not enabled, and if the Pipeline object bound to the pipeline bind point used by this command accesses a storage buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point
  • If commandBuffer is an unprotected command buffer, any resource accessed by the Pipeline object bound to the pipeline bind point used by this command must not be a protected resource
  • If a ImageView is accessed using OpImageWrite as a result of this command, then the Type of the Texel operand of that instruction must have at least as many components as the image view’s format
  • If a BufferView is accessed using OpImageWrite as a result of this command, then the Type of the Texel operand of that instruction must have at least as many components as the buffer view’s format
  • If a ImageView with a Format that has a 64-bit component width is accessed as a result of this command, the SampledType of the OpTypeImage operand of that instruction must have a Width of 64
  • If a ImageView with a Format that has a component width less than 64-bit is accessed as a result of this command, the SampledType of the OpTypeImage operand of that instruction must have a Width of 32
  • If a BufferView with a Format that has a 64-bit component width is accessed as a result of this command, the SampledType of the OpTypeImage operand of that instruction must have a Width of 64
  • If a BufferView with a Format that has a component width less than 64-bit is accessed as a result of this command, the SampledType of the OpTypeImage operand of that instruction must have a Width of 32
  • If the sparseImageInt64Atomics feature is not enabled, Image objects created with the IMAGE_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through an OpTypeImage with a SampledType with a Width of 64 by this command
  • If the sparseImageInt64Atomics feature is not enabled, Buffer objects created with the BUFFER_CREATE_SPARSE_RESIDENCY_BIT flag must not be accessed by atomic instructions through an OpTypeImage with a SampledType with a Width of 64 by this command
  • This command must be called in a subpass with bind point VK_PIPELINE_BIND_POINT_SUBPASS_SHADING_HUAWEI. No draw commands can be called in the same subpass. Only one vkCmdSubpassShadingHUAWEI command can be called in a subpass

Valid Usage (Implicit)

  • commandBuffer must be in the recording state
  • The CommandPool that commandBuffer was allocated from must support graphics operations
  • This command must only be called inside of a render pass instance

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 ScopeSupported Queue Types
Primary SecondaryInside Graphics

See Also

VK_HUAWEI_subpass_shading, CommandBuffer

data SubpassShadingPipelineCreateInfoHUAWEI Source #

VkSubpassShadingPipelineCreateInfoHUAWEI - Structure specifying parameters of a newly created subpass shading pipeline

Valid Usage (Implicit)

See Also

VK_HUAWEI_subpass_shading, RenderPass, StructureType

Constructors

SubpassShadingPipelineCreateInfoHUAWEI 

Fields

  • renderPass :: RenderPass

    renderPass is a handle to a render pass object describing the environment in which the pipeline will be used; the pipeline must only be used with an instance of any render pass compatible with the one provided. See Render Pass Compatibility for more information.

  • subpass :: Word32

    subpass is the index of the subpass in the render pass where this pipeline will be used.

    subpass must be created with VK_PIPELINE_BIND_POINT_SUBPASS_SHADING_HUAWEI bind point

Instances

Instances details
Eq SubpassShadingPipelineCreateInfoHUAWEI Source # 
Instance details

Defined in Vulkan.Extensions.VK_HUAWEI_subpass_shading

Show SubpassShadingPipelineCreateInfoHUAWEI Source # 
Instance details

Defined in Vulkan.Extensions.VK_HUAWEI_subpass_shading

Storable SubpassShadingPipelineCreateInfoHUAWEI Source # 
Instance details

Defined in Vulkan.Extensions.VK_HUAWEI_subpass_shading

FromCStruct SubpassShadingPipelineCreateInfoHUAWEI Source # 
Instance details

Defined in Vulkan.Extensions.VK_HUAWEI_subpass_shading

ToCStruct SubpassShadingPipelineCreateInfoHUAWEI Source # 
Instance details

Defined in Vulkan.Extensions.VK_HUAWEI_subpass_shading

Zero SubpassShadingPipelineCreateInfoHUAWEI Source # 
Instance details

Defined in Vulkan.Extensions.VK_HUAWEI_subpass_shading

data PhysicalDeviceSubpassShadingPropertiesHUAWEI Source #

VkPhysicalDeviceSubpassShadingPropertiesHUAWEI - Structure describing subpass shading properties supported by an implementation

Description

If the PhysicalDeviceSubpassShadingPropertiesHUAWEI structure is included in the pNext chain of the PhysicalDeviceProperties2 structure passed to getPhysicalDeviceProperties2, it is filled in with each corresponding implementation-dependent property.

Valid Usage (Implicit)

See Also

VK_HUAWEI_subpass_shading, StructureType

Constructors

PhysicalDeviceSubpassShadingPropertiesHUAWEI 

Fields

  • maxSubpassShadingWorkgroupSizeAspectRatio :: Word32

    maxSubpassShadingWorkgroupSizeAspectRatio indicates the maximum ratio between the width and height of the portion of the subpass shading shader workgroup size. maxSubpassShadingWorkgroupSizeAspectRatio must be a power-of-two value, and must be less than or equal to max(WorkgroupSize.x / WorkgroupSize.y, WorkgroupSize.y / WorkgroupSize.x).

Instances

Instances details
Eq PhysicalDeviceSubpassShadingPropertiesHUAWEI Source # 
Instance details

Defined in Vulkan.Extensions.VK_HUAWEI_subpass_shading

Show PhysicalDeviceSubpassShadingPropertiesHUAWEI Source # 
Instance details

Defined in Vulkan.Extensions.VK_HUAWEI_subpass_shading

Storable PhysicalDeviceSubpassShadingPropertiesHUAWEI Source # 
Instance details

Defined in Vulkan.Extensions.VK_HUAWEI_subpass_shading

FromCStruct PhysicalDeviceSubpassShadingPropertiesHUAWEI Source # 
Instance details

Defined in Vulkan.Extensions.VK_HUAWEI_subpass_shading

ToCStruct PhysicalDeviceSubpassShadingPropertiesHUAWEI Source # 
Instance details

Defined in Vulkan.Extensions.VK_HUAWEI_subpass_shading

Zero PhysicalDeviceSubpassShadingPropertiesHUAWEI Source # 
Instance details

Defined in Vulkan.Extensions.VK_HUAWEI_subpass_shading

data PhysicalDeviceSubpassShadingFeaturesHUAWEI Source #

VkPhysicalDeviceSubpassShadingFeaturesHUAWEI - Structure describing whether subpass shading is enabled

Members

If the PhysicalDeviceSubpassShadingFeaturesHUAWEI 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. PhysicalDeviceSubpassShadingFeaturesHUAWEI can also be used in the pNext chain of DeviceCreateInfo to selectively enable these features.

Valid Usage (Implicit)

See Also

VK_HUAWEI_subpass_shading, Bool32, StructureType

Instances

Instances details
Eq PhysicalDeviceSubpassShadingFeaturesHUAWEI Source # 
Instance details

Defined in Vulkan.Extensions.VK_HUAWEI_subpass_shading

Show PhysicalDeviceSubpassShadingFeaturesHUAWEI Source # 
Instance details

Defined in Vulkan.Extensions.VK_HUAWEI_subpass_shading

Storable PhysicalDeviceSubpassShadingFeaturesHUAWEI Source # 
Instance details

Defined in Vulkan.Extensions.VK_HUAWEI_subpass_shading

FromCStruct PhysicalDeviceSubpassShadingFeaturesHUAWEI Source # 
Instance details

Defined in Vulkan.Extensions.VK_HUAWEI_subpass_shading

ToCStruct PhysicalDeviceSubpassShadingFeaturesHUAWEI Source # 
Instance details

Defined in Vulkan.Extensions.VK_HUAWEI_subpass_shading

Zero PhysicalDeviceSubpassShadingFeaturesHUAWEI Source # 
Instance details

Defined in Vulkan.Extensions.VK_HUAWEI_subpass_shading

type HUAWEI_SUBPASS_SHADING_EXTENSION_NAME = "VK_HUAWEI_subpass_shading" Source #

pattern HUAWEI_SUBPASS_SHADING_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a Source #

newtype PipelineStageFlagBits2KHR Source #

VkPipelineStageFlagBits2KHR - Pipeline stage flags for VkPipelineStageFlags2KHR

Description

Note

The TOP and BOTTOM pipeline stages are deprecated, and applications should prefer PIPELINE_STAGE_2_ALL_COMMANDS_BIT_KHR and PIPELINE_STAGE_2_NONE_KHR.

Note

The PipelineStageFlags2KHR bitmask goes beyond the 31 individual bit flags allowable within a C99 enum, which is how PipelineStageFlagBits is defined. The first 31 values are common to both, and are interchangeable.

See Also

VK_KHR_synchronization2

Bundled Patterns

pattern PIPELINE_STAGE_2_NONE_KHR :: PipelineStageFlagBits2KHR

PIPELINE_STAGE_2_NONE_KHR specifies no stages of execution.

pattern PIPELINE_STAGE_2_TOP_OF_PIPE_BIT_KHR :: PipelineStageFlagBits2KHR

PIPELINE_STAGE_2_TOP_OF_PIPE_BIT_KHR is equivalent to PIPELINE_STAGE_2_ALL_COMMANDS_BIT_KHR with AccessFlags2KHR set to 0 when specified in the second synchronization scope, but equivalent to PIPELINE_STAGE_2_NONE_KHR in the first scope.

pattern PIPELINE_STAGE_2_DRAW_INDIRECT_BIT_KHR :: PipelineStageFlagBits2KHR

PIPELINE_STAGE_2_DRAW_INDIRECT_BIT_KHR specifies the stage of the pipeline where indirect command parameters are consumed. This stage also includes reading commands written by cmdPreprocessGeneratedCommandsNV.

pattern PIPELINE_STAGE_2_VERTEX_INPUT_BIT_KHR :: PipelineStageFlagBits2KHR

PIPELINE_STAGE_2_VERTEX_INPUT_BIT_KHR is equivalent to the logical OR of:

pattern PIPELINE_STAGE_2_VERTEX_SHADER_BIT_KHR :: PipelineStageFlagBits2KHR

PIPELINE_STAGE_2_VERTEX_SHADER_BIT_KHR specifies the vertex shader stage.

pattern PIPELINE_STAGE_2_TESSELLATION_CONTROL_SHADER_BIT_KHR :: PipelineStageFlagBits2KHR

PIPELINE_STAGE_2_TESSELLATION_CONTROL_SHADER_BIT_KHR specifies the tessellation control shader stage.

pattern PIPELINE_STAGE_2_TESSELLATION_EVALUATION_SHADER_BIT_KHR :: PipelineStageFlagBits2KHR

PIPELINE_STAGE_2_TESSELLATION_EVALUATION_SHADER_BIT_KHR specifies the tessellation evaluation shader stage.

pattern PIPELINE_STAGE_2_GEOMETRY_SHADER_BIT_KHR :: PipelineStageFlagBits2KHR

PIPELINE_STAGE_2_GEOMETRY_SHADER_BIT_KHR specifies the geometry shader stage.

pattern PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT_KHR :: PipelineStageFlagBits2KHR

PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT_KHR specifies the fragment shader stage.

pattern PIPELINE_STAGE_2_EARLY_FRAGMENT_TESTS_BIT_KHR :: PipelineStageFlagBits2KHR

PIPELINE_STAGE_2_EARLY_FRAGMENT_TESTS_BIT_KHR specifies the stage of the pipeline where early fragment tests (depth and stencil tests before fragment shading) are performed. This stage also includes subpass load operations for framebuffer attachments with a depth/stencil format.

pattern PIPELINE_STAGE_2_LATE_FRAGMENT_TESTS_BIT_KHR :: PipelineStageFlagBits2KHR

PIPELINE_STAGE_2_LATE_FRAGMENT_TESTS_BIT_KHR specifies the stage of the pipeline where late fragment tests (depth and stencil tests after fragment shading) are performed. This stage also includes subpass store operations for framebuffer attachments with a depth/stencil format.

pattern PIPELINE_STAGE_2_COLOR_ATTACHMENT_OUTPUT_BIT_KHR :: PipelineStageFlagBits2KHR

PIPELINE_STAGE_2_COLOR_ATTACHMENT_OUTPUT_BIT_KHR specifies the stage of the pipeline after blending where the final color values are output from the pipeline. This stage also includes subpass load and store operations and multisample resolve operations for framebuffer attachments with a color or depth/stencil format.

pattern PIPELINE_STAGE_2_COMPUTE_SHADER_BIT_KHR :: PipelineStageFlagBits2KHR

PIPELINE_STAGE_2_COMPUTE_SHADER_BIT_KHR specifies the compute shader stage.

pattern PIPELINE_STAGE_2_ALL_TRANSFER_BIT_KHR :: PipelineStageFlagBits2KHR

PIPELINE_STAGE_2_ALL_TRANSFER_BIT_KHR is equivalent to specifying all of:

pattern PIPELINE_STAGE_2_BOTTOM_OF_PIPE_BIT_KHR :: PipelineStageFlagBits2KHR

PIPELINE_STAGE_2_BOTTOM_OF_PIPE_BIT_KHR is equivalent to PIPELINE_STAGE_2_ALL_COMMANDS_BIT_KHR with AccessFlags2KHR set to 0 when specified in the first synchronization scope, but equivalent to PIPELINE_STAGE_2_NONE_KHR in the second scope.

pattern PIPELINE_STAGE_2_HOST_BIT_KHR :: PipelineStageFlagBits2KHR

PIPELINE_STAGE_2_HOST_BIT_KHR specifies a pseudo-stage indicating execution on the host of reads/writes of device memory. This stage is not invoked by any commands recorded in a command buffer.

pattern PIPELINE_STAGE_2_ALL_GRAPHICS_BIT_KHR :: PipelineStageFlagBits2KHR

PIPELINE_STAGE_2_ALL_GRAPHICS_BIT_KHR specifies the execution of all graphics pipeline stages, and is equivalent to the logical OR of:

pattern PIPELINE_STAGE_2_ALL_COMMANDS_BIT_KHR :: PipelineStageFlagBits2KHR

PIPELINE_STAGE_2_ALL_COMMANDS_BIT_KHR specifies all operations performed by all commands supported on the queue it is used with.

pattern PIPELINE_STAGE_2_COPY_BIT_KHR :: PipelineStageFlagBits2KHR

PIPELINE_STAGE_2_COPY_BIT_KHR specifies the execution of all copy commands, including cmdCopyQueryPoolResults.

pattern PIPELINE_STAGE_2_RESOLVE_BIT_KHR :: PipelineStageFlagBits2KHR

PIPELINE_STAGE_2_RESOLVE_BIT_KHR specifies the execution of cmdResolveImage.

pattern PIPELINE_STAGE_2_BLIT_BIT_KHR :: PipelineStageFlagBits2KHR

PIPELINE_STAGE_2_BLIT_BIT_KHR specifies the execution of cmdBlitImage.

pattern PIPELINE_STAGE_2_CLEAR_BIT_KHR :: PipelineStageFlagBits2KHR

PIPELINE_STAGE_2_CLEAR_BIT_KHR specifies the execution of clear commands, with the exception of cmdClearAttachments.

pattern PIPELINE_STAGE_2_INDEX_INPUT_BIT_KHR :: PipelineStageFlagBits2KHR

PIPELINE_STAGE_2_INDEX_INPUT_BIT_KHR specifies the stage of the pipeline where index buffers are consumed.

pattern PIPELINE_STAGE_2_VERTEX_ATTRIBUTE_INPUT_BIT_KHR :: PipelineStageFlagBits2KHR

PIPELINE_STAGE_2_VERTEX_ATTRIBUTE_INPUT_BIT_KHR specifies the stage of the pipeline where vertex buffers are consumed.

pattern PIPELINE_STAGE_2_PRE_RASTERIZATION_SHADERS_BIT_KHR :: PipelineStageFlagBits2KHR

PIPELINE_STAGE_2_PRE_RASTERIZATION_SHADERS_BIT_KHR is equivalent to specifying all supported pre-rasterization shader stages:

pattern PIPELINE_STAGE_2_INVOCATION_MASK_BIT_HUAWEI :: PipelineStageFlagBits2KHR

PIPELINE_STAGE_2_INVOCATION_MASK_BIT_HUAWEI specifies the stage of the pipeline where the invocation mask image is read by the implementation to optimize the ray dispatch.

pattern PIPELINE_STAGE_2_SUBPASS_SHADING_BIT_HUAWEI :: PipelineStageFlagBits2KHR

PIPELINE_STAGE_2_SUBPASS_SHADING_BIT_HUAWEI specifies the subpass shading shader stage.

pattern PIPELINE_STAGE_2_MESH_SHADER_BIT_NV :: PipelineStageFlagBits2KHR

PIPELINE_STAGE_2_MESH_SHADER_BIT_NV specifies the mesh shader stage.

pattern PIPELINE_STAGE_2_TASK_SHADER_BIT_NV :: PipelineStageFlagBits2KHR

PIPELINE_STAGE_2_TASK_SHADER_BIT_NV specifies the task shader stage.

pattern PIPELINE_STAGE_2_FRAGMENT_DENSITY_PROCESS_BIT_EXT :: PipelineStageFlagBits2KHR

PIPELINE_STAGE_2_FRAGMENT_DENSITY_PROCESS_BIT_EXT specifies the stage of the pipeline where the fragment density map is read to generate the fragment areas.

pattern PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_KHR :: PipelineStageFlagBits2KHR

PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_KHR specifies the execution of the ray tracing shader stages.

pattern PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR :: PipelineStageFlagBits2KHR

PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR specifies the execution of acceleration structure commands.

pattern PIPELINE_STAGE_2_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR :: PipelineStageFlagBits2KHR

PIPELINE_STAGE_2_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR specifies the stage of the pipeline where the fragment shading rate attachment or shading rate image is read to determine the fragment shading rate for portions of a rasterized primitive.

pattern PIPELINE_STAGE_2_COMMAND_PREPROCESS_BIT_NV :: PipelineStageFlagBits2KHR

PIPELINE_STAGE_2_COMMAND_PREPROCESS_BIT_NV specifies the stage of the pipeline where device-side generation of commands via cmdPreprocessGeneratedCommandsNV is handled.

pattern PIPELINE_STAGE_2_CONDITIONAL_RENDERING_BIT_EXT :: PipelineStageFlagBits2KHR

PIPELINE_STAGE_2_CONDITIONAL_RENDERING_BIT_EXT specifies the stage of the pipeline where the predicate of conditional rendering is consumed.

pattern PIPELINE_STAGE_2_TRANSFORM_FEEDBACK_BIT_EXT :: PipelineStageFlagBits2KHR

PIPELINE_STAGE_2_TRANSFORM_FEEDBACK_BIT_EXT specifies the stage of the pipeline where vertex attribute output values are written to the transform feedback buffers.

Instances

Instances details
Eq PipelineStageFlagBits2KHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_synchronization2

Ord PipelineStageFlagBits2KHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_synchronization2

Read PipelineStageFlagBits2KHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_synchronization2

Show PipelineStageFlagBits2KHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_synchronization2

Storable PipelineStageFlagBits2KHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_synchronization2

Bits PipelineStageFlagBits2KHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_synchronization2

Methods

(.&.) :: PipelineStageFlagBits2KHR -> PipelineStageFlagBits2KHR -> PipelineStageFlagBits2KHR #

(.|.) :: PipelineStageFlagBits2KHR -> PipelineStageFlagBits2KHR -> PipelineStageFlagBits2KHR #

xor :: PipelineStageFlagBits2KHR -> PipelineStageFlagBits2KHR -> PipelineStageFlagBits2KHR #

complement :: PipelineStageFlagBits2KHR -> PipelineStageFlagBits2KHR #

shift :: PipelineStageFlagBits2KHR -> Int -> PipelineStageFlagBits2KHR #

rotate :: PipelineStageFlagBits2KHR -> Int -> PipelineStageFlagBits2KHR #

zeroBits :: PipelineStageFlagBits2KHR #

bit :: Int -> PipelineStageFlagBits2KHR #

setBit :: PipelineStageFlagBits2KHR -> Int -> PipelineStageFlagBits2KHR #

clearBit :: PipelineStageFlagBits2KHR -> Int -> PipelineStageFlagBits2KHR #

complementBit :: PipelineStageFlagBits2KHR -> Int -> PipelineStageFlagBits2KHR #

testBit :: PipelineStageFlagBits2KHR -> Int -> Bool #

bitSizeMaybe :: PipelineStageFlagBits2KHR -> Maybe Int #

bitSize :: PipelineStageFlagBits2KHR -> Int #

isSigned :: PipelineStageFlagBits2KHR -> Bool #

shiftL :: PipelineStageFlagBits2KHR -> Int -> PipelineStageFlagBits2KHR #

unsafeShiftL :: PipelineStageFlagBits2KHR -> Int -> PipelineStageFlagBits2KHR #

shiftR :: PipelineStageFlagBits2KHR -> Int -> PipelineStageFlagBits2KHR #

unsafeShiftR :: PipelineStageFlagBits2KHR -> Int -> PipelineStageFlagBits2KHR #

rotateL :: PipelineStageFlagBits2KHR -> Int -> PipelineStageFlagBits2KHR #

rotateR :: PipelineStageFlagBits2KHR -> Int -> PipelineStageFlagBits2KHR #

popCount :: PipelineStageFlagBits2KHR -> Int #

FiniteBits PipelineStageFlagBits2KHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_synchronization2

Zero PipelineStageFlagBits2KHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_synchronization2