It add an initialization of buffer age on dri2_surface_set_back_buffer().

Fixes from Emil's review
 - Split out separated patch for adding of missed initialization of buffer
   age. [1]

[1] https://lists.freedesktop.org/archives/mesa-dev/2017-October/173129.html

Signed-off-by: Mun Gwan-gyeong <elong...@gmail.com>
---
 src/egl/drivers/dri2/egl_dri2.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
index 2063d1ca56..edb692c7e5 100644
--- a/src/egl/drivers/dri2/egl_dri2.c
+++ b/src/egl/drivers/dri2/egl_dri2.c
@@ -1104,6 +1104,7 @@ dri2_surface_set_back_buffer(_EGLSurface *surf, void 
*buffer)
    for (int i = 0; i < ARRAY_SIZE(dri2_surf->color_buffers); i++) {
       if (!dri2_surf->color_buffers[i].native_buffer) {
          dri2_surf->color_buffers[i].native_buffer = buffer;
+         dri2_surf->color_buffers[i].age = 0;
       }
       if (dri2_surf->color_buffers[i].native_buffer == buffer) {
          dri2_surf->back = &dri2_surf->color_buffers[i];
-- 
2.14.2

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to