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

IMMEDIATE Presentation mode by default? #8336

Open
polluxau opened this issue Dec 23, 2024 · 5 comments
Open

IMMEDIATE Presentation mode by default? #8336

polluxau opened this issue Dec 23, 2024 · 5 comments
Labels
Feature Request New feature or request

Comments

@polluxau
Copy link

polluxau commented Dec 23, 2024

Feature Request

Switching to IMMEDIATE from FIFO

I confirm:

  • [ ✅] that I haven't found another request for this feature.
  • [ ✅] that I have checked whether there are updates for my system available that
    contain this feature already.

Description

By default it seems most proton games default to FIFO instead of IMMEDIATE, why is that? on cs2 a native linux game defaults to IMMEDITATE all the time so im wondering why this is the default and if this can be changed in proton or if its up to the desktop environment to do this as I have tearing enabled in KDE plasma 6.2.4 but it doesn't switch the game to IMMEDIATE presentation mode

Justification [optional]

You get better latency in games under wayland especially iv noticed compared to x11

Risks [optional]

I dont think there is much ngl, iv been forcing it on mangohud for a while now and i dont have any major issues either on amd or nvidia hardware

References [optional]

@kisak-valve kisak-valve added the Feature Request New feature or request label Dec 23, 2024
@polluxau polluxau changed the title IMMEDIATE Present mode by default? IMMEDIATE Presentation mode by default? Dec 24, 2024
@mbriar
Copy link

mbriar commented Dec 26, 2024

It's up to the game to choose a present mode, proton doesn't set any default. DXVK only translates what the game sets in DXGI to the vulkan equivalent. And forcing IMMEDIATE by default would have the obvious drawback that it would introduce tearing (if you disallow tearing in e.g. the KDE settings IMMEDIATE will behave like MAILBOX and not tear)

@polluxau
Copy link
Author

polluxau commented Dec 26, 2024

It's up to the game to choose a present mode, proton doesn't set any default. DXVK only translates what the game sets in DXGI to the vulkan equivalent. And forcing IMMEDIATE by default would have the obvious drawback that it would introduce tearing (if you disallow tearing in e.g. the KDE settings IMMEDIATE will behave like MAILBOX and not tear)

Ok, so if a game like the finals for example on windows it would do immediate probably right? While on Linux by default it chooses FIFO, more than 90% of my games were choosing FIFO by default when I have tearing enabled in KDE plasma or the desktop that supports the tearing protocol, shouldn't the desktop tell the game set IMMEDIATE as user has tearing enabled? That would be nice, idk how to do that and I'm not a developer so I'll stick with mangohud for right now but just a thought I had as it doesn't make sense having tearing enabled if the game itself is using FIFO by default

@mbriar
Copy link

mbriar commented Dec 26, 2024

The kde 'allow tearing' option doesn't tell the game anything. The only thing it does is allow IMMEDIATE to work like IMMEDIATE on wayland in the first place. Without the option set on wayland, IMMEDIATE is emulated with MAILBOX.

For windows games, DXGI syncInterval == 0 gets translated to IMMEDIATE, while syncInterval == 1 gets translated to FIFO. Most games will have a setting called 'Vsync on/off' in their settings menu. If you turn that off you get syncInterval == 0 and consequently IMMEDIATE on vulkan. There should really be no difference in behavior between windows and linux there.

@polluxau
Copy link
Author

The kde 'allow tearing' option doesn't tell the game anything. The only thing it does is allow IMMEDIATE to work like IMMEDIATE on wayland in the first place. Without the option set on wayland, IMMEDIATE is emulated with MAILBOX.

For windows games, DXGI syncInterval == 0 gets translated to IMMEDIATE, while syncInterval == 1 gets translated to FIFO. Most games will have a setting called 'Vsync on/off' in their settings menu. If you turn that off you get syncInterval == 0 and consequently IMMEDIATE on vulkan. There should really be no difference in behavior between windows and linux there.

I see well some games must be not turning it off as I always make sure vsync is off in fps games like the finals and it uses FIFO still but thanks for teaching me something :)

@mbriar
Copy link

mbriar commented Dec 26, 2024

Mangohud also can't show the used present mode correctly for anything using dynamic present modes with VK_EXT_swapchain_maintenance1, which dxvk and vkd3d-proton are using for a while now: flightlessmango/MangoHud#1190 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants