gallium/radeon: use smaller buffers for query results
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Tue, 27 Sep 2016 14:52:42 +0000 (16:52 +0200)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Thu, 29 Sep 2016 09:24:56 +0000 (11:24 +0200)
Most of the time, even the 512 bytes that we now get is more than sufficient
(pipeline stats queries are the largest at 184 bytes per shot).

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/drivers/radeon/r600_query.c

index 958cef9..429ea6a 100644 (file)
@@ -331,7 +331,7 @@ static struct r600_resource *r600_new_query_buffer(struct r600_common_context *c
                                                   struct r600_query_hw *query)
 {
        unsigned buf_size = MAX2(query->result_size,
-                                ctx->screen->info.gart_page_size);
+                                ctx->screen->info.min_alloc_size);
 
        /* Queries are normally read by the CPU after
         * being written by the gpu, hence staging is probably a good