SFML community forums
General => General discussions => Topic started by: eigenbom on January 25, 2018, 03:14:49 am
-
Here's a community announcement: If your game is stuttering it may be due to something called Nvidia Threaded Optimisation. See this Stack Overflow thread (https://stackoverflow.com/questions/36959508/nvidia-graphics-driver-causing-noticeable-frame-stuttering/37632948#37632948) for an analysis and solution of the issue. The easier way to fix it is to register an Nvidia profile that disables the optimisation in an installer. The key triggers of this problem for me seemed to be Nvidia Card, OpenGL, Multiple Threads, and FBOs.
There are discussions of this in other threads, but I thought I'd make one focusing on this exact issue. I hope some future SFMLer finds this before tearing all their hair out like I've done. It plagued me for years!
-
While this is true, the real origin of the problem are the GL checks that happen in debug mode.
If you build your application in release mode where the GL checks are removed, the game should run fine even with Nvidia's thread optimization active.
-
Good to know. In my case I encountered the stuttering with the RelWithDebInfo build. Maybe that calls glCheck, I'm not sure.
-
What I really meant was, if SFML_DEBUG is defined, which gets defined when NDEBUG is not defined. Only then will glCheck be used.
See this topic: https://en.sfml-dev.org/forums/index.php?topic=22343.0
-
Thanks for the link.
Unfortunately there's never just one cause of stutter. For instance, I had to heavily patch SFML to remove the multiple render target contexts due to stutter. Disabling those glChecks is certainly something to try.
-
FYI, you can use NVAPI (https://developer.nvidia.com/nvapi) to set a custom profile to force disable threaded optimization for your project.
That setting is pretty controversial and has been for while. I'm not a fan of it being enabled.
-
Anyone know how this affects Macs? I'm on a 2013 Macbook Pro that uses a built-in Intel Iris.
I also find that the game stutters every ten seconds or so, whether the game is running with vSync on or off.
Thanks for the info!
-
Here's a community announcement: If your game is stuttering it may be due to something called avis sur phenq (https://www.outlookindia.com/outlook-spotlight/phenq-avis-meilleure-pilule-de-perte-de-poids-2023-phenq-france-canada-french-2-achet%C3%A9s-1-offert-news-316639) Nvidia Threaded Optimisation. See this Stack Overflow thread[/url] for an analysis and solution of the issue. The easier way to fix it is to register an Nvidia profile that disables the optimisation in an installer. The key triggers of this problem for me seemed to be Nvidia Card, OpenGL, Multiple Threads, and FBOs.
There are this in other threads, but I thought I'd make one focusing on this exact issue. I hope some future SFMLer finds this before tearing all their hair out like I've done. It plagued me for years!
Thanks for the info. Disabling the optimisation in the installer through an Nvidia profile solved my problem.
-
Glad to hear it!