From 14136f9548bbe2eb0ecab3e49d6eb5645d703ed4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6nig?= Date: Tue, 7 Oct 2014 16:12:59 +0200 Subject: [PATCH] radeon/vide: use the aux context for buffer clears MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christian König --- src/gallium/drivers/radeon/radeon_video.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/radeon/radeon_video.c b/src/gallium/drivers/radeon/radeon_video.c index f6cfdff..8d4155d 100644 --- a/src/gallium/drivers/radeon/radeon_video.c +++ b/src/gallium/drivers/radeon/radeon_video.c @@ -120,10 +120,13 @@ error: /* clear the buffer with zeros */ void rvid_clear_buffer(struct pipe_context *context, struct rvid_buffer* buffer) { - struct r600_common_context *rctx = (struct r600_common_context*)context; + struct r600_common_screen *rscreen = (struct r600_common_screen *)context->screen; + struct r600_common_context *rctx = (struct r600_common_context*)rscreen->aux_context; + pipe_mutex_lock(rscreen->aux_context_lock); rctx->clear_buffer(context, &buffer->res->b.b, 0, buffer->res->buf->size, 0); - context->flush(context, NULL, 0); + rscreen->aux_context->flush(context, NULL, 0); + pipe_mutex_unlock(rscreen->aux_context_lock); } /** -- 1.9.1