One aspect where I think the OpenGL specification lack of completeness is the interoperability between the fixed-function parts and the programmable function parts of the OpenGL pipeline.
GL_AMD_query_buffer_object leverages one aspect of this issue allowing an application to reuse in a shader the result of a query object by storing it into a buffer, instead of having to read it on the CPU side and then submitting it back to the GPU through a uniform variable or uniform buffer. This is ensuring a synchronization-less rendering.
Anther use case of this extension is when an application is making a large number of queries. Instead of quering each individual result, an application can collect these results into a buffer object and then read all the content of this buffer to obtain the results on the application-side doing a single GPU-CPU round-trip.
This extension offers us the luxury of four examples, the following example is a copy of the first one.