Commit ece170d
authored
Clarify ballot ops for remainder subgroups (#689)
As discussed in issue #626, the wording used to describe the
sub_group_ballot_bit_count() and sub_group_ballot_find_msb() operations
included the phrase "only considering the bits in _value_ that represent
predicate values from all work items in the subgroup", but "remainder"
subgroups were not considered when arriving at this wording.
In Vulkan, the subgroup size is defined in a way that is equivalent to
the definition of the maximum subgroup size in OpenCL. Therefore, in
Vulkan, "remainder" subgroups start with work-items that are initially
inactive, but are still considered work-items within the subgroup.
The ballot operations in OpenCL were intended to be equivalent to those
in Vulkan. Therefore, for a "remainder" subgroup, predicate bits
that would correspond to non-existent work-items that would be
considered initially inactive in Vulkan should still contribute to
ballot operations that concern predicate bits and are always required
to be well-defined.
The sub_group_ballot_bit_count() and sub_group_ballot_find_msb()
operations are affected by this.
Due to the manner of their operation, the sub_group_ballot_find_lsb(),
sub_group_ballot_inclusive_scan() and sub_group_ballot_exclusive_scan()
operations are not affected. However, as sub_group_ballot_find_lsb()
is described using the same wording, and altering the wording does not
affect its semantics, it has been updated for consistency.1 parent ebc87e5 commit ece170d
1 file changed
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
303 | 303 | | |
304 | 304 | | |
305 | 305 | | |
306 | | - | |
| 306 | + | |
307 | 307 | | |
308 | 308 | | |
309 | 309 | | |
| |||
324 | 324 | | |
325 | 325 | | |
326 | 326 | | |
327 | | - | |
| 327 | + | |
328 | 328 | | |
329 | 329 | | |
330 | 330 | | |
331 | 331 | | |
332 | 332 | | |
333 | 333 | | |
334 | 334 | | |
335 | | - | |
| 335 | + | |
336 | 336 | | |
337 | 337 | | |
338 | 338 | | |
| |||
0 commit comments