Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MESA_VK_WSI_PRESENT_MODE no longer has effect on VSync #4096

Closed
Lassebq opened this issue Jul 2, 2024 · 6 comments
Closed

MESA_VK_WSI_PRESENT_MODE no longer has effect on VSync #4096

Lassebq opened this issue Jul 2, 2024 · 6 comments

Comments

@Lassebq
Copy link

Lassebq commented Jul 2, 2024

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?

@Lassebq
Copy link
Author

Lassebq commented Jul 2, 2024

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.

@mbriar
Copy link
Contributor

mbriar commented Jul 2, 2024

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...).

@Lassebq
Copy link
Author

Lassebq commented Jul 2, 2024

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

@Lassebq Lassebq closed this as completed Jul 2, 2024
@mbriar
Copy link
Contributor

mbriar commented Jul 2, 2024

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.

@Lassebq
Copy link
Author

Lassebq commented Jul 2, 2024

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.

@mbriar
Copy link
Contributor

mbriar commented Jul 2, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants