[Mesa-dev] ARB_query_buffer_object driver interface

Kristian Høgsberg krh at bitplanet.net
Sat May 2 22:17:44 PDT 2015

On Sat, May 2, 2015 at 9:47 PM, Ilia Mirkin <imirkin at alum.mit.edu> wrote:
> 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?

Sounds like what I was thinking of doing when I looked at this a bit.
Looks like you have all the info there.


>   -ilia
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev

More information about the mesa-dev mailing list