v3d: 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 piglit bufferstorage-persistent read
This commit is contained in:
Eric Anholt 2018-07-11 11:22:16 -07:00
parent e48c615292
commit 7714896256

View file

@ -168,7 +168,7 @@ v3d_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 &&