From 060c7f2321f72503c14f9f3f7bb27d59d8a90224 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Michel=20D=C3=A4nzer?= Date: Fri, 3 Jul 2009 12:44:19 +0200 Subject: [PATCH] radeon: Wait for BO idle if necessary before mapping it. Fixes fighting between GPU and software rendering with TTM. --- src/mesa/drivers/dri/radeon/radeon_span.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mesa/drivers/dri/radeon/radeon_span.c b/src/mesa/drivers/dri/radeon/radeon_span.c index e28f286..4f5480b 100644 --- a/src/mesa/drivers/dri/radeon/radeon_span.c +++ b/src/mesa/drivers/dri/radeon/radeon_span.c @@ -443,6 +443,8 @@ static void map_unmap_rb(struct gl_renderbuffer *rb, int flag) return; if (flag) { + if (rrb->bo->bom->funcs->bo_wait) + radeon_bo_wait(rrb->bo); r = radeon_bo_map(rrb->bo, 1); if (r) { fprintf(stderr, "(%s) error(%d) mapping buffer.\n", -- 2.7.4