-
-
Notifications
You must be signed in to change notification settings - Fork 98
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
Use DXGI to present frames rendered by OpenGL on Windows #10242
Comments
I am not quite sure how to move forward with this. I'll write down some questions/points so I don't forget:
|
Does it need to be an option? I thought you'd always enable it whenever it's supported by the OS/driver. Apps like Special K highlight any other presentation model (such as GDI compose) as legacy. If it needs to be disableable for troubleshooting reasons, we can add a command line argument for it.
Yes. There might be use cases that require it to be disabled, but it's very unlikely for games (maybe for some non-game applications that use features like per-pixel transparency?).
I'd leave that for a future PR.
I'd check performance in a draw call-heavy project to make sure it doesn't regress. |
libsdl-org/SDL#10160
I suppose that for whatever the reason some die-hard fan of exclusive fullscreen may always want to keep using it. |
specifically, those who prefer frame mistiming to manifest as tearing rather than as motion jitter. |
On the other hand, I believe the feature may require Multi-Plane Overlays which isn't always granted (even on newer hardware/drivers, and for sure on older ones). |
Which I guess is precisely why traditional exclusive fullscreen is irreplaceable in the foreseeable future, Microsoft’s disingenuous “you think you do, but you don’t” push for “flip fullscreen is better than exclusive!” shows a misunderstanding of the frame pacing problem as blindly lumped into a single criteria of “latency” and missing all the nuances. |
The only misunderstanding seems to be yours of what I said. Not sure what you mean by pacing lumping, especially considering the great lengths you can notice they went in the famous W10 presentation modes dev video. |
Describe the project you are working on
The Godot editor?
Describe the problem or limitation you are having in your project
Native OpenGL has suboptimal present behaviour which may increase input lag.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Using a DXGI 1.3 swap chain and flip model presentation lets us control frame presentation more precisely, which may let Godot reduce input lag, similar to #5692.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
The
WGL_NV_DX_INTEROP2
extension allows us to pass a D3D11 buffer into OpenGL to render onto it directly.Note: despite having NV in its name, this extension is also available on Intel and AMD drivers, at least from what I read. It does work on my Intel integrated graphics driver.
I have a experimental branch here: https://github.com/alvinhochun/godot/tree/opengl-with-dxgi-present
If this enhancement will not be used often, can it be worked around with a few lines of script?
No, as presenting frames is handled by the renderer.
Is there a reason why this should be core and not an add-on in the asset library?
This is core rendering functionality.
The text was updated successfully, but these errors were encountered: