C Specification

The VkPhysicalDeviceSubgroupProperties structure is defined as:

// Provided by VK_VERSION_1_1
typedef struct VkPhysicalDeviceSubgroupProperties {
    VkStructureType           sType;
    void*                     pNext;
    uint32_t                  subgroupSize;
    VkShaderStageFlags        supportedStages;
    VkSubgroupFeatureFlags    supportedOperations;
    VkBool32                  quadOperationsInAllStages;
} VkPhysicalDeviceSubgroupProperties;

Members

  • sType is a VkStructureType value identifying this structure.

  • pNext is NULL or a pointer to a structure extending this structure.

Description

  • subgroupSize is the default number of invocations in each subgroup. subgroupSize is at least 1 if any of the physical device’s queues support VK_QUEUE_GRAPHICS_BIT or VK_QUEUE_COMPUTE_BIT. subgroupSize is a power-of-two.

  • supportedStages is a bitfield of VkShaderStageFlagBits describing the shader stages that group operations with subgroup scope are supported in. supportedStages will have the VK_SHADER_STAGE_COMPUTE_BIT bit set if any of the physical device’s queues support VK_QUEUE_COMPUTE_BIT.

  • supportedOperations is a bitmask of VkSubgroupFeatureFlagBits specifying the sets of group operations with subgroup scope supported on this device. supportedOperations will have the VK_SUBGROUP_FEATURE_BASIC_BIT bit set if any of the physical device’s queues support VK_QUEUE_GRAPHICS_BIT or VK_QUEUE_COMPUTE_BIT.

  • quadOperationsInAllStages is a boolean specifying whether quad group operations are available in all stages, or are restricted to fragment and compute stages.

If the VkPhysicalDeviceSubgroupProperties structure is included in the pNext chain of the VkPhysicalDeviceProperties2 structure passed to vkGetPhysicalDeviceProperties2, it is filled in with each corresponding implementation-dependent property.

If supportedOperations includes VK_SUBGROUP_FEATURE_QUAD_BIT, or shaderSubgroupUniformControlFlow is enabled, subgroupSize must be greater than or equal to 4.

If the shaderQuadControl feature is supported, supportedOperations must include VK_SUBGROUP_FEATURE_QUAD_BIT.

If VK_KHR_shader_subgroup_rotate is supported, and the implementation advertises support with a VkExtensionProperties::specVersion greater than or equal to 2, and shaderSubgroupRotate is supported, VK_SUBGROUP_FEATURE_ROTATE_BIT_KHR must be returned in subgroupSupportedOperations. If VK_KHR_shader_subgroup_rotate is supported, and the implementation advertises support with a VkExtensionProperties::specVersion greater than or equal to 2, and shaderSubgroupRotateClustered is supported, VK_SUBGROUP_FEATURE_ROTATE_CLUSTERED_BIT_KHR must be returned in subgroupSupportedOperations.

Note

VK_SUBGROUP_FEATURE_ROTATE_BIT_KHR and VK_SUBGROUP_FEATURE_ROTATE_CLUSTERED_BIT_KHR were added in version 2 of the VK_KHR_shader_subgroup_rotate extension, after the initial release, so there are implementations that do not advertise these bits. Applications should use the shaderSubgroupRotate and shaderSubgroupRotateClustered features to determine and enable support. These bits are advertised here for consistency and for future dependencies.

Valid Usage (Implicit)
  • VUID-VkPhysicalDeviceSubgroupProperties-sType-sType
    sType must be VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_PROPERTIES

See Also

Document Notes

For more information, see the Vulkan Specification

This page is extracted from the Vulkan Specification. Fixes and changes should be made to the Specification, not directly.

Copyright 2014-2024 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0