From 4c443d21150883533335cf6dd2019e813cb3fa05 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Tue, 13 Jun 2023 13:12:37 -0400 Subject: [PATCH] zink: massively shrink qbo size for timestamp queries timestamp queries can only ever record a single value, so the qbo only needs to be large enough for that single value fixes #9092 cc: mesa-stable Part-of: (cherry picked from commit d032de726ae0900c17d1d07f5c20fc901ba0c43f) --- .pick_status.json | 2 +- src/gallium/drivers/zink/zink_query.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 884fb77cdc3..e80627e84ba 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -1093,7 +1093,7 @@ "description": "zink: massively shrink qbo size for timestamp queries", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null }, diff --git a/src/gallium/drivers/zink/zink_query.c b/src/gallium/drivers/zink/zink_query.c index c652272a2fa..abae42e9d40 100644 --- a/src/gallium/drivers/zink/zink_query.c +++ b/src/gallium/drivers/zink/zink_query.c @@ -368,7 +368,7 @@ qbo_append(struct pipe_screen *screen, struct zink_query *query) qbo->buffers[i] = pipe_buffer_create(screen, PIPE_BIND_QUERY_BUFFER, PIPE_USAGE_STAGING, /* this is the maximum possible size of the results in a given buffer */ - NUM_QUERIES * get_num_results(query) * sizeof(uint64_t)); + (query->type == PIPE_QUERY_TIMESTAMP ? 1 : NUM_QUERIES) * get_num_results(query) * sizeof(uint64_t)); if (!qbo->buffers[i]) goto fail; }