radeon: Wait for BO idle if necessary before mapping it.
authorMichel Dänzer <daenzer@vmware.com>
Fri, 3 Jul 2009 10:44:19 +0000 (12:44 +0200)
committerMichel Dänzer <michel@daenzer.net>
Fri, 3 Jul 2009 10:44:19 +0000 (12:44 +0200)
Fixes fighting between GPU and software rendering with TTM.

src/mesa/drivers/dri/radeon/radeon_span.c

index e28f28662b458da7b15a587e8862e2f965236c7f..4f5480b1708a51695f78686b23d343c5ac5b8628 100644 (file)
@@ -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",