summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/nouveau
diff options
context:
space:
mode:
authorLuca Barbieri <luca@luca-barbieri.com>2010-08-09 04:56:03 +0200
committerLuca Barbieri <luca@luca-barbieri.com>2010-08-09 05:02:12 +0200
commit3bb0719fe1514d2a8fd4674203882fdb08232172 (patch)
tree8f71420ce5966750d32c0346248d231c7e4a7a20 /src/gallium/drivers/nouveau
parentaef0fbd5b6e0b29342d09722c98d512b3661c31b (diff)
nouveau: fix maps with PIPE_TRANSFER_UNSYNCHRONIZED | PIPE_TRANSFER_DONTBLOCK
In this case, we were incorrectly prioritizing PIPE_TRANSFER_DONTBLOCK over PIPE_TRANSFER_UNSYNCHRONIZED. This can lead to failure in the Mesa VBO draw paths that end up specifying both, but don't expect map to fail (in particular, the problem manifested as a leak of buffer objects in teapot with other changes).
Diffstat (limited to 'src/gallium/drivers/nouveau')
-rw-r--r--src/gallium/drivers/nouveau/nouveau_winsys.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/gallium/drivers/nouveau/nouveau_winsys.h b/src/gallium/drivers/nouveau/nouveau_winsys.h
index df79ca89ca..c6c93d40b8 100644
--- a/src/gallium/drivers/nouveau/nouveau_winsys.h
+++ b/src/gallium/drivers/nouveau/nouveau_winsys.h
@@ -24,11 +24,10 @@ nouveau_screen_transfer_flags(unsigned pipe)
flags |= NOUVEAU_BO_WR;
if (pipe & PIPE_TRANSFER_DISCARD)
flags |= NOUVEAU_BO_INVAL;
- if (pipe & PIPE_TRANSFER_DONTBLOCK)
- flags |= NOUVEAU_BO_NOWAIT;
- else
if (pipe & PIPE_TRANSFER_UNSYNCHRONIZED)
flags |= NOUVEAU_BO_NOSYNC;
+ else if (pipe & PIPE_TRANSFER_DONTBLOCK)
+ flags |= NOUVEAU_BO_NOWAIT;
return flags;
}