Joshua-Ashton / d9vk

A Direct3D9 to Vulkan layer using the DXVK backend. [Upstreamed to DXVK]
https://github.com/doitsujin/dxvk
zlib License
833 stars 42 forks source link

Oblivion - higher input latency with vsync vs. Gallium Nine #452

Closed aufkrawall closed 1 year ago

aufkrawall commented 4 years ago

Probably not a bug, but perhaps it can be optimized: Games like Oblivion and Skyrim, which use vsync by default, feel more laggy with D9VK than with Gallium Nine. You have to use thread_submit=true with the latter to fix backbuffer queue length, but it is still more direct than D9VK. d3d9.maxFrameLatency = 1 doesn't help here. Xorg compositor is off in both cases and pageflipping works correctly (no tearing).

Joshua-Ashton commented 4 years ago

I played a bit with/wo vsync and I had no noticeable input lag.

Are you sure you aren't encountering a placebo?

aufkrawall commented 4 years ago

No placebo, I can notice the difference already in the game's main menu which uses a software cursor. :)

Joshua-Ashton commented 4 years ago

I've tested G9 and D9VK and honestly I don't feel any difference. My monitor isn't the best for input lag though so I'm probably not the best candidate to test this.

Joshua-Ashton commented 4 years ago

Can you try with this build? dxvk-latency.tar.gz

aufkrawall commented 4 years ago

Vsync doesn't work with that one. :)

Joshua-Ashton commented 4 years ago

What if we do d3d9.numBackBuffers = 2 and d3d9.maxFrameLatency = 1 on latest master/0.30?

aufkrawall commented 4 years ago

No change. Could it be that d3d9.numBackBuffers is not implemented? Even if I set it to 1 or 2, it can render at any framerate below vsync maximum (75Hz in my case), and is not falling back back to clean divisors of max like double buffering would do.

Joshua-Ashton commented 4 years ago

It is implemented, hmmm

aufkrawall commented 4 years ago

The latency really increases when increasing the number of backbuffers, e.g. a number of 10 is extremely laggy. It seems to hit a wall for lower values? Though I believe also GN with thread_submit=true has a backbuffer queue length of 3 due to its "triple buffering" vsync behavior (at least with recent mesa git-master, there where some throttling fixes a few weeks ago).

ghost commented 4 years ago

Difference in CPU single thread performance may be a reason why some people encounter lag and some don't. Bethesda games notoriously are often bottlenecked by single thread performance.

aufkrawall commented 4 years ago

CPU performance really can play a role, as the input latency is only that high when vsync actually caps the framerate. So when I drop below 75fps (it really does that on my 6700k...), it actually feels more direct with that lower framerate (while vsync still really is on, no tearing).

Joshua-Ashton commented 4 years ago

I'm still not seeing any input lag on my end. How severe are we talking?

aufkrawall commented 4 years ago

The game can be played without issues, I don't think it's worse than WineD3D.

Blisto91 commented 1 year ago

@aufkrawall If you believe this is this is still an issue with latest dxvk then please move the issue to that repo. 🙂

aufkrawall commented 1 year ago

Wasn't a real issue to begin with vs. native D3D9, so let's send this ticket into vsync hell where it belongs. :)