Does the M1/M2 use ARM designs in the GPU as well as the CPU? If so, it might be possible to work out what could be implemented by looking at the [arm docs](https://developer.arm.com/documentation/102203/0100/Valhall-...).
There's also a lot of great material, accessibly written, on Alyssa's blog[2], see in particular the posts titled "Dissecting the Apple M1 GPU, part ${I}".