[Mesa-dev] ARB_query_buffer_object driver interface
Ilia Mirkin
imirkin at alum.mit.edu
Sat May 2 21:47:59 PDT 2015
Hello,
I've started working on implementing ARB_query_buffer_object, and am
trying to work out the driver interface. I'm thinking something along
these lines:
void (*CheckQuery)(struct gl_context *ctx, struct gl_query_object *q);
void (*WaitQuery)(struct gl_context *ctx, struct gl_query_object *q);
+ void (*StoreQueryResult)(struct gl_context *ctx, struct gl_query_object *q,
+ struct gl_buffer_object *buf, intptr_t offset,
+ bool is64bit, bool wait);
Which would only work for GL_QUERY_RESULT and GL_QUERY_RESULT_NO_WAIT.
The other queries (GL_QUERY_RESULT_AVAILABLE and GL_QUERY_TYPE) would
manually update the buffer using the BufferSubData call. This new call
would only be used for when a buffer is bound.
The alternative would be to also pass in the pname to the driver
backend instead of the wait bool, and have it write in the 1/0 result
for available, and the query type for GL_QUERY_TYPE.
Thoughts?
-ilia
More information about the mesa-dev
mailing list