st/mesa: unmap upload buffer after uploading indices and constants
authorMarek Olšák <maraeo@gmail.com>
Mon, 30 Apr 2012 18:56:25 +0000 (20:56 +0200)
committerMarek Olšák <maraeo@gmail.com>
Mon, 30 Apr 2012 18:56:25 +0000 (20:56 +0200)
src/mesa/state_tracker/st_atom_constbuf.c
src/mesa/state_tracker/st_draw.c

index c9018b3bd77d3083ffbac99b51f79858ffeff559..fd9228583d238b68a3e116682be15cd467d41f66 100644 (file)
@@ -81,6 +81,7 @@ void st_upload_constants( struct st_context *st,
          cb.user_buffer = NULL;
          u_upload_data(st->constbuf_uploader, 0, paramBytes,
                        params->ParameterValues, &cb.buffer_offset, &cb.buffer);
+         u_upload_unmap(st->constbuf_uploader);
       } else {
          cb.buffer = NULL;
          cb.user_buffer = params->ParameterValues;
index cbf4e59fb6d7db4ff59ddd735d710a1bdc3fd754..ab2290f2c9da747c87eb7f1b2a46852b9a5fb283 100644 (file)
@@ -594,6 +594,7 @@ setup_index_buffer(struct st_context *st,
    else if (st->indexbuf_uploader) {
       u_upload_data(st->indexbuf_uploader, 0, ib->count * ibuffer->index_size,
                     ib->ptr, &ibuffer->offset, &ibuffer->buffer);
+      u_upload_unmap(st->indexbuf_uploader);
    }
    else {
       /* indices are in user space memory */