radeon: Wait for BO idle if necessary before mapping it.

Fixes fighting between GPU and software rendering with TTM.
This commit is contained in:
Michel Dänzer
2009-07-03 12:44:19 +02:00
committed by Michel Dänzer
parent 6b2461fec9
commit 060c7f2321
@@ -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",