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);
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;
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
/* two mem block managers for hiz/zmask ram space */
struct mem_block *hiz_mm;
- /* upload manager */
- struct u_upload_mgr *upload_ib;
-
struct u_vbuf_mgr *vbuf_mgr;
struct util_slab_mempool pool_transfers;
switch (*index_size) {
case 1:
- u_upload_alloc(r300->upload_ib, 0, count * 2,
+ u_upload_alloc(r300->vbuf_mgr->uploader, 0, count * 2,
&out_offset, &out_buffer, &flushed, &ptr);
util_shorten_ubyte_elts_to_userptr(
case 2:
if (index_offset) {
- u_upload_alloc(r300->upload_ib, 0, count * 2,
+ u_upload_alloc(r300->vbuf_mgr->uploader, 0, count * 2,
&out_offset, &out_buffer, &flushed, &ptr);
util_rebuild_ushort_elts_to_userptr(&r300->context, *index_buffer,
case 4:
if (index_offset) {
- u_upload_alloc(r300->upload_ib, 0, count * 4,
+ u_upload_alloc(r300->vbuf_mgr->uploader, 0, count * 4,
&out_offset, &out_buffer, &flushed, &ptr);
util_rebuild_uint_elts_to_userptr(&r300->context, *index_buffer,
*index_buffer = NULL;
- u_upload_data(r300->upload_ib,
+ u_upload_data(r300->vbuf_mgr->uploader,
0, count * index_size,
ptr + (*start * index_size),
&index_offset,