HansKristian-Work / vkd3d-proton

Fork of VKD3D. Development branches for Proton's Direct3D 12 implementation.
GNU Lesser General Public License v2.1
1.76k stars 184 forks source link

vkd3d: Get rid of default BufferCount latency optimization in swapchain. #2040

Closed HansKristian-Work closed 1 week ago

HansKristian-Work commented 1 week ago

There are various cases now observed in the wild where BufferCount = 2 was causing problems. The problem is obvious in games with reasonably high CPU and GPU subscription. Since present wait events come in at a different alignment than presentation, it can happen that the CPU is delayed just long enough for a GPU frame to end up being falsely dropped.

This is quite bad on Deck since GPU clocks will start dropping as a result and then CPU clocks drop, and we have a really bad time.

The risk here is that some games will get more latency, but we have to err on the side of caution here unfortunately. Ideally, the internal latency handle should be more adaptive in nature. It's currently unclear which system component should be responsible for implementing that however.