[Mesa-dev] [PATCH 3/4] radeon: wire end_query return value to sw/hw_end

Nicolai Hähnle nhaehnle at gmail.com
Wed Apr 20 15:43:45 UTC 2016


From: Nicolai Hähnle <nicolai.haehnle at amd.com>

---
 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 813885b..e5e032b 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 9f3a917..3b8fbe6 100644
--- a/src/gallium/drivers/radeon/r600_query.h
+++ b/src/gallium/drivers/radeon/r600_query.h
@@ -69,7 +69,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);
@@ -139,7 +139,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.5.0



More information about the mesa-dev mailing list