Make VK_KHR_shader_subgroup_vote tests work with sparse dispatch
The voteallequal tests created a value which was supposed to be
different for some threads in the subgroup, and then called
voteAllEqual() on it expecting it to return false. However, because the
entire expression was reduced modulo 2, if the implementation dispatched
threads in a sparse manner so that some subgroup indices were skipped,
then all the active threads could have wound up with the same value. In
particular, this caused the graphics voteallequal tests to fail in the
fragment stage on AMD due to how the hardware dispatches single-pixel
point sprites.
Fix this by just using gl_SubgroupIndex directly, so that every thread
is guaranteed to get a unique value. Some care has to be taken for
boolean values -- I've just made them use subgroupElect() instead, as
that's the simplest way to get a guaranteed-divergent boolean value.
Affected tests:
dEQP-VK.subgroups.vote.*
Components: Vulkan
VK-GL-CTS Issue: 1437
Change-Id: I10ddc438db4cd4925bdbc4f458a082fcab9c9155