diff options
author | Nicolai Hähnle <[email protected]> | 2015-11-18 11:40:00 +0100 |
---|---|---|
committer | Nicolai Hähnle <[email protected]> | 2015-11-18 12:27:12 +0100 |
commit | 829a9808a98f5b53576c6c8bc5da53182d58e1e8 (patch) | |
tree | e9f535cdca470c3a49de43c206230d144dff4d95 /src/gallium/drivers/radeon/r600_query.h | |
parent | 50cab4788d664769ffc8547d8e759e92d14cf5e6 (diff) |
radeon: add query handler function pointers
The goal here is to be able to move the implementation details of hardware-
specific queries (in particular, performance counters) out of the common code.
Reviewed-by: Marek Olšák <[email protected]>
[Fixed a rebase conflict and re-tested before pushing.]
Diffstat (limited to 'src/gallium/drivers/radeon/r600_query.h')
-rw-r--r-- | src/gallium/drivers/radeon/r600_query.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeon/r600_query.h b/src/gallium/drivers/radeon/r600_query.h index fc8b47b19af..6d568d6fd3b 100644 --- a/src/gallium/drivers/radeon/r600_query.h +++ b/src/gallium/drivers/radeon/r600_query.h @@ -30,6 +30,9 @@ #include "pipe/p_defines.h" +struct r600_common_context; +struct r600_query; + #define R600_QUERY_DRAW_CALLS (PIPE_QUERY_DRIVER_SPECIFIC + 0) #define R600_QUERY_REQUESTED_VRAM (PIPE_QUERY_DRIVER_SPECIFIC + 1) #define R600_QUERY_REQUESTED_GTT (PIPE_QUERY_DRIVER_SPECIFIC + 2) @@ -46,4 +49,13 @@ #define R600_QUERY_NUM_SHADERS_CREATED (PIPE_QUERY_DRIVER_SPECIFIC + 13) #define R600_QUERY_FIRST_PERFCOUNTER (PIPE_QUERY_DRIVER_SPECIFIC + 100) +struct r600_query_ops { + void (*destroy)(struct r600_common_context *, struct r600_query *); + boolean (*begin)(struct r600_common_context *, struct r600_query *); + void (*end)(struct r600_common_context *, struct r600_query *); + boolean (*get_result)(struct r600_common_context *, + struct r600_query *, boolean wait, + union pipe_query_result *result); +}; + #endif /* R600_QUERY_H */ |