diff options
author | Ilia Mirkin <[email protected]> | 2015-05-02 20:28:11 -0400 |
---|---|---|
committer | Ilia Mirkin <[email protected]> | 2016-02-04 21:21:30 -0500 |
commit | 40d7f02c67ed16f4894137757683475f837a3b4f (patch) | |
tree | 85857200b59e1673d38caf222d9fd292c3c2adab /src/gallium/include/pipe/p_context.h | |
parent | 386a9ec77b7113c1e0c29c30b981a50175ac16e8 (diff) |
gallium: add a way to store query result into buffer
Signed-off-by: Ilia Mirkin <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/include/pipe/p_context.h')
-rw-r--r-- | src/gallium/include/pipe/p_context.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/gallium/include/pipe/p_context.h b/src/gallium/include/pipe/p_context.h index f69a75be50e..6c95b7b2178 100644 --- a/src/gallium/include/pipe/p_context.h +++ b/src/gallium/include/pipe/p_context.h @@ -150,6 +150,28 @@ struct pipe_context { struct pipe_query *q, boolean wait, union pipe_query_result *result); + + /** + * Get results of a query, storing into resource. Note that this may not + * be used with batch queries. + * + * \param wait if true, this query will block until the result is ready + * \param result_type the type of the value being stored: + * \param index for queries that return multiple pieces of data, which + * item of that data to store (e.g. for + * PIPE_QUERY_PIPELINE_STATISTICS). + * When the index is -1, instead of the value of the query + * the driver should instead write a 1/0 to the appropriate + * location with 1 meaning that the query result is available. + */ + void (*get_query_result_resource)(struct pipe_context *pipe, + struct pipe_query *q, + boolean wait, + enum pipe_query_value_type result_type, + int index, + struct pipe_resource *resource, + unsigned offset); + /*@}*/ /** |