Closed SharlLegreg closed 5 months ago
The problem you are seeing is the processing happening for the world simulation every 28 milliseconds (35 times a second). This processing is a delay in sending commands to the GPU so it's going to be lower for that instant. Because Helion has comparatively no processing on the other frames compared to GZDoom/dsda the difference between the min and max framerates is going to be much higher.
I suspect if you use the chasecam command in the console the problem will go away when the burden of the world simulation is lifted off the CPU.
So I played with this some more. My laptop has a 5900HS with a Vega 8. I force switched to my Vega 8 and noticed the same issue. In Helion you can use hud.showminmaxfps 1. This shows the min/max frames rendered.
My Vega 8 looks like this: FPS: 80 Min: 20 Max: 6000
I think what is happening is that the world simulation is allowing the card to play catch up and it blasts out too many frames and basically exhausts itself. Usually there is an internal limit but I don't know what AMD is doing here.
I used RivaTuner and set the framerate limit to be 100 and then I got much more stable numbers. I did the cap here because setting the cap in the AMD software does not appear to work.
This one was a little tricky but it appears to be that the nvidia implementation has a baked in optimization where glMappedBuffer will return the same address so it doesn't have to synchronize the CPU and GPU memory every call. The apparent fix seems to be using GL_MAP_PERSISTENT_BIT with glBufferStorage to the call but that is a 4.4 feature.
@SharlLegreg since you appear to be building from source can you let me know if this branch fixes the problem you? I will have to test later that setting GL_MAP_PERSISTENT_BIT on cards that don't support it doesn't crash.
The branch majorly fixed the problem. Minor fluctuations is still there, and the fluctuations increases the more enemies are awake / pursuing the player.
The Min Max FPS are more stable and closer, with the max around 160-200 FPS, and min around 90-130 fps, compared to max of 3000 and min of 40.
Helion MPB Branch, many monsters awake
Ditto, no monsters awake
The minor fluctuations are normal. The more monsters that are awake puts more processing time on the CPU and will make that frame take longer to render.
Fixed with 0.9.2.8 release
OS: Windows 11 23H2 Version Tested On: https://github.com/Helion-Engine/Helion/commit/9641031c8470d6843b37516e8807494062f617f0
Disabling VSync either via the in-game options or GPU Software ( in this case AMD Adrenalin Software ) causes massive fluctuations and inconsistencies with frametimes. Capping the framerate does not seem to fix this frametime issue
This issue is further exacerbated on complex maps ( MAP26 of Eviternity and MAP29 of Hellbound ), making the gameplay feels jittery / stuttery . This is something not observed in other sourceports / games in general.
I'm not sure if this an engine issue or an issue on my side, but I've given relevant hardware information at the very end.
Helion https://github.com/Helion-Engine/Helion/commit/9641031c8470d6843b37516e8807494062f617f0, VSync ON![Helion_2024_03_21_02_42_34_813](https://github.com/Helion-Engine/Helion/assets/63714563/e65d3a36-7250-473d-9d5b-501d72e17d05)
Helion https://github.com/Helion-Engine/Helion/commit/9641031c8470d6843b37516e8807494062f617f0, VSync OFF![Helion_2024_03_21_02_42_42_424](https://github.com/Helion-Engine/Helion/assets/63714563/c5e19409-2eee-44dc-ab29-72b7ba467e36)
GZDoom 4.11.3a, VSync OFF![gzdoom_2024_03_21_02_46_23_129](https://github.com/Helion-Engine/Helion/assets/63714563/55fd4f55-495e-420a-8ff8-76ce8fae3e6a)
GZDoom 4.11.3a VSync ON![gzdoom_2024_03_21_02_46_40_222](https://github.com/Helion-Engine/Helion/assets/63714563/5a9c4170-f8ee-4a5a-b590-b08dfe686fd7)
DSDA-Doom 0.27.5 VSync OFF![dsda-doom_2024_03_21_02_48_55_870](https://github.com/Helion-Engine/Helion/assets/63714563/47e5a6a0-99a6-4b6d-adba-1e2fb788e270)
DSDA-Doom 0.27.5, VSync ON![dsda-doom_2024_03_21_02_49_11_835](https://github.com/Helion-Engine/Helion/assets/63714563/b9d41f55-95b3-4bab-90c3-9b6dba851984)
Hardware Information:
Lenovo Ideapad 3 15ALC6 82KU CPU: Ryzen 5 5500u with Vega 7 integrated GPU RAM: Dual Channel 8GB DDR4 Storage: 512GB SSD AMD Driver Version: 23.19.10-240104a-399660C-AMD-Software-Adrenalin-Edition