Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use GPU radix sort when we can (based on AMD FidelityFX) #1

Merged
merged 3 commits into from
Sep 7, 2023
Merged

Conversation

aras-p
Copy link
Owner

@aras-p aras-p commented Sep 7, 2023

Port the ParallelSort v1.1.1 from AMD FidelityFX to Unity. The original code is Copyright © 2023 Advanced Micro Devices, Inc., and under MIT license. Curiously enough, I don't have AMD hardware here to test, but works fine on NVIDIA (DX12 and Vulkan) and Apple (Metal).

The sorting itself gets down from 11.9ms down to 3.3ms on Windows. On a Mac seemingly a smaller speedup, but it's also hard to measure individual frame parts at least within Unity itself.

Note: FidelityFX sort requires "wave operations" which means it does not work on DX11. So when on DX11, the sorting falls back to the previous slower bitonic sort. I did a quick attempt at emulating/redoing the parts that require wave operations to at least "do something correct" on DX11, but did not get it working just yet.

@aras-p aras-p merged commit 59b6742 into main Sep 7, 2023
@aras-p aras-p deleted the ffx-sort branch September 8, 2023 04:05
dylanebert pushed a commit to dylanebert/UnityGaussianSplatting that referenced this pull request Oct 13, 2023
Use GPU radix sort when we can (based on AMD FidelityFX)
HIHHIYAYAYOO pushed a commit to HIHHIYAYAYOO/UnityGaussianSplatting that referenced this pull request Nov 30, 2023
Use GPU radix sort when we can (based on AMD FidelityFX)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant