Mesa (master): st/egl: Flush resources before presentation ( android - bug 77966)

Chia-I Wu olv at kemper.freedesktop.org
Mon May 5 00:34:17 UTC 2014


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

Author: Paulo Sergio Travaglia <pstglia at gmail.com>
Date:   Fri May  2 12:00:11 2014 -0300

st/egl: Flush resources before presentation (android - bug 77966)

[olv: Use the real name provided by the patch author.  Ideally this could be
moved to somewhere higher level so that we would not need to create a pipe
context to flush resources.  Plus, it is not clear if flushing resources for
another context is valid.]

Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Reviewed-by: Chia-I Wu <olvaffe at gmail.com>

---

 src/gallium/state_trackers/egl/android/native_android.cpp |    7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/gallium/state_trackers/egl/android/native_android.cpp b/src/gallium/state_trackers/egl/android/native_android.cpp
index e73d031..8620ed8 100644
--- a/src/gallium/state_trackers/egl/android/native_android.cpp
+++ b/src/gallium/state_trackers/egl/android/native_android.cpp
@@ -396,6 +396,13 @@ android_surface_swap_buffers(struct native_surface *nsurf)
    struct android_surface *asurf = android_surface(nsurf);
    struct android_display *adpy = asurf->adpy;
 
+   struct native_display *ndpy = &adpy->base;
+   struct pipe_context *pipe = ndpy_get_copy_context(ndpy);
+
+   /* flush buffer */
+   pipe->flush_resource(pipe, asurf->buf_res);
+   pipe->flush(pipe, NULL, 0);
+
    android_surface_enqueue_buffer(&asurf->base);
 
    asurf->stamp++;




More information about the mesa-commit mailing list