summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/r300/r300_context.c
diff options
context:
space:
mode:
authorMarek Olšák <maraeo@gmail.com>2011-02-08 16:34:22 +0100
committerMarek Olšák <maraeo@gmail.com>2011-02-08 16:35:02 +0100
commitb541a3c4c0a125087fa9e1e0d35db019c36fb0e9 (patch)
treedfb8c174ddd5518b1356aa5e0cc502ddc6c4464e /src/gallium/drivers/r300/r300_context.c
parent467023e8080489abeff53e18ac83560eaf851827 (diff)
r300g: use the same upload buffer for vertices and indices
Diffstat (limited to 'src/gallium/drivers/r300/r300_context.c')
-rw-r--r--src/gallium/drivers/r300/r300_context.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/src/gallium/drivers/r300/r300_context.c b/src/gallium/drivers/r300/r300_context.c
index 7e0c068ff3..c6e03050fc 100644
--- a/src/gallium/drivers/r300/r300_context.c
+++ b/src/gallium/drivers/r300/r300_context.c
@@ -104,8 +104,6 @@ static void r300_destroy_context(struct pipe_context* context)
if (r300->vbuf_mgr)
u_vbuf_mgr_destroy(r300->vbuf_mgr);
- if (r300->upload_ib)
- u_upload_destroy(r300->upload_ib);
/* XXX: This function assumes r300->query_list was initialized */
r300_release_referenced_objects(r300);
@@ -434,8 +432,9 @@ struct pipe_context* r300_create_context(struct pipe_screen* screen,
r300_init_resource_functions(r300);
r300->vbuf_mgr = u_vbuf_mgr_create(&r300->context, 1024 * 1024, 16,
- PIPE_BIND_VERTEX_BUFFER,
- U_VERTEX_FETCH_DWORD_ALIGNED);
+ PIPE_BIND_VERTEX_BUFFER |
+ PIPE_BIND_INDEX_BUFFER,
+ U_VERTEX_FETCH_DWORD_ALIGNED);
if (!r300->vbuf_mgr)
goto fail;
@@ -453,13 +452,6 @@ struct pipe_context* r300_create_context(struct pipe_screen* screen,
if (!r300_hyperz_init_mm(r300))
goto fail;
- r300->upload_ib = u_upload_create(&r300->context,
- 64 * 1024, 16,
- PIPE_BIND_INDEX_BUFFER);
-
- if (r300->upload_ib == NULL)
- goto fail;
-
r300_init_states(&r300->context);
/* The KIL opcode needs the first texture unit to be enabled