spirv_std::arch

Function subgroup_ballot

Source
pub unsafe fn subgroup_ballot(predicate: bool) -> SubgroupMask
Expand description

Result is a bitfield value combining the Predicate value from all invocations in the group that execute the same dynamic instance of this instruction. The bit is set to one if the corresponding invocation is active and the Predicate for that invocation evaluated to true; otherwise, it is set to zero.

Result Type must be a vector of four components of integer type scalar, whose Width operand is 32 and whose Signedness operand is 0.

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

Execution is a Scope that identifies the group of invocations affected by this command.

Predicate must be a Boolean type.

Requires Capability GroupNonUniformBallot.