Icon of Sin / Baphomet
User Control Panel | Member List | FAQ | Privacy Policy | Blogs | Search Forums | Forums Home
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Classic Doom > Source Ports > Vsync = 100% CPU usage
 
Author
All times are GMT. The time now is 01:10. Post New Thread    Post A Reply
entryway
Forum Staple


Posts: 2796
Registered: 01-04


VSync = 100% CPU core usage even on MAP01. Why does it happen?

On 2 cores system:
PrBoom-Plus without VSync -> 1500fps -> 50% CPU usage
PrBoom-Plus + VSync -> also 50% CPU usage :(
PrBoom-Plus + VSync + forcing one core with SetProcessAffinityMask -> 5% CPU, lol

GZDoom with VSync -> 50% CPU

Forcing one core 'fixes' high CPU usage. WTF?

Simple test application also works as intended when VSync is enabled - about 5% loading

Old Post Feb 17 2013 20:19 #
entryway is offline || Blog || PM || Post History || Add Buddy IP || Edit || Quote
Graf Zahl
Won the popularity contest


Posts: 8756
Registered: 01-03


My guess is it's a driver issue. Maybe it actively waits inside the driver if it runs on multiple cores.

Old Post Feb 17 2013 20:59 #
Graf Zahl is online now || Blog || PM || Post History || Add Buddy IP || Edit || Quote
entryway
Forum Staple


Posts: 2796
Registered: 01-04



Graf Zahl said:
My guess is it's a driver issue. Maybe it actively waits inside the driver if it runs on multiple cores.

But it does not affect my simple application. Only 1-2% CPU usage there.

This code also does not help.
code:
D_Display() { glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); SDL_GL_SwapBuffers(); }

Last edited by entryway on Feb 17 2013 at 21:20

Old Post Feb 17 2013 21:05 #
entryway is offline || Blog || PM || Post History || Add Buddy IP || Edit || Quote
entryway
Forum Staple


Posts: 2796
Registered: 01-04



entryway said:
But it does not affect my simple application. Only 1-2% CPU usage there.

By some reasons now it also takes 50%, heh.

Old Post Feb 17 2013 21:44 #
entryway is offline || Blog || PM || Post History || Add Buddy IP || Edit || Quote
Maes
Here's an old post I made on the subject,


Posts: 14807
Registered: 07-06


AFAIK, unless your application does nothing but passive OS event dispatching/handling, it WILL use all the power of a core unless you include a command explicitly yielding thread control back to the OS.

Now, VSYNC waiting might or might not do just that depending on the implementation at the driver or even at the SDL-driver interaction level.

Old Post Feb 18 2013 09:58 #
Maes is online now || Blog || PM || Post History || Add Buddy IP || Edit || Quote
printz
CRAZY DUMB ZEALOT


Posts: 9782
Registered: 06-06


Does lack of vertical synchronization get noticed by the human eyes?

__________________
Top /idgames WADs Automatic Wolfenstein - Version 1.0.1 - also on Android (Updated 28/03/2015)
Games seem to attract children and manchildren with childish screen names acting like children or teenagers.

Old Post Feb 18 2013 13:09 #
printz is offline Twitter account Youtube Github || Blog || PM || Post History || Add Buddy IP || Edit || Quote
Mr. T
Senior Member


Posts: 1476
Registered: 12-03



printz said:
Does lack of vertical synchronization get noticed by the human eyes?

Vsync off = https://en.wikipedia.org/wiki/Screen_tearing

Old Post Feb 18 2013 13:28 #
Mr. T is offline || Blog || PM || Post History || Add Buddy IP || Edit || Quote
schwerpunk
Senior Member


Posts: 2209
Registered: 05-12


I actually like the horizontal banding effect (from lack of Vsynch) that goes on during a sustained earthquake.

As an aside, the lack of Vsynch is very noticeable in the ZDoom map I'm presently working on for the monochrome project, where I've made a damage sector that flashes between 255 and 32 light level in 1 tic (!). I'd take a screenshot, but well, screenshots don't work that way. :P

Old Post Feb 18 2013 13:51 #
schwerpunk is offline || Blog || PM || Post History || Add Buddy IP || Edit || Quote
All times are GMT. The time now is 01:10. Post New Thread    Post A Reply
 
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Classic Doom > Source Ports > Vsync = 100% CPU usage

Show Printable Version | Email this Page | Subscribe to this Thread

 

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are OFF
[IMG] code is ON
 

< Contact Us - Doomworld >

Powered by vBulletin
Copyright vBulletin Solutions, Inc.