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

options: Default to RT pipelines on RADV #63

Closed

Conversation

pixelcluster
Copy link
Contributor

This roughly triples performance in Portal RTX with RADV from my testing using dxvk.conf overrides.

Note that because this fork's build system isn't compatible with Linux anymore, I haven't been able to build/test this properly. It's not a very complex change though, so it should work.

@anon-apple
Copy link
Collaborator

Did you try setting the Direct Integration ray tracing mode at all on RADV? If it performs better with TraceRay it may perform better using it there too (rather than Ray Query which the Nvidia preset uses).

It is curious though that RADV would work better with TraceRay like this given AMD hardware is more set up to work better with RayQueries (no dedicated traversal units, but maybe it just has something to do with how the shader is being compiled).

@pixelcluster
Copy link
Contributor Author

pixelcluster commented Mar 14, 2024

Did you try setting the Direct Integration ray tracing mode at all on RADV?

I did, it interestingly performed a bit worse.

It is curious though that RADV would work better with TraceRay like this given AMD hardware is more set up to work better with RayQueries (no dedicated traversal units, but maybe it just has something to do with how the shader is being compiled).

Correct. The actual hardware is not the only thing that matters, the shader compilation matters quite a bit here too: In the inlined case, cache hitrates (especially instruction cache hitrates) are considerably worse.

It sort of makes sense if you think about it: Ray traversal consists of calling a lot of things conditionally (any hit shaders only in case of potential hits, closest hit shaders only if the hit is confirmed, etc.). If you inline everything, then skipping a shader call becomes jumping all the way across the (potentially large) shader code, often guaranteeing an icache miss. OTOH, with RT pipelines, you just jump over a few instructions performing a call. From a quick look at profiling data, I'd guess considerations like this at least play a part in why ray queries turn out slower here.

@anon-apple
Copy link
Collaborator

anon-apple commented Mar 27, 2024

Hey again, I'll push this PR through our process to get it merged in since I think it's a fine enough change. Can you update this PR though to add yourself to the Contributors section here:
https://github.com/NVIDIAGameWorks/dxvk-remix/blob/main/src/dxvk/imgui/dxvk_imgui_about.cpp#L93

Thanks.

@pixelcluster
Copy link
Contributor Author

Done.

@anon-apple
Copy link
Collaborator

This should be merged now as of 8994976.

I added one small commit on top of it to fix some slight formatting issues (some tab/space indentation mixing and missing braces on the if statement).

Closing this now that it's merged.

@anon-apple anon-apple closed this Apr 9, 2024
@pixelcluster pixelcluster deleted the radv-rt-pipelines branch April 9, 2024 19:37
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.

2 participants