Mesa (master): egl/android: HAVE_DRM_GRALLOC path fixes (v2)

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Sep 7 22:15:15 UTC 2020


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

Author: Mauro Rossi <issor.oruam at gmail.com>
Date:   Mon Sep  7 22:02:08 2020 +0200

egl/android: HAVE_DRM_GRALLOC path fixes (v2)

Fixes the following building errors:

external/mesa/src/egl/drivers/dri2/platform_android.c:1001:9: error: use of undeclared identifier 'dri2_img'
                                           dri2_img);
                                           ^
external/mesa/src/egl/drivers/dri2/platform_android.c:1059:17: error: incompatible pointer types assigning to '__DRIimage *' (aka 'struct __DRIimageRec *') from '_EGLImage *' (aka 'struct _egl_image *') [-Werror,-Wincompatible-pointer-types]
      dri_image = droid_create_image_from_name(disp, buf);
                ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 errors generated.

(v2) Changelog:
- Pass NULL instead of dri_image as argument of createImageFromName()
- Delete the unused dri_image variable

Fixes: 5c8b67ed ("egl/android: Simplify droid_create_image_from_name() path")
Signed-off-by: Mauro Rossi <issor.oruam at gmail.com>
Reviewed-by: Kristian H. Kristensen <hoegsberg at google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6626>

---

 src/egl/drivers/dri2/platform_android.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/egl/drivers/dri2/platform_android.c b/src/egl/drivers/dri2/platform_android.c
index 3f11147bf09..8c52a4ac44e 100644
--- a/src/egl/drivers/dri2/platform_android.c
+++ b/src/egl/drivers/dri2/platform_android.c
@@ -972,12 +972,11 @@ static int get_format(int format)
    return -1;
 }
 
-static _EGLImage *
+static __DRIimage *
 droid_create_image_from_name(_EGLDisplay *disp,
                              struct ANativeWindowBuffer *buf)
 {
    struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
-   __DRIimage *dri_image;
    int name;
    int format;
 
@@ -998,7 +997,7 @@ droid_create_image_from_name(_EGLDisplay *disp,
 					   format,
 					   name,
 					   buf->stride,
-					   dri2_img);
+					   NULL);
 }
 #endif /* HAVE_DRM_GRALLOC */
 



More information about the mesa-commit mailing list