egl/dri2: fix image loaderPrivate type mixup
authorDavid Stevens <stevensd@chromium.org>
Wed, 23 Dec 2020 14:38:32 +0000 (23:38 +0900)
committerDavid Stevens <stevensd@chromium.org>
Wed, 23 Dec 2020 15:05:15 +0000 (00:05 +0900)
The first callback which uses an image's loaderPrivate data was recently
added. Prior to this, dri2_create_image_khr_texture had been setting the
unused loaderPrivate field on the image it creates. This caused a
pointer type mixup in platform_android when it started using the new
callback. Fix this by no longer unnecessarily setting loaderPrivate in
dri2_create_image_khr_texture.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4010
Fixes: a2fb87eea6d ("egl/android: implement image cleanup callback")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8211>

src/egl/drivers/dri2/egl_dri2.c

index d6a1c41..62fc7fb 100644 (file)
@@ -2461,7 +2461,7 @@ dri2_create_image_khr_texture(_EGLDisplay *disp, _EGLContext *ctx,
                                               depth,
                                               attrs.GLTextureLevel,
                                               &error,
-                                              dri2_img);
+                                              NULL);
    dri2_create_image_khr_texture_error(error);
 
    if (!dri2_img->dri_image) {