jp7677 / dxvk-nvapi

Alternative NVAPI implementation on top of DXVK.
MIT License
353 stars 32 forks source link

Add support for Reflex #147

Closed esullivan-nvidia closed 4 months ago

esullivan-nvidia commented 8 months ago

The intent of this PR is to enable Reflex for all D3D11, and D3D12 titles using dxvk-nvapi. It does this through a new device interface called ID3DLowLatencyDevice, which will be exposed from vkd3d-proton, and dxvk.

To provide compatibility with LatencyFleX this change will only use the ID3DLowLatencyDevice interface when LatencyFleX is not detected.

adamnv commented 8 months ago

Support for the low-latency extensions just got released in the 545.23.06 NVIDIA driver so this is usable/testable now. (Propagating this note to all three project PRs, apologies for any duplication! :smile_cat: )

esullivan-nvidia commented 8 months ago

Thanks for all of the review feedback, I really appreciate it. I have addressed most of the comments now, sorry for the delay. Additional comments should be resolved much faster. I will take a look at the tests tomorrow.

esullivan-nvidia commented 8 months ago

I have added tests for the D3DLowLatencyDevice path. Let me know if you have any changes you would like me to incorporate. Any feedback is appreciated.

jp7677 commented 8 months ago

@esullivan-nvidia Thanks a lot for including the feedback and also for taking the time to extend the tests. Perfectly and all good from my side! We can merge this as soon as the DXVK/VKD3D-Proton PRs are merged. Thanks a lot!

(Reminder to self to also adjust the readme when this PR has landed)

jp7677 commented 5 months ago

@esullivan-nvidia please see https://github.com/jp7677/dxvk-nvapi/pull/151#issue-2090151163 when you have time to get back to this PR. Unfortunately the PR with the MSVC additions came in-between and now master conflicts with your work.

ishitatsuyuki commented 5 months ago

Since I also happen to be testing this patch I have a branch here with the necessary modifications for rebase applied. Please feel free to take it: https://github.com/ishitatsuyuki/dxvk-nvapi/tree/nv_low_latency2

iddm commented 5 months ago

Excuse me for jumping in like that, but are we still waiting for any changes? Can we fix the conflicts on our own? It doesn't look like the NVIDIA employees have all the time in the world to work on such Linux things as that, from my little understanding of time. Can I help with the rebase, or would it require the changes by the original author?

Thanks, just want to help finish this sooner rather than later.

ishitatsuyuki commented 5 months ago

Everything works if you compile it, there is even a rebase from myself up there. NVIDIA has their own timeline, it's fine, in the meantime just compile it by yourself.

iddm commented 5 months ago

Everything works if you compile it, there is even a rebase from myself up there. NVIDIA has their own timeline, it's fine, in the meantime just compile it by yourself.

:+1: Yes, thanks for that, but I don't need the NVIDIA Reflex to work as much as I want the Frame Generation to work, and from my understanding, it relies on this API to be merged. Until all three PRs are merged, I don't think NVIDIA will tick the checkbox in the driver which enables Frame Generation on Linux (now it is unavailable), not to mention that in the public API documentation and the Linux pre-built libraries, there are no ray reconstruction and frame generation variants. I and a few other game projects would rather want this happen earlier, if possible, so I am inclined to do anything possible from my side to just let this happen already, seeing that it doesn't get enough attention from NVIDIA, or these time quanta are just too short to create a PR and solve everything in one go.

Avsynthe commented 4 months ago

I want the Frame Generation to work

Yes please. I hope this is the next thing on the list. In fact, I'm pretty sure most of us hoped this would be first but that would be be nothing short of magic as there is an order 😁

esullivan-nvidia commented 4 months ago

@ishitatsuyuki Thank you for doing that rebase, I really appreciate it. I have applied it to this branch now.

jp7677 commented 4 months ago

Thank a lot @esullivan-nvidia for your hard work on this one!

esullivan-nvidia commented 4 months ago

Thank a lot @esullivan-nvidia for your hard work on this one!

Thanks again to you and everyone else who helped review this PR!