From f71ca81a204714aeb1e43c4ec438c34e1975d013 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolai=20H=C3=A4hnle?= Date: Wed, 13 Apr 2016 11:00:55 -0500 Subject: [PATCH] WORKAROUND: gallium/radeon: unmap buffers when transfers finish Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94726 --- src/gallium/drivers/radeon/r600_buffer_common.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/radeon/r600_buffer_common.c b/src/gallium/drivers/radeon/r600_buffer_common.c index 664dc5b..ab5eab9 100644 --- a/src/gallium/drivers/radeon/r600_buffer_common.c +++ b/src/gallium/drivers/radeon/r600_buffer_common.c @@ -447,8 +447,12 @@ static void r600_buffer_transfer_unmap(struct pipe_context *ctx, !(transfer->usage & PIPE_TRANSFER_FLUSH_EXPLICIT)) r600_buffer_do_flush_region(ctx, transfer, &transfer->box); - if (rtransfer->staging) + if (rtransfer->staging) { + rctx->ws->buffer_unmap(rtransfer->staging->buf); pipe_resource_reference((struct pipe_resource**)&rtransfer->staging, NULL); + } else { + rctx->ws->buffer_unmap(r600_resource(transfer->resource)->buf); + } util_slab_free(&rctx->pool_transfers, transfer); } -- 2.5.0