1. 23
    1. 2

      It seems to me simd_ballot is the key. Searching Google, I am surprised that this post is the only result apart from Metal Shading Language Specification itself!

      1. 2

        It’s existed for a while on current hardware (eg. GCN) but only exposed on some.

        https://developer.nvidia.com/reading-between-threads-shader-intrinsics