Mirkin this afternoon posted a second version of his ARB_query_buffer_object support for core Mesa, Gallium3D, and is all hooked up for the Nouveau NVC0 driver for Fermi and newer. This second revision addresses the comments from the initial patch series.
ARB_query_buffer_object is needed for OpenGL 4.4 and explained via the OpenGL.org registry as "a mechanism whereby the result of a query object may be retrieved into a buffer object instead of client memory. This allows the query result to be made available to a shader without a round-trip to the CPU for example by subsequently using the buffer object as a uniform buffer, texture buffer or other data store visible to the shader. This functionality may also be used to place the results of many query objects into a single, large buffer and then map or otherwise read back the entire buffer at a later point in time, avoiding a per-query object CPU-GPU synchronization event."
These latest Mesa patches for now can be found on the Mesa-dev list but will hopefully wind up in Mesa Git soon enough.