Created
April 11, 2018 13:02
-
-
Save HansKristian-Work/ef8a5ecaf10acc34a81e7cb30252ecfd to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| gl_SubgroupEqMask = 1u << (WaveGetLaneIndex() - uint4(0, 32, 64, 96)); | |
| if (WaveGetLaneIndex() >= 32) gl_SubgroupEqMask.x = 0; | |
| if (WaveGetLaneIndex() >= 64 || WaveGetLaneIndex() < 32) gl_SubgroupEqMask.y = 0; | |
| if (WaveGetLaneIndex() >= 96 || WaveGetLaneIndex() < 64) gl_SubgroupEqMask.z = 0; | |
| if (WaveGetLaneIndex() < 96) gl_SubgroupEqMask.w = 0; | |
| gl_SubgroupGeMask = ~(1u << (WaveGetLaneIndex() - uint4(0, 32, 64, 96)) - 1u); | |
| if (WaveGetLaneIndex() >= 32) gl_SubgroupGeMask.x = 0u; | |
| if (WaveGetLaneIndex() >= 64) gl_SubgroupGeMask.y = 0u; | |
| if (WaveGetLaneIndex() >= 96) gl_SubgroupGeMask.z = 0u; | |
| if (WaveGetLaneIndex() < 32) gl_SubgroupGeMask.y = ~0u; | |
| if (WaveGetLaneIndex() < 64) gl_SubgroupGeMask.z = ~0u; | |
| if (WaveGetLaneIndex() < 96) gl_SubgroupGeMask.w = ~0u; | |
| uint ge_lane_index = WaveGetLaneIndex() + 1; | |
| gl_SubgroupGtMask = ~(1u << (ge_lane_index - uint4(0, 32, 64, 96)) - 1u); | |
| if (ge_lane_index >= 32) gl_SubgroupGtMask.x = 0u; | |
| if (ge_lane_index >= 64) gl_SubgroupGtMask.y = 0u; | |
| if (ge_lane_index >= 96) gl_SubgroupGtMask.z = 0u; | |
| if (ge_lane_index < 32) gl_SubgroupGtMask.y = ~0u; | |
| if (ge_lane_index < 64) gl_SubgroupGtMask.z = ~0u; | |
| if (ge_lane_index < 96) gl_SubgroupGtMask.w = ~0u; | |
| uint le_lane_index = WaveGetLaneIndex() + 1; | |
| gl_SubgroupLeMask = (1u << (le_lane_index - uint4(0, 32, 64, 96))) - 1u; | |
| if (le_lane_index >= 32) gl_SubgroupLeMask.x = ~0u; | |
| if (le_lane_index >= 64) gl_SubgroupLeMask.y = ~0u; | |
| if (le_lane_index >= 96) gl_SubgroupLeMask.z = ~0u; | |
| if (le_lane_index < 32) gl_SubgroupLeMask.y = 0u; | |
| if (le_lane_index < 64) gl_SubgroupLeMask.z = 0u; | |
| if (le_lane_index < 96) gl_SubgroupLeMask.w = 0u; | |
| gl_SubgroupLtMask = (1u << (WaveGetLaneIndex() - uint4(0, 32, 64, 96))) - 1u; | |
| if (WaveGetLaneIndex() >= 32) gl_SubgroupLtMask.x = ~0u; | |
| if (WaveGetLaneIndex() >= 64) gl_SubgroupLtMask.y = ~0u; | |
| if (WaveGetLaneIndex() >= 96) gl_SubgroupLtMask.z = ~0u; | |
| if (WaveGetLaneIndex() < 32) gl_SubgroupLtMask.y = 0u; | |
| if (WaveGetLaneIndex() < 64) gl_SubgroupLtMask.z = 0u; | |
| if (WaveGetLaneIndex() < 96) gl_SubgroupLtMask.w = 0u; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment