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).
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;
}