options: Default to RT pipelines on RADV#63
options: Default to RT pipelines on RADV#63pixelcluster wants to merge 2 commits intoNVIDIAGameWorks:mainfrom
Conversation
|
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). |
I did, it interestingly performed a bit worse.
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. |
|
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: Thanks. |
This roughly triples performance from my testing.
5678fcb to
445d189
Compare
|
Done. |
|
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. |
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.