[v2] egl/android: Update color_buffer[] querying for buffer age

Submitted by Nataraj Deshpande on July 9, 2019, 3:43 p.m.


Message ID 1562687039-135844-1-git-send-email-nataraj.deshpande@intel.com
State New
Headers show
Series "egl/android: Update color_buffer[] querying for buffer age" ( rev: 2 ) in Mesa

Not browsing as part of any series.

Commit Message

Nataraj Deshpande July 9, 2019, 3:43 p.m.
color_buffers[] is currently hard coded to 3 for android which fails
in droid_window_dequeue_buffer when ANativeWindow creates 4 color_buffers
on ChromeOS while querying buffer age during dEQP partial_update tests.

Fixes dEQP-EGL.functional.partial_update* tests on chromebooks with
enabling EGL_KHR_partial_update.

v2: update comment instead of removing (Eric Engestrom)

Fixes: 2acc69da8ce "EGL/Android: Add EGL_EXT_buffer_age extension"
Signed-off-by: Nataraj Deshpande <nataraj.deshpande@intel.com>
Acked-by: Eric Engestrom <eric@engestrom.ch>
 src/egl/drivers/dri2/egl_dri2.h | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Patch hide | download patch | download mbox

diff --git a/src/egl/drivers/dri2/egl_dri2.h b/src/egl/drivers/dri2/egl_dri2.h
index 943ff18..24a37e0 100644
--- a/src/egl/drivers/dri2/egl_dri2.h
+++ b/src/egl/drivers/dri2/egl_dri2.h
@@ -322,13 +322,12 @@  struct dri2_egl_surface
    __DRIimage *dri_image_front;
    /* Used to record all the buffers created by ANativeWindow and their ages.
-    * Usually Android uses at most triple buffers in ANativeWindow
-    * so hardcode the number of color_buffers to 3.
+    * Set number of color_buffers to 4 as applicable to Android/chromeOS.
    struct {
       struct ANativeWindowBuffer *buffer;
       int age;
-   } color_buffers[3], *back;
+   } color_buffers[4], *back;
    /* surfaceless and device */