From: Luca Barbieri Date: Mon, 9 Aug 2010 02:56:03 +0000 (+0200) Subject: nouveau: fix maps with PIPE_TRANSFER_UNSYNCHRONIZED | PIPE_TRANSFER_DONTBLOCK X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3bb0719fe1514d2a8fd4674203882fdb08232172;p=mesa.git 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). --- diff --git a/src/gallium/drivers/nouveau/nouveau_winsys.h b/src/gallium/drivers/nouveau/nouveau_winsys.h index df79ca89ca1..c6c93d40b8f 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; }