protonscr

Vsync in Vulkan

dxvkclosed question
doitsujin/dxvk#791 · opened 2018-11-29 by SteveEbey73742 · updated 2018-12-03 · 5 comments · github
SSteveEbey73742 2018-11-29 github

Want to learn how to turn Vsync on or off, based on the settings in a game. Could you share a code snippet for that, or steer me in the right direction? Thank you.

Ddoitsujin maintainer 2018-11-29 github

It's just about choosing the correct present mode for the swap chain. Their expected behaviour is documented in the Vulkan specification, although some drivers may have issues with it (especially in Linux). Relevant DXVK code:
https://github.com/doitsujin/dxvk/blob/af2f5cc77ff14b7f152ba174ee0bb232887058c4/src/d3d11/d3d11_swapchain.cpp#L718-L732.

For future reference, please don't use this issue tracker for Vulkan-related questions, /r/vulkan is a much more suitable place for that.

SSteveEbey73742 2018-11-30 github

Thanks for the information.

SSveSop 2018-12-01 github

@SteveEbey73742
I suspect you are fondling with vkd3d vsync for WoW.. :)
This is done in wine, so need to recompile wine to get that working. I did a test with forcing vsync off, so the function "following the game setting" does not work, but atleast you can try and compare. See attached patch.
vkd3d_vsync_hack.patch.gz

Did a comparison by flying from Boralus <-> Fort Daelin 3 times and calculating the averages
DXVK: (Min/Max/Avg)

Boralus -> Fort Daelin
46 / 246 / 171
Fort Daelin -> Boralus
42 / 254 / 159

VKD3D (D3D12): (Min/Max/Avg)

Boralus -> Fort Daelin
63 / 209 / 154
Fort Daelin -> Boralus
53 / 200 / 135

So far lower performance (Although seemingly higher minimum fps) with VKD3D, but coming along.

I tested with VKD3D git 09f667ce4eaea2bb8c5e6fa8a79553ba9cf2a6aa, but did not add the patch you posted on the WineHQ cos i wanna check if the nVidia 415.18.02 driver improves something.. Will test that some more tonight i guess.

SSteveEbey73742 2018-12-03 github

your help is appreciated, and the vkd3d works for me in wow, with one notable difference. Mist of Pandaria has fps of 15 or less, where all other expacs have 50-80 fps on my system. Updating to 415.18.04 to see if that helps.

SSteveEbey73742 2018-12-03 github

Confirmed, 415.18.04 fixes the low fps in Pandaria.

Nothing extracted yet.