radeon: scale query buffer size to result size

Performance monitor queries can become very big, especially considering that
instances of a block in different shader engines are queried separately.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
Nicolai Hähnle 2015-11-24 14:54:54 +01:00 committed by Nicolai Hähnle
parent 592928065c
commit b9fc01aee7

View file

@ -232,7 +232,7 @@ void r600_query_hw_destroy(struct r600_common_context *rctx,
static struct r600_resource *r600_new_query_buffer(struct r600_common_context *ctx,
struct r600_query_hw *query)
{
unsigned buf_size = 4096;
unsigned buf_size = MAX2(query->result_size, 4096);
/* Queries are normally read by the CPU after
* being written by the gpu, hence staging is probably a good