struct translate_cache *translate_cache;
unsigned translate_vb_slot;
- struct u_upload_mgr *uploader;
-
struct u_vbuf_mgr_elements *ve;
void *saved_ve, *fallback_ve;
boolean ve_binding_lock;
mgr->pipe = pipe;
mgr->translate_cache = translate_cache_create();
- mgr->uploader = u_upload_create(pipe, upload_buffer_size,
- upload_buffer_alignment,
- PIPE_BIND_VERTEX_BUFFER);
+ mgr->b.uploader = u_upload_create(pipe, upload_buffer_size,
+ upload_buffer_alignment,
+ PIPE_BIND_VERTEX_BUFFER);
mgr->caps.fetch_dword_unaligned =
fetch_alignment == U_VERTEX_FETCH_BYTE_ALIGNED;
}
translate_cache_destroy(mgr->translate_cache);
- u_upload_destroy(mgr->uploader);
+ u_upload_destroy(mgr->b.uploader);
FREE(mgr);
}
/* Create and map the output buffer. */
num_verts = max_index + 1 - min_index;
- u_upload_alloc(mgr->uploader,
+ u_upload_alloc(mgr->b.uploader,
key.output_stride * min_index,
key.output_stride * num_verts,
&out_offset, &out_buffer, upload_flushed,
size = mgr->ve->native_format_size[i];
}
- u_upload_data(mgr->uploader, first, size,
+ u_upload_data(mgr->b.uploader, first, size,
u_vbuf_resource(vb->buffer)->user_ptr + first,
&vb->buffer_offset,
&mgr->b.real_vertex_buffer[index],
u_vbuf_translate_end(mgr);
}
}
-
-void u_vbuf_mgr_flush_uploader(struct u_vbuf_mgr *mgrb)
-{
- struct u_vbuf_mgr_priv *mgr = (struct u_vbuf_mgr_priv*)mgrb;
-
- u_upload_flush(mgr->uploader);
-}
/* XXX These shouldn't be really necessary, but removing them breaks some tests.
* Needless buffer reallocations may significantly increase memory consumption,
* so getting rid of these 3 calls is important. */
- u_vbuf_mgr_flush_uploader(rctx->vbuf_mgr);
+ u_upload_flush(rctx->vbuf_mgr->uploader);
u_upload_flush(rctx->upload_ib);
u_upload_flush(rctx->upload_const);
}