This patchset doesn't actually add any hardware support. I want to see what people think of this interface, and would like to adjust it before I do an implementation on nvc0. TBH, I can't say I really love either the dd nor the gallium functions I'm adding. However I also can't think of a particularly cleaner way of doing this.
I had an original version of this code which unconditionally wrote a 1 for GL_QUERY_AVAILABLE, but my latest thinking is that you could potentially have totally unsynchronized engines that were writing these things out, and so for a query to not be available is something that could legitimately make sense. So I'm leaving that up to the driver. Also for consistency, I'm having the (mesa) driver write the GL_QUERY_TARGET value in rather than the core, as it's unwieldy to do it in the core. A hypothetical driver might also want to do or not do various synchronization. As there's no HW support, this is wholly untested beyond compilation. Ilia Mirkin (5): mesa: add driver interface for writing query results to buffers mesa: add core implementation of ARB_query_buffer_object gallium: add a way to store query result into buffer gallium: add PIPE_CAP_QUERY_BUFFER_OBJECT st/mesa: add query buffer support Rafal Mielniczuk (4): glapi: Add xml infrastructure for ARB_query_buffer_object mesa: Add ARB_query_buffer_object extension flag mesa: Add QueryBuffer to context mesa: Handle QUERY_BUFFER_BINDING in GetIntegerv src/gallium/docs/source/context.rst | 5 + src/gallium/docs/source/screen.rst | 2 + src/gallium/drivers/freedreno/freedreno_screen.c | 1 + src/gallium/drivers/ilo/ilo_screen.c | 1 + src/gallium/drivers/llvmpipe/lp_screen.c | 1 + src/gallium/drivers/nouveau/nv30/nv30_screen.c | 1 + src/gallium/drivers/nouveau/nv50/nv50_screen.c | 1 + src/gallium/drivers/nouveau/nvc0/nvc0_screen.c | 1 + src/gallium/drivers/r300/r300_screen.c | 1 + src/gallium/drivers/r600/r600_pipe.c | 1 + src/gallium/drivers/radeonsi/si_pipe.c | 1 + src/gallium/drivers/softpipe/sp_screen.c | 1 + src/gallium/drivers/svga/svga_screen.c | 1 + src/gallium/drivers/vc4/vc4_screen.c | 1 + src/gallium/drivers/virgl/virgl_screen.c | 1 + src/gallium/include/pipe/p_context.h | 24 ++ src/gallium/include/pipe/p_defines.h | 3 + src/mapi/glapi/gen/gl_API.xml | 9 +- src/mesa/main/bufferobj.c | 14 ++ src/mesa/main/dd.h | 9 + src/mesa/main/extensions_table.h | 1 + src/mesa/main/get.c | 5 + src/mesa/main/get_hash_params.py | 3 + src/mesa/main/mtypes.h | 3 + src/mesa/main/queryobj.c | 280 +++++++++++------------ src/mesa/state_tracker/st_cb_bufferobjects.c | 3 + src/mesa/state_tracker/st_cb_queryobj.c | 100 +++++++- src/mesa/state_tracker/st_cb_texturebarrier.c | 3 + src/mesa/state_tracker/st_extensions.c | 1 + 29 files changed, 328 insertions(+), 150 deletions(-) -- 2.4.10 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev