We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 5189 - High CPU usage with VSync
Summary: High CPU usage with VSync
Status: NEW
Alias: None
Product: SDL
Classification: Unclassified
Component: render (show other bugs)
Version: don't know
Hardware: Other Other
: P2 major
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-06-14 19:28 UTC by Andreas
Modified: 2020-06-15 05:01 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas 2020-06-14 19:28:17 UTC
High CPU usage on call to SDL_GL_SwapWindow when SDL_GL_SetSwapInterval(1) is set:

https://stackoverflow.com/questions/62373762/high-cpu-usage-with-vsync-turned-on-in-opengl-and-sdl2-application
Comment 1 Cameron Gutman 2020-06-14 20:29:55 UTC
We're going to need more than that to debug:

- OS
- GPU hardware
- GPU driver version

If I had to guess, I'd say you're on Linux using the NVIDIA proprietary drivers, and that your problem is that you should try setting __GL_YIELD to USLEEP.
Comment 2 Ashfaaq 2020-06-15 05:01:50 UTC
@Andreas thanks for posting this here, im not sure if this is a bug or not yet. So on to the problem, @Cameron i posted the problem in stackoverflow. The specs of my system are,
OS: windows 7
GPU hardware: gtx 750
GPU driver: 446.14