Module: Mesa
Branch: staging/18.1
Commit: cc2048a1e1392d34da405dc5d2f826836db21e3c
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=cc2048a1e1392d34da405dc5d2f826836db21e3c

Author: Eric Anholt <[email protected]>
Date:   Wed Jul 11 11:23:36 2018 -0700

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: a2014c2eb9e0 ("vc4: Simplify the DISCARD_RANGE handling")
(cherry picked from commit 50a3a283d052a8d7a5f75fb45ab540d397fb22c2)

---

 src/gallium/drivers/vc4/vc4_resource.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/vc4/vc4_resource.c 
b/src/gallium/drivers/vc4/vc4_resource.c
index a86bd814d2..85a3c040f0 100644
--- a/src/gallium/drivers/vc4/vc4_resource.c
+++ b/src/gallium/drivers/vc4/vc4_resource.c
@@ -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 &&

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to