#include "util/u_blitter.h"
#include "util/u_format_s3tc.h"
#include "util/u_simple_shaders.h"
+#include "util/u_upload_mgr.h"
#include "vl/vl_decoder.h"
#include "vl/vl_video_buffer.h"
#include "os/os_time.h"
if (rctx->vbuf_mgr) {
u_vbuf_destroy(rctx->vbuf_mgr);
}
+ if (rctx->uploader) {
+ u_upload_destroy(rctx->uploader);
+ }
util_slab_destroy(&rctx->pool_transfers);
r600_update_num_contexts(rctx->screen, -1);
if (!rctx->vbuf_mgr)
goto fail;
+ rctx->uploader = u_upload_create(&rctx->context, 1024 * 1024, 256,
+ PIPE_BIND_INDEX_BUFFER |
+ PIPE_BIND_CONSTANT_BUFFER);
+ if (!rctx->uploader)
+ goto fail;
+
rctx->blitter = util_blitter_create(&rctx->context);
if (rctx->blitter == NULL)
goto fail;
struct r600_textures_info ps_samplers;
struct u_vbuf *vbuf_mgr;
+ struct u_upload_mgr *uploader;
struct util_slab_mempool pool_transfers;
boolean have_depth_texture, have_depth_fb;
tmpPtr[i] = bswap_32(((uint32_t *)ptr)[i]);
}
- u_upload_data(rctx->vbuf_mgr->uploader, 0, size, tmpPtr, &cb->buffer_offset, &cb->buffer);
+ u_upload_data(rctx->uploader, 0, size, tmpPtr, &cb->buffer_offset, &cb->buffer);
free(tmpPtr);
} else {
- u_upload_data(rctx->vbuf_mgr->uploader, 0, buffer->width0, ptr, &cb->buffer_offset, &cb->buffer);
+ u_upload_data(rctx->uploader, 0, buffer->width0, ptr, &cb->buffer_offset, &cb->buffer);
}
} else {
/* Setup the hw buffer. */
ptr = ib.buffer->user_ptr;
if (ptr) {
- u_upload_data(rctx->vbuf_mgr->uploader, 0, info.count * ib.index_size,
+ u_upload_data(rctx->uploader, 0, info.count * ib.index_size,
ptr, &ib.offset, &ib.buffer);
}
} else {
switch (ib->index_size) {
case 1:
- u_upload_alloc(r600->vbuf_mgr->uploader, 0, count * 2,
+ u_upload_alloc(r600->uploader, 0, count * 2,
&out_offset, &out_buffer, &ptr);
util_shorten_ubyte_elts_to_userptr(