vc4: Don't automatically reallocate a PERSISTENT-mapped buffer.

I had mistakenly used the COHERENT flag, which can only be set when
PERSISTENT is mapped, but isn't always.

Fixes: a2014c2eb9 ("vc4: Simplify the DISCARD_RANGE handling")
(cherry picked from commit 50a3a283d0)
This commit is contained in:
Eric Anholt 2018-07-11 11:23:36 -07:00 committed by Dylan Baker
parent 01d1f4713f
commit b10229038c

View file

@ -161,7 +161,7 @@ vc4_resource_transfer_map(struct pipe_context *pctx,
*/
if ((usage & PIPE_TRANSFER_DISCARD_RANGE) &&
!(usage & PIPE_TRANSFER_UNSYNCHRONIZED) &&
!(prsc->flags & PIPE_RESOURCE_FLAG_MAP_COHERENT) &&
!(prsc->flags & PIPE_RESOURCE_FLAG_MAP_PERSISTENT) &&
prsc->last_level == 0 &&
prsc->width0 == box->width &&
prsc->height0 == box->height &&