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: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23631>
This commit is contained in:
Mike Blumenkrantz
2023-06-13 13:12:37 -04:00
committed by Marge Bot
parent e816c10638
commit d032de726a
+1 -1
View File
@@ -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;
}