Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Game stuttering? It could be Nvidia Threaded Optimisation.  (Read 9655 times)

0 Members and 2 Guests are viewing this topic.

eigenbom

  • Full Member
  • ***
  • Posts: 228
    • View Profile
Game stuttering? It could be Nvidia Threaded Optimisation.
« 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 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!

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11034
    • View Profile
    • development blog
    • Email
Re: Game stuttering? It could be Nvidia Threaded Optimisation.
« Reply #1 on: January 25, 2018, 07:37:04 am »
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.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

eigenbom

  • Full Member
  • ***
  • Posts: 228
    • View Profile
Re: Game stuttering? It could be Nvidia Threaded Optimisation.
« Reply #2 on: January 25, 2018, 09:44:47 am »
Good to know. In my case I encountered the stuttering with the RelWithDebInfo build. Maybe that calls glCheck, I'm not sure.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11034
    • View Profile
    • development blog
    • Email
Re: Game stuttering? It could be Nvidia Threaded Optimisation.
« Reply #3 on: January 25, 2018, 10:07:11 am »
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
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

eigenbom

  • Full Member
  • ***
  • Posts: 228
    • View Profile
Re: Game stuttering? It could be Nvidia Threaded Optimisation.
« Reply #4 on: January 25, 2018, 11:38:20 am »
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.

anthnich

  • Newbie
  • *
  • Posts: 34
    • View Profile
    • Long Division LLC
Re: Game stuttering? It could be Nvidia Threaded Optimisation.
« Reply #5 on: January 26, 2018, 06:23:54 am »
FYI, you can use 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.

willm127

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: Game stuttering? It could be Nvidia Threaded Optimisation.
« Reply #6 on: February 20, 2018, 08:02:58 am »
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!

FredSteadman

  • Newbie
  • *
  • Posts: 1
    • View Profile
    • Phenq Result
Re: Game stuttering? It could be Nvidia Threaded Optimisation.
« Reply #7 on: August 22, 2018, 01:06:55 pm »
Here's a community announcement: If your game is stuttering it may be due to something called avis sur phenq 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.
« Last Edit: October 02, 2023, 01:59:13 pm by FredSteadman »

eigenbom

  • Full Member
  • ***
  • Posts: 228
    • View Profile
Re: Game stuttering? It could be Nvidia Threaded Optimisation.
« Reply #8 on: August 25, 2018, 05:29:06 am »
Glad to hear it!

 

anything