pub unsafe fn subgroup_broadcast<T: VectorOrScalar>(value: T, id: u32) -> T
Expand description
Result is the value
of the invocation identified by the id id
to all active invocations in the group.
Result Type must be a scalar or vector of floating-point type, integer type, or Boolean type.
Execution is a Scope that identifies the group of invocations affected by this command. It must be Subgroup.
The type of value
must be the same as Result Type.
id
must be a scalar of integer type, whose Signedness operand is 0.
Before version 1.5, id
must come from a constant instruction. Starting with version 1.5, this restriction is lifted. However, behavior is undefined when id
is not dynamically uniform.
The resulting value is undefined if id
is an inactive invocation, or is greater than or equal to the size of the group.
Requires Capability GroupNonUniformBallot
.
ยงSafety
id
must not be dynamically uniform- before 1.5:
id
must be constant - Result is undefined if
id
is an inactive invocation or out of bounds