diff options
author | Christian Gmeiner <[email protected]> | 2017-10-08 22:00:07 +0200 |
---|---|---|
committer | Christian Gmeiner <[email protected]> | 2017-10-09 22:19:47 +0200 |
commit | 148604fe758717c4668073c6a70f2c8467aea208 (patch) | |
tree | 2cf6f69954ab16bb354c326a8b1b12e89d7b5de1 | |
parent | b22bacc6cfd17d785d12bb3f75094a7b8a0e3221 (diff) |
etnaviv: call util_query_clear_result(..) in the generic layer
Saves us from calling util_query_clear_result(..) in every query
type implementation.
Signed-off-by: Christian Gmeiner <[email protected]>
Reviewed-by: Wladimir J. van der Laan <[email protected]>
-rw-r--r-- | src/gallium/drivers/etnaviv/etnaviv_query.c | 3 | ||||
-rw-r--r-- | src/gallium/drivers/etnaviv/etnaviv_query_sw.c | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/gallium/drivers/etnaviv/etnaviv_query.c b/src/gallium/drivers/etnaviv/etnaviv_query.c index 089a26e6fda..a416a7cb0f3 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_query.c +++ b/src/gallium/drivers/etnaviv/etnaviv_query.c @@ -26,6 +26,7 @@ */ #include "pipe/p_screen.h" +#include "util/u_inlines.h" #include "etnaviv_context.h" #include "etnaviv_query.h" @@ -89,6 +90,8 @@ etna_get_query_result(struct pipe_context *pctx, struct pipe_query *pq, if (q->active) return false; + util_query_clear_result(result, q->type); + return q->funcs->get_query_result(etna_context(pctx), q, wait, result); } diff --git a/src/gallium/drivers/etnaviv/etnaviv_query_sw.c b/src/gallium/drivers/etnaviv/etnaviv_query_sw.c index 7b93339377a..ea79467b614 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_query_sw.c +++ b/src/gallium/drivers/etnaviv/etnaviv_query_sw.c @@ -27,7 +27,6 @@ #include "os/os_time.h" #include "pipe/p_state.h" -#include "util/u_inlines.h" #include "util/u_memory.h" #include "util/u_string.h" @@ -81,7 +80,6 @@ etna_sw_get_query_result(struct etna_context *ctx, struct etna_query *q, { struct etna_sw_query *sq = etna_sw_query(q); - util_query_clear_result(result, q->type); result->u64 = sq->end_value - sq->begin_value; return true; |