diff options
author | Ben Skeggs <skeggsb@gmail.com> | 2008-05-30 11:00:59 +1000 |
---|---|---|
committer | Ben Skeggs <skeggsb@gmail.com> | 2008-05-30 11:00:59 +1000 |
commit | 8b31d5fc8a5425b01adf80f4873cb816925ee0d1 (patch) | |
tree | 4332e5457c7f9027ff6e10d901ee2f990a48eff9 | |
parent | 524408f1a5b39c8c25a277e41e4eee54fd726b84 (diff) |
nouveau: flush pending pushbuf if buffer on validate list at map/del
-rw-r--r-- | src/gallium/winsys/dri/nouveau/nouveau_bo.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gallium/winsys/dri/nouveau/nouveau_bo.c b/src/gallium/winsys/dri/nouveau/nouveau_bo.c index aca16a8b12..57f5b7d1ae 100644 --- a/src/gallium/winsys/dri/nouveau/nouveau_bo.c +++ b/src/gallium/winsys/dri/nouveau/nouveau_bo.c @@ -256,6 +256,9 @@ nouveau_bo_del(struct nouveau_bo **bo) if (--nvbo->refcount) return; + if (nvbo->pending) + nouveau_pushbuf_flush(nvbo->pending->channel, 0); + if (nvbo->fence) nouveau_fence_signal_cb(nvbo->fence, nouveau_bo_del_cb, nvbo); else @@ -270,6 +273,11 @@ nouveau_bo_map(struct nouveau_bo *bo, uint32_t flags) if (!nvbo) return -EINVAL; + if (nvbo->pending && + (nvbo->pending->flags & NOUVEAU_BO_WR || flags & NOUVEAU_BO_WR)) { + nouveau_pushbuf_flush(nvbo->pending->channel, 0); + } + if (flags & NOUVEAU_BO_WR) nouveau_fence_wait(&nvbo->fence); else |