diff --git a/test_conformance/subgroups/subgroup_common_templates.h b/test_conformance/subgroups/subgroup_common_templates.h index f779ef37..436b502b 100644 --- a/test_conformance/subgroups/subgroup_common_templates.h +++ b/test_conformance/subgroups/subgroup_common_templates.h @@ -82,7 +82,7 @@ template struct BC // broadcasted (one the same value for whole subgroup) if (operation != SubgroupsBroadcastOp::broadcast) { - // reduce brodcasting index in case of non_uniform and + // reduce broadcasting index in case of non_uniform and // last workgroup last subgroup if (last_subgroup_size && j == nj - 1 && last_subgroup_size < NR_OF_ACTIVE_WORK_ITEMS) @@ -90,6 +90,13 @@ template struct BC bcast_if = bcast_index % last_subgroup_size; bcast_elseif = bcast_if; } + // reduce broadcasting index in case subgroup size <= + // NR_OF_ACTIVE_WORK_ITEMS (i.e. all items are active) + else if (n <= NR_OF_ACTIVE_WORK_ITEMS) + { + bcast_if = bcast_index % n; + bcast_elseif = bcast_if; + } else { bcast_if = bcast_index % NR_OF_ACTIVE_WORK_ITEMS;