From: Mike Blumenkrantz Date: Tue, 13 Jun 2023 17:12:37 +0000 (-0400) Subject: zink: massively shrink qbo size for timestamp queries X-Git-Tag: upstream/23.3.3~7056 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d032de726ae0900c17d1d07f5c20fc901ba0c43f;p=platform%2Fupstream%2Fmesa.git 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: --- diff --git a/src/gallium/drivers/zink/zink_query.c b/src/gallium/drivers/zink/zink_query.c index e7fe5e6..640ea6c 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; }