- if (info->indexed && svga->curr.ib.buffer) {
- map = pipe_buffer_map(&svga->pipe, svga->curr.ib.buffer,
- PIPE_TRANSFER_READ,
- &ib_transfer);
+ if (info->index_size) {
+ if (info->has_user_indices) {
+ map = (ubyte *) info->index.user;
+ } else {
+ map = pipe_buffer_map(&svga->pipe, info->index.resource,
+ PIPE_TRANSFER_READ |
+ PIPE_TRANSFER_UNSYNCHRONIZED, &ib_transfer);
+ }