Is glFinish a spin or a relinquish on nvidia

Using the 5.3.8.1 driver on a Quadro fx1000 go. Whenever I put in a glFinish in my main frame rendering loop the cpu goes to 100% utilisation. I am running with vysnc enabled and would normally put a glFinish as the first command on my rendering pass and a swapbuffers as the last. The idea is to synchronise the issue of rendering commands to the backbuffer whilst the monitor is sweeping the vertical raster. If I take out the glFinish the cpu utilisation goes down to something reasonable. Presumably in this case my app is blocking at some random point in the rendering process as the GPU pipeline fills.

Does anyone know what is going on here? I find it hard to believe that glFinish has been implemented as a CPU spin and not as proper scheduler wait. Is this a windows or an nvidia issue.

Roger

From a benchmark point of view, spin is better. And guess what? People love benchmarks these days. But for a professional product like a Quadro, I admit this choice is rather strange. But even Quadros and FireGLs are now tested by tomshardware and others, with their marvelous benchmark procedures…

Originally posted by kehziah:
From a benchmark point of view, spin is better. And guess what? People love benchmarks these days. But for a professional product like a Quadro, I admit this choice is rather strange. But even Quadros and FireGLs are now tested by tomshardware and others, with their marvelous benchmark procedures…
I can see your point. Sorry to be picky, but I was looking for an answer :slight_smile: . Can you confirm that glFinish is in fact a spin? If it is have you any idea how I can get round it?

I have worked around this problem using an occlusion query and polling it’s completion in a millisecond sleep loop. It can take up to one millisecond longer than a glFinish but it doesn’t waste CPU.

Originally posted by rogerjames99:
I can see your point. Sorry to be picky, but I was looking for an answer :slight_smile: . Can you confirm that glFinish is in fact a spin? If it is have you any idea how I can get round it?
Well, I’m not writing drivers at NVIDIA, so I can’t confirm anything regarding their implementation. :wink:
You could get around your problem with the NV_fence extension , assuming you’re only targeting NVIDIA hardware.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.