diff options
Diffstat (limited to 'src/gallium/drivers/radeon')
-rw-r--r-- | src/gallium/drivers/radeon/r600_pipe_common.c | 10 | ||||
-rw-r--r-- | src/gallium/drivers/radeon/r600_query.c | 3 |
2 files changed, 9 insertions, 4 deletions
diff --git a/src/gallium/drivers/radeon/r600_pipe_common.c b/src/gallium/drivers/radeon/r600_pipe_common.c index dae236943c1..b26dd9290d0 100644 --- a/src/gallium/drivers/radeon/r600_pipe_common.c +++ b/src/gallium/drivers/radeon/r600_pipe_common.c @@ -291,8 +291,9 @@ bool r600_common_context_init(struct r600_common_context *rctx, r600_query_init(rctx); cayman_init_msaa(&rctx->b); - rctx->allocator_so_filled_size = u_suballocator_create(&rctx->b, 4096, 4, - 0, PIPE_USAGE_DEFAULT, TRUE); + rctx->allocator_so_filled_size = + u_suballocator_create(&rctx->b, rscreen->info.gart_page_size, + 4, 0, PIPE_USAGE_DEFAULT, TRUE); if (!rctx->allocator_so_filled_size) return false; @@ -845,8 +846,11 @@ static void r600_query_memory_info(struct pipe_screen *screen, struct pipe_resource *r600_resource_create_common(struct pipe_screen *screen, const struct pipe_resource *templ) { + struct r600_common_screen *rscreen = (struct r600_common_screen*)screen; + if (templ->target == PIPE_BUFFER) { - return r600_buffer_create(screen, templ, 4096); + return r600_buffer_create(screen, templ, + rscreen->info.gart_page_size); } else { return r600_texture_create(screen, templ); } diff --git a/src/gallium/drivers/radeon/r600_query.c b/src/gallium/drivers/radeon/r600_query.c index 38c7026a784..9f12ccd278c 100644 --- a/src/gallium/drivers/radeon/r600_query.c +++ b/src/gallium/drivers/radeon/r600_query.c @@ -262,7 +262,8 @@ 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 = MAX2(query->result_size, 4096); + unsigned buf_size = MAX2(query->result_size, + ctx->screen->info.gart_page_size); /* Queries are normally read by the CPU after * being written by the gpu, hence staging is probably a good |