-
Notifications
You must be signed in to change notification settings - Fork 281
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
1 parent
a642cc1
commit 9429e62
Showing
1 changed file
with
9 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters