Name Strings

SPV_EXT_shader_subgroup_partitioned

Contact

To report problems with this extension, please open a new issue at:

Contributors

  • Jeff Bolz, NVIDIA

Status

  • Approved by the SPIR-V Working Group: 2025-12-03

  • Approved by the Khronos Board of Promoters: 2025-01-16

Version

Last Modified Date

2025-11-19

Revision

1

Dependencies

This extension is written against the SPIR-V Specification, Version 1.6 Revision 6.

This extension requires SPIR-V 1.3.

This extension provides SPIR-V support for the GL_NV_shader_subgroup_partitioned GLSL extension.

Overview

This extension adds new subgroup functionality to support the Vulkan GL_NV_shader_subgroup_partitioned GLSL extension.

OpGroupNonUniformPartitionEXT is a new instruction that computes a partition (a ballot value indicating which other invocations in the subgroup have the same value of the operand).

PartitionedReduceEXT, PartitionedInclusiveScanEXT, and PartitionedExclusiveScanEXT are new GroupOperation enum values that select the partitioned reduce/scan functionality.

GroupNonUniformPartitionedEXT is a capability that indicates a module uses these new features.

Extension Name

To use this extension within a SPIR-V module, at least one of the following OpExtension strings must must be present in the module:

OpExtension "SPV_EXT_shader_subgroup_partitioned"
OpExtension "SPV_NV_shader_subgroup_partitioned"

New Capabilities

This extension introduces the following new capabilities:

GroupNonUniformPartitionedEXT

New Decorations

None

New Builtins

None.

New Instructions

OpGroupNonUniformPartitionEXT

Token Number Assignments

Name Value Usage

GroupNonUniformPartitionedEXT

5297

Capability

OpGroupNonUniformPartitionEXT

5296

Opcode

PartitionedReduceEXT

6

GroupOperation

PartitionedInclusiveScanEXT

7

GroupOperation

PartitionedExclusiveScanEXT

8

GroupOperation

Modifications to the SPIR-V Specification, Version 1.3

(Add to the table in 3.28, Group Operation):

6

PartitionedReduceEXT
A reduction operation performed across the invocations in a subset of a partition value, with a unique value computed for each subset.

GroupNonUniformPartitionedEXT

7

PartitionedInclusiveScanEXT
An inclusive scan operation performed across the invocations in a subset of a partition value, with a unique value computed for each subset.

GroupNonUniformPartitionedEXT

8

PartitionedExclusiveScanEXT
An exclusive scan operation performed across the invocations in a subset of a partition value, with a unique value computed for each subset.

GroupNonUniformPartitionedEXT

Add: "The ballot parameter to the partitioned operations must form a valid partition of the active invocations in the subgroup. The values of ballot are a valid partition if:

  • for each active invocation i, the bit corresponding to i is set in i's value of ballot, and

  • for any two active invocations i and j, if the bit corresponding to invocation j is set in invocation i's value of ballot, then invocation j's value of ballot must equal invocation i's value of ballot, and

  • bits not corresponding to any invocation in the subgroup are ignored.

If two active invocations i and j have the same value of ballot, they are said to be "in the same subset of the partition"."

(Modify Section 3.3.24, Non-Uniform Instructions, adding to the end of the list of instructions)

OpGroupNonUniformPartitionEXT

Computes a ballot result that is a valid partition of the tangled invocations within the subgroup scope such that all tangled invocations in each subset of the partition have the same value of value. For any two invocations in different subsets of the partition, either their values of value must not be equal or one must be a floating point NaN.

Value must be a scalar or vector type.

Result Type must be a 4 component vector of 32 bit integer types.

Result is a set of bitfields where the first invocation is represented in bit 0 of the first vector component and the last (up to SubgroupSize) is the higher bit number of the last bitmask needed to represent all bits of the subgroup invocations.

Capability:
GroupNonUniformPartitionedEXT

4

5296

<id> Result Type

<id> Result

<id> Value

(Modify Section 3.3.24, Non-Uniform Instructions, modify each GroupNonUniformArithmetic instruction)

Add an optional operand "Optional <id> ballot".

Add "If Operation is PartitionedReduceEXT, PartitionedInclusiveScanEXT, or PartitionedExclusiveScanEXT, ballot must be specified. ballot specifies the partition of invocations to use when computing a partitioned operation. ballot must be a 4 component vector of 32 bit integer types."

Add GroupNonUniformPartitionedEXT to the capability list.

(Modify Section 3.2.30, Capability, adding new rows to the Capability table)
Capability Implicitly Declares Enabled by Extension

5301

GroupNonUniformPartitionedEXT
Uses partitioned subgroup operations.

Shader

SPV_EXT_shader_subgroup_partitioned

Validation Rules

An OpExtension must be added to the SPIR-V for validation layers to check legal use of this extension:

OpExtension "SPV_EXT_shader_subgroup_partitioned"
OpExtension "SPV_NV_shader_subgroup_partitioned"

Either OpExtension string is accepted, it’s not necessary to include both.

The Partitioned Group Operations can only be used with the OpGroupNonUniformIAdd, OpGroupNonUniformFAdd, OpGroupNonUniformIMul, OpGroupNonUniformFMul, OpGroupNonUniformFMin, OpGroupNonUniformSMin, OpGroupNonUniformUMin, OpGroupNonUniformFMax, OpGroupNonUniformSMax, OpGroupNonUniformUMax, OpGroupNonUniformBitwiseAnd, OpGroupNonUniformBitwiseOr, OpGroupNonUniformBitwiseXor, OpGroupNonUniformLogicalAnd, OpGroupNonUniformLogicalOr, and OpGroupNonUniformLogicalXor instructions.

Issues

(1) Why are there two OpExtension strings?

RESOLVED: This extension is otherwise identical to SPV_NV_shader_subgroup_partitioned, and there is an existing GLSL extension and Vulkan conformance tests using it that all generate SPIR-V modules with the "NV" string. It’s desirable to continue to accept those shaders unchanged.

Revision History

Rev Date Author Changes

1

2025-11-12

Jeff Bolz

Initial draft