Mesa (master): zink: use #define for number of queries per-pool
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Jul 13 21:12:51 UTC 2020
Module: Mesa
Branch: master
Commit: 27defcd20ed895434b6a7d7361fa70c4c5105bd8
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=27defcd20ed895434b6a7d7361fa70c4c5105bd8
Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date: Mon May 25 10:54:23 2020 -0400
zink: use #define for number of queries per-pool
just to ensure we're consistent internally
Reviewed-by: Erik Faye-Lund <erik.faye-lund at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5533>
---
src/gallium/drivers/zink/zink_query.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/src/gallium/drivers/zink/zink_query.c b/src/gallium/drivers/zink/zink_query.c
index f765692875e..1b37f89f74b 100644
--- a/src/gallium/drivers/zink/zink_query.c
+++ b/src/gallium/drivers/zink/zink_query.c
@@ -11,6 +11,8 @@
#include "util/u_inlines.h"
#include "util/u_memory.h"
+#define NUM_QUERIES 50
+
struct zink_query {
enum pipe_query_type type;
@@ -74,7 +76,7 @@ zink_create_query(struct pipe_context *pctx,
if (query->vkqtype == -1)
return NULL;
- query->num_queries = query_type == PIPE_QUERY_TIMESTAMP ? 1 : 100;
+ query->num_queries = query_type == PIPE_QUERY_TIMESTAMP ? 1 : NUM_QUERIES;
query->curr_query = 0;
pool_create.sType = VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO;
@@ -186,9 +188,9 @@ get_query_result(struct pipe_context *pctx,
if (query->use_64bit)
flags |= VK_QUERY_RESULT_64_BIT;
- // TODO: handle curr_query > 100
- // union pipe_query_result results[100];
- uint64_t results[100];
+ // union pipe_query_result results[NUM_QUERIES * 2];
+ /* xfb queries return 2 results */
+ uint64_t results[NUM_QUERIES * 2];
memset(results, 0, sizeof(results));
int num_results = query->curr_query - query->last_checked_query;
if (query->vkqtype == VK_QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT) {
More information about the mesa-commit
mailing list