PDA

View Full Version : Fence_NV, glGets, and performance



Korval
03-18-2001, 03:52 PM
I've got a question about NVIDIA's fence_NV extension.

I understand exactly what it does. And I understand that glGet* functions are typically performance killers. The question is: does glTestFenceNV count as a glGet as far as performance goes? Would it be a good idea, performance wise, to call glTestFenceNV several times per frame in the rendering loop?

It would be very useful if the test were fast, since it would allow me to do more as far as CPU/GPU synchronization. glFinishFenceNV simply blocks the processor until the GPU hits the fence in question, which eats up CPU time that could be put to better uses. The hope would be to keep the renderer rendering as much as possible, and glTestFenceNV is pretty much the only way to tell where the graphics chip is in rendering.

mcraighead
03-18-2001, 09:27 PM
Tests are fairly fast (but not extremely fast). Testing too often is bad, but you should really be more worried about _inserting_ too many fences, i.e., calling SetFence too often.

- Matt

Korval
03-19-2001, 07:37 AM
Sounds good. Thank you.