protonscr

MESA_VK_WSI_PRESENT_MODE no longer has effect on VSync

dxvkclosed
doitsujin/dxvk#4096 · opened 2024-07-02 by Lassebq · updated 2024-07-02 · 6 comments · github
1 matching comments, n / p to jump
LLassebq 2024-07-02 github

Running games with DXVK no longer sets present mode to the preferred present mode specified in MESA_VK_WSI_PRESENT_MODE environment variable.
Damavand (wine's builtin vulkan renderer) does not have such issue and the present mode is correctly set according to the environment variable.

Software information

Arch Linux
Kernel 6.9.7
GNOME desktop environment (X11)
Mesa 24.1.2
Tested on some DX9 and DX11 games.

System information

  • GPU: RX 580
  • Driver: RADV
  • Wine version: 9.8 staging
  • DXVK version: 2.3.1

Apitrace file(s)

Is this necessary?

Log files

Games don't have any useful logs in stdout. Unless you need output with WINEDEBUG?

LLassebq 2024-07-02 github

This issue is a regression. DXVK 2.2.0 works as intended
On second thought... accoding to other sources (1) (2) it's related to VK_EXT_swapchain_maintenance1 in Mesa.

Mmbriar 2024-07-02 github

This is most likely because DXVK now uses VK_EXT_swapchain_maintenance1, which allows the application to change the present mode dynamically without recreating the swapchain, and Mesa probably only applies whatever you set in MESA_VK_WSI_PRESENT_MODE on swapchain creattion. Not a DXVK bug (nor could some driver specific env var ever be a DXVK bug...).

LLassebq 2024-07-02 github

In that case I'll stay on DXVK 2.2.0 for the time being and see how it goes. Thanks anyway

Mmbriar 2024-07-02 github

Why would you stay on DXVK 2.2 because of that? Most games allow you to just change the present mode between at least fifo and immediate in the display settings directly, and for all other cases dxvk.conf can do everything the driver env var can.

LLassebq 2024-07-02 github

There's a single unity game which doesn't have an option for that. Had to force it through driver. Also I didn't know about dxvk.conf. Gonna look into that as well.

Mmbriar 2024-07-02 github

For example for d3d11 games:

DXVK_CONFIG="dxgi.syncInterval = 0" is equivalent to MESA_VK_WSI_PRESENT_MODE=immediate

DXVK_CONFIG="dxgi.syncInterval = 1" is equivalent to MESA_VK_WSI_PRESENT_MODE=fifo

DXVK_CONFIG="dxgi.syncInterval = 0; dxvk.tearFree = True" is equivalent to MESA_VK_WSI_PRESENT_MODE=mailbox

and those don't suffer from the problem of being overwritten with VK_EXT_swapchain_maintenance1 dynamic present mode switching.