From 8c5ff5a41fa63634e2cc8037a0a601c60d233537 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Mon, 30 Apr 2012 20:56:25 +0200 Subject: [PATCH] st/mesa: unmap upload buffer after uploading indices and constants --- src/mesa/state_tracker/st_atom_constbuf.c | 1 + src/mesa/state_tracker/st_draw.c | 1 + 2 files changed, 2 insertions(+) diff --git a/src/mesa/state_tracker/st_atom_constbuf.c b/src/mesa/state_tracker/st_atom_constbuf.c index c9018b3bd77..fd9228583d2 100644 --- a/src/mesa/state_tracker/st_atom_constbuf.c +++ b/src/mesa/state_tracker/st_atom_constbuf.c @@ -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; diff --git a/src/mesa/state_tracker/st_draw.c b/src/mesa/state_tracker/st_draw.c index cbf4e59fb6d..ab2290f2c9d 100644 --- a/src/mesa/state_tracker/st_draw.c +++ b/src/mesa/state_tracker/st_draw.c @@ -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 */ -- 2.30.2