HansKristian-Work / vkd3d-proton

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

Presentation mode is reported as fifo by mangohud when vsync is off in Cyberpunk 2077 #1891

Closed shmerl closed 6 months ago

shmerl commented 6 months ago

New version of mangohud can report Vulkan presentation mode. When running Cyberpunk 2077 (2.11), for some reason it's showing me fifo, even though vsync is off in the game. Shouldn't it be mailbox? Or how does vkd3d-proton decide on what presentation mode to set?

According to kwin developers, presentation mode is set by the client not by compositor, so it's likely vkd3d-proton deciding it.

The way to enable it in the HUD:

MANGOHUD_CONFIG=present_mode

See also: https://github.com/flightlessmango/MangoHud/issues/1190

Screenshot:

cp2077

Wine log: wine.log

mbriar commented 6 months ago

Probably because vkd3d-proton now uses VK_EXT_swapchain_maintenance1, which allows you to change the present mode dynamically without recreating the swapchain and mangohud can't detect that.

shmerl commented 6 months ago

May be it would be good to add some logging line to vkd3d-proton about what presentation mode it decides to set? I don't see it in the log (attached it above).

Also, is there a way to detect presentation mode for mangohud after it was set dynamically like that?

mbriar commented 6 months ago

Mangohud should be able to detect it, but it would have to check the new EXT struct on every present. Looks to me like it currently only checks in CreateSwapchainKHR.

Joshua-Ashton commented 6 months ago

Not a vkd3d-proton bug, closing.

shmerl commented 6 months ago

Can vkd3d-proton report the setting of presentation mode in the log at least? Or it already does that?