The OpenGL Pipeline Newsletter - Volume 001
Table of Contents
Previous article: New Texture Functions with Awkward Names to Avoid Ugly Artifacts
Next article: Transitions
Improved synchronization across GPUs and CPUs - No more glFinish!
The Async Working Group recently finished the ARB_sync specification. It provides a synchronization model that enables a CPU to synchronize with a GPU OpenGL command stream across multiple OpenGL contexts and multiple CPU threads. This extension, for example, allows you to find out if OpenGL has finished processing a GL command without calling glFinish. As you know, glFinish
is a heavyweight operation that you really should not call more than once per frame. Calling it is so expensive because it drains all commands that OpenGL has buffered up before resuming processing.
This extension also allows you, for example, to synchronize rendering in one context with rendering in another context without callingglFinish. Say you are rendering to a texture in one context while another context needs to use the result of that rendering. You do this by inserting a fence right after the rendering to texture commands in the one context and waiting for the fence to complete in the other context. Again, there is no need to call glFinish
A link to the actual extension and a discussion are here: http://www.opengl.org/discussion_boards/ubb/ultimatebb.php?ubb=get_topic;f=3;t=014377 Please let us know how you would use this extension, what you think is good about it, and what needs some work.
Currently the Async Working Group is transforming this extension into the new object model that the superbuffers Working Group is working on. We are also starting to look at extending the ARB_sync extension to provide synchronization with, for example, each vertical retrace (vblank) and adding the capability to figure out at what time exactly a fence completed. Another topic on our agenda is to look at so-called ‘predicated rendering.’ Think of this as an occlusion query test, where the result of the test automatically controls whether a set of geometry is rendered by the GPU, without any CPU intervention.
Barthold Lichtenbelt, NVIDIA
Async Working Group Chair