Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
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
- 3
- Ratification Status
- Not ratified
- Extension and Version Dependencies
- VK_KHR_create_renderpass2 and VK_KHR_synchronization2
- Contact
Other Extension Metadata
- Last Modified Date
- 2021-06-01
- Interactions and External Dependencies
- This extension requires SPV_HUAWEI_subpass_shading.
- This extension provides API support for GL_HUAWEI_subpass_shading.
- Contributors
- Hueilong Wang
- Juntao Li, Huawei
- Renmiao Lu, Huawei
- Pan Gao, Huawei
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
Extending
PhysicalDeviceFeatures2
,DeviceCreateInfo
:Extending
PhysicalDeviceProperties2
:
New Enum Constants
HUAWEI_SUBPASS_SHADING_SPEC_VERSION
Extending
PipelineBindPoint
:Extending
PipelineStageFlagBits2
:Extending
ShaderStageFlagBits
:Extending
StructureType
:
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 = 8; layout(constant_id = 1) const uint tileHeight = 8; 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).x; 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_SHADER_BIT_HUAWEI, VK_ACCESS_INPUT_ATTACHMENT_READ_BIT }; VkMemoryBarrier2KHR subpassShadingToFragment = { VK_STRUCTURE_TYPE_MEMORY_BARRIER_2_KHR, NULL, VK_PIPELINE_STAGE_2_SUBPASS_SHADER_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, "main", &subpassShadingConstants }; VkComputePipelineCreateInfo subpassShadingComputePipelineCreateInfo = { VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO, &subpassShadingPipelineCreateInfo, 0, &subpassShadingPipelineStageCreateInfo, pipelineLayout, basePipelineHandle, basePipelineIndex }; VKPipeline pipeline; vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI(device, renderPass, &maxWorkgroupSize); vkCreateComputePipelines(device, pipelineCache, 1, &subpassShadingComputePipelineCreateInfo, NULL, &pipeline);
Version History
Revision 3, 2023-06-19 (Pan Gao)
- Rename
PIPELINE_STAGE_2_SUBPASS_SHADING_BIT_HUAWEI
toPIPELINE_STAGE_2_SUBPASS_SHADER_BIT_HUAWEI
to better aligned with naming of other pipeline stages
- Rename
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
- getDeviceSubpassShadingMaxWorkgroupSizeHUAWEI :: forall io. MonadIO io => Device -> RenderPass -> io (Result, "maxWorkgroupSize" ::: Extent2D)
- cmdSubpassShadingHUAWEI :: forall io. MonadIO io => CommandBuffer -> io ()
- pattern PIPELINE_STAGE_2_SUBPASS_SHADING_BIT_HUAWEI :: PipelineStageFlagBits2
- data SubpassShadingPipelineCreateInfoHUAWEI = SubpassShadingPipelineCreateInfoHUAWEI {}
- data PhysicalDeviceSubpassShadingPropertiesHUAWEI = PhysicalDeviceSubpassShadingPropertiesHUAWEI {}
- data PhysicalDeviceSubpassShadingFeaturesHUAWEI = PhysicalDeviceSubpassShadingFeaturesHUAWEI {}
- type HUAWEI_SUBPASS_SHADING_SPEC_VERSION = 3
- pattern HUAWEI_SUBPASS_SHADING_SPEC_VERSION :: forall a. Integral a => a
- type HUAWEI_SUBPASS_SHADING_EXTENSION_NAME = "VK_HUAWEI_subpass_shading"
- pattern HUAWEI_SUBPASS_SHADING_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
Documentation
getDeviceSubpassShadingMaxWorkgroupSizeHUAWEI Source #
:: forall io. MonadIO io | |
=> Device |
|
-> RenderPass |
|
-> io (Result, "maxWorkgroupSize" ::: Extent2D) |
vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI - Query maximum supported subpass shading workgroup size for a give render pass
Return Codes
See Also
cmdSubpassShadingHUAWEI Source #
:: forall io. MonadIO io | |
=> CommandBuffer |
|
-> 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 withmagFilter
orminFilter
equal toFILTER_LINEAR
andcompareEnable
equal toFALSE
is used to sample aImageView
as a result of this command, then the image view’s format features must containFORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT
- If a
Sampler
created withmipmapMode
equal toSAMPLER_MIPMAP_MODE_LINEAR
andcompareEnable
equal toFALSE
is used to sample aImageView
as a result of this command, then the image view’s format features must containFORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT
- If a
ImageView
is sampled with depth comparison, the image view’s format features must containFORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT
- If a
ImageView
is accessed using atomic operations as a result of this command, then the image view’s format features must containFORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT
- If a
DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER
descriptor is accessed using atomic operations as a result of this command, then the storage texel buffer’s format features must containFORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT
- If a
ImageView
is sampled withFILTER_CUBIC_EXT
as a result of this command, then the image view’s format features must containFORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT
- If the
VK_EXT_filter_cubic
extension is not enabled and any
ImageView
is sampled withFILTER_CUBIC_EXT
as a result of this command, it must not have aImageViewType
ofIMAGE_VIEW_TYPE_3D
,IMAGE_VIEW_TYPE_CUBE
, orIMAGE_VIEW_TYPE_CUBE_ARRAY
- Any
ImageView
being sampled withFILTER_CUBIC_EXT
as a result of this command must have aImageViewType
and format that supports cubic filtering, as specified byFilterCubicImageViewImageFormatPropertiesEXT
::filterCubic
returned bygetPhysicalDeviceImageFormatProperties2
- Any
ImageView
being sampled withFILTER_CUBIC_EXT
with a reduction mode of eitherSAMPLER_REDUCTION_MODE_MIN
orSAMPLER_REDUCTION_MODE_MAX
as a result of this command must have aImageViewType
and format that supports cubic filtering together with minmax filtering, as specified byFilterCubicImageViewImageFormatPropertiesEXT
::filterCubicMinmax
returned bygetPhysicalDeviceImageFormatProperties2
- If the
cubicRangeClamp
feature is not enabled, then any
ImageView
being sampled withFILTER_CUBIC_EXT
as a result of this command must not have aSamplerReductionModeCreateInfo
::reductionMode
equal toSAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM
- Any
ImageView
being sampled with aSamplerReductionModeCreateInfo
::reductionMode
equal toSAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM
as a result of this command must sample withFILTER_CUBIC_EXT
- If the
selectableCubicWeights
feature is not enabled, then any
ImageView
being sampled withFILTER_CUBIC_EXT
as a result of this command must haveSamplerCubicWeightsCreateInfoQCOM
::cubicWeights
equal toCUBIC_FILTER_WEIGHTS_CATMULL_ROM_QCOM
- Any
Image
created with aImageCreateInfo
::flags
containingIMAGE_CREATE_CORNER_SAMPLED_BIT_NV
sampled as a result of this command must only be sampled using aSamplerAddressMode
ofSAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE
- For any
ImageView
being written as a storage image where the image format field of theOpTypeImage
isUnknown
, the view’s format features must containFORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT
- For any
ImageView
being read as a storage image where the image format field of theOpTypeImage
isUnknown
, the view’s format features must containFORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT
- For any
BufferView
being written as a storage texel buffer where the image format field of theOpTypeImage
isUnknown
, the view’s buffer features must containFORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT
- Any
BufferView
being read as a storage texel buffer where the image format field of theOpTypeImage
isUnknown
then the view’s buffer features must containFORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT
- For each set n that is
statically used by
a bound shader,
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 thePipelineLayout
orDescriptorSetLayout
array that was used to create the currentPipeline
orShaderEXT
, as described in ??? - For each push constant
that is statically used by
a bound shader,
a push constant value must have been set for the same pipeline
bind point, with a
PipelineLayout
that is compatible for push constants, with thePipelineLayout
orDescriptorSetLayout
andPushConstantRange
arrays used to create the currentPipeline
orShaderEXT
, as described in ??? - If the
maintenance4
feature is not enabled, then for each push constant that is
statically used by
a bound shader,
a push constant value must have been set for the same pipeline
bind point, with a
PipelineLayout
that is compatible for push constants, with thePipelineLayout
orDescriptorSetLayout
andPushConstantRange
arrays used to create the currentPipeline
orShaderEXT
, as described in ??? - Descriptors in each
bound descriptor set, specified via
cmdBindDescriptorSets
, must be valid if they are statically used by thePipeline
bound to the pipeline bind point used by this command and the boundPipeline
was not created withPIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT
- If the descriptors used
by the
Pipeline
bound to the pipeline bind point were specified viacmdBindDescriptorSets
, the boundPipeline
must have been created withoutPIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT
- Descriptors in bound
descriptor buffers, specified via
cmdSetDescriptorBufferOffsetsEXT
, must be valid if they are dynamically used by thePipeline
bound to the pipeline bind point used by this command and the boundPipeline
was created withPIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT
- Descriptors in bound
descriptor buffers, specified via
cmdSetDescriptorBufferOffsetsEXT
, must be valid if they are dynamically used by anyShaderEXT
bound to a stage corresponding to the pipeline bind point used by this command - If the descriptors used
by the
Pipeline
bound to the pipeline bind point were specified viacmdSetDescriptorBufferOffsetsEXT
, the boundPipeline
must have been created withPIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT
- If a descriptor is
dynamically used with a
Pipeline
created withPIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT
, the descriptor memory must be resident - If a descriptor is
dynamically used with a
ShaderEXT
created with aDescriptorSetLayout
that was created withDESCRIPTOR_SET_LAYOUT_CREATE_DESCRIPTOR_BUFFER_BIT_EXT
, the descriptor memory must be resident - If the shaderObject feature is not enabled, a valid pipeline must be bound to the pipeline bind point used by this command
- If the
shaderObject
is enabled, either a valid pipeline must be bound to the pipeline
bind point used by this command, or a valid combination of valid and
NULL_HANDLE
shader objects must be bound to every supported shader stage corresponding to the pipeline bind point used by this command - If a pipeline is bound
to the pipeline bind point used by this command, 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 or anyShaderEXT
bound to a stage corresponding to the pipeline bind point used by this command accesses aSampler
object that uses unnormalized coordinates, that sampler must not be used to sample from anyImage
with aImageView
of the typeIMAGE_VIEW_TYPE_3D
,IMAGE_VIEW_TYPE_CUBE
,IMAGE_VIEW_TYPE_1D_ARRAY
,IMAGE_VIEW_TYPE_2D_ARRAY
orIMAGE_VIEW_TYPE_CUBE_ARRAY
, in any shader stage - If the
Pipeline
object bound to the pipeline bind point used by this command or anyShaderEXT
bound to a stage corresponding to the pipeline bind point used by this command accesses aSampler
object that uses unnormalized coordinates, that sampler must not be used with any of the SPIR-VOpImageSample*
orOpImageSparseSample*
instructions withImplicitLod
,Dref
orProj
in their name, in any shader stage - If the
Pipeline
object bound to the pipeline bind point used by this command or anyShaderEXT
bound to a stage corresponding to the pipeline bind point used by this command accesses aSampler
object that uses unnormalized coordinates, that sampler must not be used with any of the SPIR-VOpImageSample*
orOpImageSparseSample*
instructions that includes a LOD bias or any offset values, in any shader stage - If any stage
of the
Pipeline
object bound to the pipeline bind point used by this command accesses a uniform buffer, and that stage was created without enabling eitherPIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_EXT
orPIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2_EXT
foruniformBuffers
, and the robustBufferAccess feature is not enabled, that stage 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
robustBufferAccess
feature is not enabled, and any
ShaderEXT
bound to a stage corresponding 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 any stage
of the
Pipeline
object bound to the pipeline bind point used by this command accesses a storage buffer, and that stage was created without enabling eitherPIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_EXT
orPIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2_EXT
forstorageBuffers
, and the robustBufferAccess feature is not enabled, that stage 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
robustBufferAccess
feature is not enabled, and any
ShaderEXT
bound to a stage corresponding 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 and protectedNoFault is not supported, any resource accessed by bound shaders must not be a protected resource - If
a bound shader
accesses a
Sampler
orImageView
object that enables sampler Y′CBCR conversion, that object must only be used withOpImageSample*
orOpImageSparseSample*
instructions - If
a bound shader
accesses a
Sampler
orImageView
object that enables sampler Y′CBCR conversion, that object must not use theConstOffset
andOffset
operands - If a
ImageView
is accessed as a result of this command, then the image view’sviewType
must match theDim
operand of theOpTypeImage
as described in ??? - If a
ImageView
is accessed as a result of this command, then the numeric type of the image view’sformat
and theSampled
Type
operand of theOpTypeImage
must match - If a
ImageView
created with a format other thanFORMAT_A8_UNORM_KHR
is accessed usingOpImageWrite
as a result of this command, then theType
of theTexel
operand of that instruction must have at least as many components as the image view’s format - If a
ImageView
created with the formatFORMAT_A8_UNORM_KHR
is accessed usingOpImageWrite
as a result of this command, then theType
of theTexel
operand of that instruction must have four components - If a
BufferView
is accessed usingOpImageWrite
as a result of this command, then theType
of theTexel
operand of that instruction must have at least as many components as the buffer view’s format - If a
ImageView
with aFormat
that has a 64-bit component width is accessed as a result of this command, theSampledType
of theOpTypeImage
operand of that instruction must have aWidth
of 64 - If a
ImageView
with aFormat
that has a component width less than 64-bit is accessed as a result of this command, theSampledType
of theOpTypeImage
operand of that instruction must have aWidth
of 32 - If a
BufferView
with aFormat
that has a 64-bit component width is accessed as a result of this command, theSampledType
of theOpTypeImage
operand of that instruction must have aWidth
of 64 - If a
BufferView
with aFormat
that has a component width less than 64-bit is accessed as a result of this command, theSampledType
of theOpTypeImage
operand of that instruction must have aWidth
of 32 - If
the
sparseImageInt64Atomics
feature is not enabled,
Image
objects created with theIMAGE_CREATE_SPARSE_RESIDENCY_BIT
flag must not be accessed by atomic instructions through anOpTypeImage
with aSampledType
with aWidth
of 64 by this command - If
the
sparseImageInt64Atomics
feature is not enabled,
Buffer
objects created with theBUFFER_CREATE_SPARSE_RESIDENCY_BIT
flag must not be accessed by atomic instructions through anOpTypeImage
with aSampledType
with aWidth
of 64 by this command - If
OpImageWeightedSampleQCOM
is used to sample aImageView
as a result of this command, then the image view’s format features must containFORMAT_FEATURE_2_WEIGHT_SAMPLED_IMAGE_BIT_QCOM
- If
OpImageWeightedSampleQCOM
uses aImageView
as a sample weight image as a result of this command, then the image view’s format features must containFORMAT_FEATURE_2_WEIGHT_IMAGE_BIT_QCOM
- If
OpImageBoxFilterQCOM
is used to sample aImageView
as a result of this command, then the image view’s format features must containFORMAT_FEATURE_2_BOX_FILTER_SAMPLED_BIT_QCOM
- If
OpImageBlockMatchSSDQCOM
is used to read from anImageView
as a result of this command, then the image view’s format features must containFORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM
- If
OpImageBlockMatchSADQCOM
is used to read from anImageView
as a result of this command, then the image view’s format features must containFORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM
- If
OpImageBlockMatchSADQCOM
or OpImageBlockMatchSSDQCOM is used to read from a reference image as result of this command, then the specified reference coordinates must not fail integer texel coordinate validation - If
OpImageWeightedSampleQCOM
,OpImageBoxFilterQCOM
,OpImageBlockMatchWindowSSDQCOM
,OpImageBlockMatchWindowSADQCOM
,OpImageBlockMatchGatherSSDQCOM
,OpImageBlockMatchGatherSADQCOM
,OpImageBlockMatchSSDQCOM
, orOpImageBlockMatchSADQCOM
uses aSampler
as a result of this command, then the sampler must have been created withSAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM
- If
any command other than
OpImageWeightedSampleQCOM
,OpImageBoxFilterQCOM
,OpImageBlockMatchWindowSSDQCOM
,OpImageBlockMatchWindowSADQCOM
,OpImageBlockMatchGatherSSDQCOM
,OpImageBlockMatchGatherSADQCOM
,OpImageBlockMatchSSDQCOM
, orOpImageBlockMatchSADQCOM
uses aSampler
as a result of this command, then the sampler must not have been created withSAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM
- If a
OpImageBlockMatchWindow*QCOM
orOpImageBlockMatchGather*QCOM
instruction is used to read from anImageView
as a result of this command, then the image view’s format features must containFORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM
- If a
OpImageBlockMatchWindow*QCOM
orOpImageBlockMatchGather*QCOM
instruction is used to read from anImageView
as a result of this command, then the image view’s format must be a single-component format. - If a
OpImageBlockMatchWindow*QCOM
orOpImageBlockMatchGather*QCOM
read from a reference image as result of this command, then the specified reference coordinates must not fail integer texel coordinate validation - Any shader invocation executed by this command must terminate
- This command must be
called in a subpass with bind point
PIPELINE_BIND_POINT_SUBPASS_SHADING_HUAWEI
. No draw commands can be called in the same subpass. Only onecmdSubpassShadingHUAWEI
command can be called in a subpass
Valid Usage (Implicit)
-
commandBuffer
must be a validCommandBuffer
handle
-
commandBuffer
must be in the recording state - The
CommandPool
thatcommandBuffer
was allocated from must support graphics operations - This command must only be called inside of a render pass instance
- 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 | Inside | Outside | Graphics | Action |
See Also
data SubpassShadingPipelineCreateInfoHUAWEI Source #
VkSubpassShadingPipelineCreateInfoHUAWEI - Structure specifying parameters of a newly created subpass shading pipeline
Valid Usage (Implicit)
See Also
SubpassShadingPipelineCreateInfoHUAWEI | |
|
Instances
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
PhysicalDeviceSubpassShadingPropertiesHUAWEI | |
|
Instances
data PhysicalDeviceSubpassShadingFeaturesHUAWEI Source #
VkPhysicalDeviceSubpassShadingFeaturesHUAWEI - Structure describing whether subpass shading is enabled
Members
This structure describes the following feature:
Description
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
Instances
type HUAWEI_SUBPASS_SHADING_SPEC_VERSION = 3 Source #
pattern HUAWEI_SUBPASS_SHADING_SPEC_VERSION :: forall a. Integral a => a Source #
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 #