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

DXGI should be used for frame presentation #2361

Open
jellysquid3 opened this issue Feb 23, 2024 · 0 comments
Open

DXGI should be used for frame presentation #2361

jellysquid3 opened this issue Feb 23, 2024 · 0 comments
Labels
T-enhancement Type: Enhancement

Comments

@jellysquid3
Copy link
Member

Problem

Every OpenGL driver on Windows currently has strange issues frame presentation in some way or another, making the game's frame time pacing feel miserable, especially when V-Sync is enabled. There are also problems with systems with hybrid graphics, where the monitor output is composited on a different GPU from the one which the game renders on, causing a significant performance penalty.

Modern graphics drivers on Windows have tried to implement this for other games via what could only be described as "questionable" methods, but the implementation is not always functional (see here), and it doesn't give any additional control to the application.

Solution

Since these problems are not going to be fixed any time soon (if ever), the only solution is to resort to using DXGI for frame presentation. This will allow us to support things like variable-refresh rates (VRR), flip-model presentation, and more efficient framebuffer copies from GPU->GPU.

We should aim to enable this functionality by default on all Windows computers, where possible.

Concerns

  • Interacting with Windows APIs (especially anything involving COM) from Java is going to be very painful. We will likely need to pull in additional dependencies and do a lot of plumbing to make everything work.
  • NVIDIA's own implementation for DXGI Presentation in OpenGL applications seems like it is broken, and there's no guarantee we can workaround whatever bug exists in the driver.
@jellysquid3 jellysquid3 added the T-enhancement Type: Enhancement label Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-enhancement Type: Enhancement
Development

No branches or pull requests

1 participant