[Mesa-dev] [PATCH] gallium/docs: clarify get_query_result()
Roland Scheidegger
sroland at vmware.com
Tue May 13 09:12:58 PDT 2014
Am 13.05.2014 04:21, schrieb Rob Clark:
> From: Rob Clark <robclark at freedesktop.org>
>
> It wasn't completely clear from the docs, so I had to figure out by
> looking at piglit results. Hopefully this saves the next driver writer
> implementing queries some time.
>
> Signed-off-by: Rob Clark <robclark at freedesktop.org>
> ---
> src/gallium/docs/source/context.rst | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/src/gallium/docs/source/context.rst b/src/gallium/docs/source/context.rst
> index fc8dd16..9278796 100644
> --- a/src/gallium/docs/source/context.rst
> +++ b/src/gallium/docs/source/context.rst
> @@ -307,6 +307,10 @@ returned). Otherwise, if the ``wait`` parameter is FALSE, the call
> will not block and the return value will be TRUE if the query has
> completed or FALSE otherwise.
>
> +``get_query_result`` (if it returns TRUE) will clear/reset previous query
> +results. In other words, subsequent calls to ``get_query_result`` will
> +only return results since the previous call.
> +
> The interface currently includes the following types of queries:
>
> ``PIPE_QUERY_OCCLUSION_COUNTER`` counts the number of fragments which
>
I don't understand this wording. get_query_result itself does not change
the query result itself in any way, shape or form (the result is
completely determined at end_query time, though of course at this time
it may not be ready yet). Thus you can naturally call get_query_result
as much as you want and you should always get the same value back (once
it returns true if you didn't block).
Roland
More information about the mesa-dev
mailing list