Mesa (master): vc4: Fix raster surface shadow updates under DRI2.

Eric Anholt anholt at kemper.freedesktop.org
Wed Jul 29 03:03:35 UTC 2015


Module: Mesa
Branch: master
Commit: 95faf2c6397ce231e94176d18cf8fd2c3265bb8a
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=95faf2c6397ce231e94176d18cf8fd2c3265bb8a

Author: Eric Anholt <eric at anholt.net>
Date:   Mon Jul 27 23:23:57 2015 -0700

vc4: Fix raster surface shadow updates under DRI2.

Glamor asks GBM for the handle of the BO, then flinks it itself.  We
were marking the bo non-private in the flink and dmabuf (DRI3) paths,
but not the GEM handle path.  As a result, non-pageflipping DRI2
swapbuffers (EGL apps, in particular) were never updating the texture.

---

 src/gallium/drivers/vc4/vc4_screen.c |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/gallium/drivers/vc4/vc4_screen.c b/src/gallium/drivers/vc4/vc4_screen.c
index c069454..a20818d 100644
--- a/src/gallium/drivers/vc4/vc4_screen.c
+++ b/src/gallium/drivers/vc4/vc4_screen.c
@@ -490,6 +490,12 @@ vc4_screen_bo_get_handle(struct pipe_screen *pscreen,
 {
         whandle->stride = stride;
 
+        /* If we're passing some reference to our BO out to some other part of
+         * the system, then we can't do any optimizations about only us being
+         * the ones seeing it (like BO caching or shadow update avoidance).
+         */
+        bo->private = false;
+
         switch (whandle->type) {
         case DRM_API_HANDLE_TYPE_SHARED:
                 return vc4_bo_flink(bo, &whandle->handle);




More information about the mesa-commit mailing list