You'd think there's a million ready-to-use "sort some things, on the GPU" codes out there, but outside of CUDA there isn't all that much. The ones that work, that is.

So I spent way too much time debugging sorting of a bunch of points! As a side effect though, Unity HDRP GPU sorting utility got a fix pull request :) https://github.com/Unity-Technologies/Graphics/pull/7954

Improve robustness of GPUSort wrt out of bounds buffer reads/writes by aras-p · Pull Request #7954 · Unity-Technologies/Graphics

Purpose of this PR GPUSort utility (which seems to be used for the "software" Line Rendering system in HDRP) in some cases produces incorrect results, at least on Metal (most notably, when the size...

GitHub
@aras was your previous (or was there more than one?) unity PR accepted and submitted? At the time we mused whether submitting PRs was worth the effort.
@MouseByTheSea I got a response that they will look into it! :)
@aras that’s great news, I’ll ask again in a month :) if you can not get a PR accepted then there’s no hope for the rest of us :)
@MouseByTheSea comments on the GitHub PR indicate positive things!
@aras it’s gone in! Great work btw, and it’s good to see them accepting PRs.