-
Notifications
You must be signed in to change notification settings - Fork 0
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
Framerate cap not working correctly, and getting worse as FPS go higher #5
Comments
Here is the build I use now: VkGHL.tar.gz I'll check |
Thanks for the quick response, I really appreciate it! I tried that one trying to cap frame rate at 20fps using this command:
I did all the testing again and the results are pretty much the same as in the first post though :/ If there's something that I could help you with just let me know, I've spend a lot of hours to get this to work in this game that I wouldn't mind repeating some more tests or helping out with some other information. |
Not that I know how this actually works, but maybe it is a problem of the layer being executed ahead of time? I'd say that it should be the last layer to be executed before presenting the completely processed image... Does it make any sense to you? If that were the problem, is there a way to make this layer execute always after every operations are completed? |
I rewrote it almost from scratch (again), trying to follow Vulkan guide recommendations and adding more code guards (except threading): VkGHL.tar.gz. Don't expect too much, it still not so accurate in Wine than in native Vulkan applications, so the problem can be somewhere in Wine or with the game itself. You could check |
Wow! Thank you very much for working so hard to fix this problem, I really appreciate what you're doing for the community here! I'll give it a try and comment you as soon as I do the proper testing |
@pchome Can you opensource your new code? I would like to take a look at it. |
@DadSchoorse The only reason this wasn't done yet -- no functional changes, except new code is a standalone layer. So I need to do boring part, e.g. decide how to properly deprecate old repository, create new readme, license, release versioning, etc. This is not what I want to do right now. Maybe later. |
I'm testing this library in Age of Empires 2: Definitive Edition.
When not using the library, the game runs at approx 170~250FPS.
I'm using linux steam client, setting as Launch Options for the game and for these tests I'm only modifiying the FPS number
These are screenshot of the in-game Vulkan's full HUD info in the same condition (game as idle as possible).
1.--- Not setting any FPS value ---

Launch Options:
DXVK_HUD=full VK_INSTANCE_LAYERS="VK_LAYER_LUNARG_VkGHL" %command%
2.----- 25FPS cap ---

Launch Options:
VSYNC=0 FPS=25.00 DXVK_HUD=full VK_INSTANCE_LAYERS="VK_LAYER_LUNARG_VkGHL" %command%
3.--- 40FPS cap ---

Launch Options:
VSYNC=0 FPS=40.00 DXVK_HUD=full VK_INSTANCE_LAYERS="VK_LAYER_LUNARG_VkGHL" %command%
4.--- 60FPS cap ---

Launch Options:
VSYNC=0 FPS=60.00 DXVK_HUD=full VK_INSTANCE_LAYERS="VK_LAYER_LUNARG_VkGHL" %command%
5.--- 60FPS cap ---

Launch Options:
VSYNC=0 FPS=100.00 DXVK_HUD=full VK_INSTANCE_LAYERS="VK_LAYER_LUNARG_VkGHL" %command%
So, as you can see, as the FPS number raises, the difference between the expected cap and the actual cap does raise too.
Another thing to consider is the shown min and max values in every test (and what makes me think it may be a miscalculation in some of the variables, like the sleep time for the limiter).
What I understand (I may be wrong) is that the job of the limiter is to make the framerate not to get lower than 1000/fps (in ms) and, for example, in the first test, the min value for 25 fps should be not lower than 1000/25=40 and the test shows that the min framerate was actually 3.9 which I think should not happen. The same thing occurs in the other tests as well.
The text was updated successfully, but these errors were encountered: