rbuffer->buf = NULL;
return &rbuffer->b.b.b;
}
-
-void r600_upload_index_buffer(struct r600_context *rctx,
- struct pipe_index_buffer *ib, unsigned count)
-{
- struct r600_resource *rbuffer = r600_resource(ib->buffer);
-
- u_upload_data(rctx->vbuf_mgr->uploader, 0, count * ib->index_size,
- rbuffer->b.user_ptr, &ib->offset, &ib->buffer);
-}
struct pipe_resource *r600_user_buffer_create(struct pipe_screen *screen,
void *ptr, unsigned bytes,
unsigned bind);
-void r600_upload_index_buffer(struct r600_context *rctx,
- struct pipe_index_buffer *ib, unsigned count);
-
/* r600_pipe.c */
void r600_flush(struct pipe_context *ctx, struct pipe_fence_handle **fence,
struct r600_atom *state = NULL, *next_state = NULL;
struct radeon_winsys_cs *cs = rctx->cs;
uint64_t va;
+ uint8_t *ptr;
if ((!info.count && (info.indexed || !info.count_from_stream_output)) ||
(info.indexed && !rctx->vbuf_mgr->index_buffer.buffer) ||
/* Translate or upload, if needed. */
r600_translate_index_buffer(rctx, &ib, info.count);
- if (u_vbuf_resource(ib.buffer)->user_ptr) {
- r600_upload_index_buffer(rctx, &ib, info.count);
+ ptr = u_vbuf_resource(ib.buffer)->user_ptr;
+ if (ptr) {
+ u_upload_data(rctx->vbuf_mgr->uploader, 0, info.count * ib.index_size,
+ ptr, &ib.offset, &ib.buffer);
}
} else {
info.index_bias = info.start;