Mesa (master): radeon: scale query buffer size to result size
Nicolai Hähnle
nh at kemper.freedesktop.org
Wed Nov 25 14:59:37 UTC 2015
Module: Mesa
Branch: master
Commit: b9fc01aee75dcc2d56750ea430e32d74127faf69
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=b9fc01aee75dcc2d56750ea430e32d74127faf69
Author: Nicolai Hähnle <nhaehnle at gmail.com>
Date: Tue Nov 24 14:54:54 2015 +0100
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 at amd.com>
---
src/gallium/drivers/radeon/r600_query.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/gallium/drivers/radeon/r600_query.c b/src/gallium/drivers/radeon/r600_query.c
index b1cfb6e..38bbbbf 100644
--- a/src/gallium/drivers/radeon/r600_query.c
+++ b/src/gallium/drivers/radeon/r600_query.c
@@ -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
More information about the mesa-commit
mailing list