nV News Forums


nV News Forums (http://www.nvnews.net/vbulletin/index.php)
-   NVIDIA Linux (http://www.nvnews.net/vbulletin/forumdisplay.php?f=14)
-   -   glXWaitGL() spins using 100% cpu. (http://www.nvnews.net/vbulletin/showthread.php?t=171374)

rasterman 01-01-12 12:43 AM

glXWaitGL() spins using 100% cpu.
1 Attachment(s)
if you use glXWaitGL() to ensure actual x11 2d draw is complete after a glXSwapBuffers(), then glXWaitGL() will spin in a poll loop consuming as much cpu as it can get its grubby hands on, unlike glXSwapBuffers() alone, which will sleep and release the cpu. i've used glXSwapInterval() to enable vsynced swaps, thus the long pauses/waits. without vsync i also assume it spins instead of sleeping until the hardware lower levels signal that its done with the copy/swap.

i've actually seen this issue for as long as i can remember (years), and it still exists in the 290 drivers.

it's be really nice if glXWaitGL() could behave like glXSwapBuffers() and not poll for power management and simple resource usage reasons. as the logic/code is already there for swapping i would guess it isn't a tall order to move that logic to glXWaitGL() too. :)

All times are GMT -5. The time now is 01:08 AM.

Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2015, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.