diff options
author | Mike Blumenkrantz <[email protected]> | 2020-05-25 10:54:23 -0400 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-07-13 20:59:07 +0000 |
commit | 27defcd20ed895434b6a7d7361fa70c4c5105bd8 (patch) | |
tree | 7603fd7dda544c25826367c3a270bd1298f17813 | |
parent | 3eea7fc88bb046f9a74454f184cc341e770c63f9 (diff) |
zink: use #define for number of queries per-pool
just to ensure we're consistent internally
Reviewed-by: Erik Faye-Lund <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5533>
-rw-r--r-- | src/gallium/drivers/zink/zink_query.c | 10 |
1 files 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) { |