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

FrameLimiter being ignored for D3D rendering backends #674

Closed
CG-SS opened this issue May 14, 2024 · 5 comments
Closed

FrameLimiter being ignored for D3D rendering backends #674

CG-SS opened this issue May 14, 2024 · 5 comments

Comments

@CG-SS
Copy link
Contributor

CG-SS commented May 14, 2024

This is more of a question, but it seems that, if using RenderBackend::D3D12 or RenderBackend::D3D11, the frames are always limited, that is, currently, for me on a 144 Hz monitor, it can only get up to 144 FPS, but with RenderBackend::OpenGL or RenderBackend::Vulkan, the frames are indeed unlimited, I can reach around >700 FPS.

Is that intentional?

@eugeneko
Copy link
Member

Frame limiting above vsync is not often used so the code may be funky.
I would say it is a bug and it would be nice to have the ability to disable all limits, but it's not something I care too much.
Do you happen to have vsync enabled? If so, it's another bug that OpenGL does not respect it.

@CG-SS
Copy link
Contributor Author

CG-SS commented May 15, 2024

It seems OpenGL and Vulkan are working as intended, as I had VSync disabled

@CG-SS CG-SS closed this as completed May 19, 2024
@eugeneko
Copy link
Member

eugeneko commented May 28, 2024

@CG-SS I did a bit of investigation, and this behavior is caused by Diligent implementation:

https://github.com/DiligentGraphics/DiligentCore/blob/bb098aea024f3dd321ecb9620245adfd9f287d29/Graphics/GraphicsEngineD3DBase/include/SwapChainD3DBase.hpp#L282-L298

Diligent for DX11 and DX12 does not allow application to submit any new frames if the frame queue is already full.
I am not sure if it can be disabled easily, I couldn't find a way.

If you really need this behavior, please request it explicitly and I will push the issue to Diligent maintainers.

@CG-SS
Copy link
Contributor Author

CG-SS commented Jun 2, 2024

Altho not critical, as a game engine user, I would like to be able to at least have a FPS cap that is higher than the monitor refresh rate, I'm surprised they don't allow this, as it's standard for any game engine in order to allow the user to have better perfomance for lag spikes and some other competitive gaming use cases

@eugeneko
Copy link
Member

eugeneko commented Jun 2, 2024

@CG-SS This is related diligent issue: DiligentGraphics/DiligentEngine#279
AFAIU windows compositor causes application to wait until display is ready, no matter what we do.
Only DX11 and DX12 in window are affected. Native fullscreen should not be affected.

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