diff options
author | Christian Gmeiner <[email protected]> | 2017-09-19 18:16:04 +0200 |
---|---|---|
committer | Christian Gmeiner <[email protected]> | 2017-09-20 14:25:13 +0200 |
commit | a3d79946e5d815a40a448e7d473dd68b91d1c635 (patch) | |
tree | 28021ad4da270cb38049ae8e91342395a5e42fb7 /src/gallium/drivers/etnaviv/etnaviv_query.c | |
parent | 65a09f98ad1411982ce68de7a2d05942d608e674 (diff) |
etnaviv: move sw get_driver_query_info(..)
This change makes etna_get_driver_query_info(..) more generic
and puts the knowledge of supported queries directly besides
the implementation.
Signed-off-by: Christian Gmeiner <[email protected]>
Reviewed-by: Wladimir J. van der Laan <[email protected]>
Diffstat (limited to 'src/gallium/drivers/etnaviv/etnaviv_query.c')
-rw-r--r-- | src/gallium/drivers/etnaviv/etnaviv_query.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/src/gallium/drivers/etnaviv/etnaviv_query.c b/src/gallium/drivers/etnaviv/etnaviv_query.c index 617e47562d6..16adb8c21fc 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_query.c +++ b/src/gallium/drivers/etnaviv/etnaviv_query.c @@ -81,21 +81,12 @@ static int etna_get_driver_query_info(struct pipe_screen *pscreen, unsigned index, struct pipe_driver_query_info *info) { - struct pipe_driver_query_info list[] = { - {"prims-emitted", PIPE_QUERY_PRIMITIVES_EMITTED, { 0 }}, - {"draw-calls", ETNA_QUERY_DRAW_CALLS, { 0 }}, - {"rs-operations", ETNA_QUERY_RS_OPERATIONS, { 0 }}, - }; + int nr_sw_queries = etna_sw_get_driver_query_info(pscreen, 0, NULL); if (!info) - return ARRAY_SIZE(list); + return nr_sw_queries; - if (index >= ARRAY_SIZE(list)) - return 0; - - *info = list[index]; - - return 1; + return etna_sw_get_driver_query_info(pscreen, index, info); } static void |