struct pipe_index_buffer saved_ib;
uint32_t primtypes_mask;
unsigned api_pv;
- struct u_upload_mgr *upload;
};
void
util_primconvert_destroy(struct primconvert_context *pc)
{
- if (pc->upload)
- u_upload_destroy(pc->upload);
util_primconvert_save_index_buffer(pc, NULL);
FREE(pc);
}
&gen_func);
}
- if (!pc->upload) {
- pc->upload = u_upload_create(pc->pipe, 4096, PIPE_BIND_INDEX_BUFFER,
- PIPE_USAGE_STREAM);
- }
-
- u_upload_alloc(pc->upload, 0, new_ib.index_size * new_info.count, 4,
+ u_upload_alloc(pc->pipe->stream_uploader, 0, new_ib.index_size * new_info.count, 4,
&new_ib.offset, &new_ib.buffer, &dst);
if (info->indexed) {
if (src_transfer)
pipe_buffer_unmap(pc->pipe, src_transfer);
- u_upload_unmap(pc->upload);
+ u_upload_unmap(pc->pipe->stream_uploader);
/* bind new index buffer: */
pc->pipe->set_index_buffer(pc->pipe, &new_ib);