From b222580578ad4236f6b7fe15f50fa46b56086902 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Nicolai=20H=C3=A4hnle?= Date: Wed, 20 Apr 2016 09:43:09 -0500 Subject: [PATCH] radeon: wire end_query return value to sw/hw_end MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reviewed-by: Marek Olšák --- src/gallium/drivers/radeon/r600_query.c | 13 ++++++++----- src/gallium/drivers/radeon/r600_query.h | 4 ++-- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/gallium/drivers/radeon/r600_query.c b/src/gallium/drivers/radeon/r600_query.c index e3b9de087dd..6e53c76ae55 100644 --- a/src/gallium/drivers/radeon/r600_query.c +++ b/src/gallium/drivers/radeon/r600_query.c @@ -113,7 +113,7 @@ static boolean r600_query_sw_begin(struct r600_common_context *rctx, return TRUE; } -static void r600_query_sw_end(struct r600_common_context *rctx, +static bool r600_query_sw_end(struct r600_common_context *rctx, struct r600_query *rquery) { struct r600_query_sw *query = (struct r600_query_sw *)rquery; @@ -161,6 +161,8 @@ static void r600_query_sw_end(struct r600_common_context *rctx, default: unreachable("r600_query_sw_end: bad query type"); } + + return true; } static boolean r600_query_sw_get_result(struct r600_common_context *rctx, @@ -730,12 +732,11 @@ static bool r600_end_query(struct pipe_context *ctx, struct pipe_query *query) struct r600_common_context *rctx = (struct r600_common_context *)ctx; struct r600_query *rquery = (struct r600_query *)query; - rquery->ops->end(rctx, rquery); - return true; + return rquery->ops->end(rctx, rquery); } -void r600_query_hw_end(struct r600_common_context *rctx, - struct r600_query *rquery) +bool r600_query_hw_end(struct r600_common_context *rctx, + struct r600_query *rquery) { struct r600_query_hw *query = (struct r600_query_hw *)rquery; @@ -746,6 +747,8 @@ void r600_query_hw_end(struct r600_common_context *rctx, if (!(query->flags & R600_QUERY_HW_FLAG_NO_START)) LIST_DELINIT(&query->list); + + return true; } static unsigned r600_query_read_result(void *map, unsigned start_index, unsigned end_index, diff --git a/src/gallium/drivers/radeon/r600_query.h b/src/gallium/drivers/radeon/r600_query.h index 6bb9374235d..b4f069f50ce 100644 --- a/src/gallium/drivers/radeon/r600_query.h +++ b/src/gallium/drivers/radeon/r600_query.h @@ -72,7 +72,7 @@ enum { 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 *); + bool (*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); @@ -142,7 +142,7 @@ void r600_query_hw_destroy(struct r600_common_context *rctx, struct r600_query *rquery); boolean r600_query_hw_begin(struct r600_common_context *rctx, struct r600_query *rquery); -void r600_query_hw_end(struct r600_common_context *rctx, +bool r600_query_hw_end(struct r600_common_context *rctx, struct r600_query *rquery); boolean r600_query_hw_get_result(struct r600_common_context *rctx, struct r600_query *rquery, -- 2.30.2