From: Michel Dänzer Date: Fri, 3 Jul 2009 10:44:19 +0000 (+0200) Subject: radeon: Wait for BO idle if necessary before mapping it. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=060c7f2321f72503c14f9f3f7bb27d59d8a90224;p=mesa.git radeon: Wait for BO idle if necessary before mapping it. Fixes fighting between GPU and software rendering with TTM. --- diff --git a/src/mesa/drivers/dri/radeon/radeon_span.c b/src/mesa/drivers/dri/radeon/radeon_span.c index e28f28662b4..4f5480b1708 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",