From 9dc9d0030ac638247353edb23a5c47b332379ab4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Sat, 14 May 2011 00:21:44 +0200 Subject: [PATCH] r300g: allocate smaller upload buffers --- src/gallium/drivers/r300/r300_context.c | 2 +- src/gallium/drivers/r300/r300_defines.h | 2 +- src/gallium/drivers/r300/r300_render.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/r300/r300_context.c b/src/gallium/drivers/r300/r300_context.c index 0554c40..9241d02 100644 --- a/src/gallium/drivers/r300/r300_context.c +++ b/src/gallium/drivers/r300/r300_context.c @@ -437,7 +437,7 @@ struct pipe_context* r300_create_context(struct pipe_screen* screen, r300_init_state_functions(r300); r300_init_resource_functions(r300); - r300->vbuf_mgr = u_vbuf_mgr_create(&r300->context, 1024 * 1024, 16, + r300->vbuf_mgr = u_vbuf_mgr_create(&r300->context, 32 * 1024, 16, PIPE_BIND_VERTEX_BUFFER | PIPE_BIND_INDEX_BUFFER, U_VERTEX_FETCH_DWORD_ALIGNED); diff --git a/src/gallium/drivers/r300/r300_defines.h b/src/gallium/drivers/r300/r300_defines.h index 30e9bef..8851099 100644 --- a/src/gallium/drivers/r300/r300_defines.h +++ b/src/gallium/drivers/r300/r300_defines.h @@ -26,7 +26,7 @@ #include "pipe/p_defines.h" #define R300_MAX_TEXTURE_LEVELS 13 -#define R300_MAX_DRAW_VBO_SIZE (1024 * 1024) +#define R300_MAX_DRAW_VBO_SIZE (32 * 1024) #define R300_RESOURCE_FLAG_TRANSFER PIPE_RESOURCE_FLAG_DRV_PRIV diff --git a/src/gallium/drivers/r300/r300_render.c b/src/gallium/drivers/r300/r300_render.c index 429b855..e1cc2c3 100644 --- a/src/gallium/drivers/r300/r300_render.c +++ b/src/gallium/drivers/r300/r300_render.c @@ -1128,7 +1128,7 @@ static struct vbuf_render* r300_render_create(struct r300_context* r300) r300render->r300 = r300; - r300render->base.max_vertex_buffer_bytes = 1024 * 1024; + r300render->base.max_vertex_buffer_bytes = R300_MAX_DRAW_VBO_SIZE; r300render->base.max_indices = 16 * 1024; r300render->base.get_vertex_info = r300_render_get_vertex_info; -- 1.7.4.1