When a target different than EGL_NATIVE_BUFFER_ANDROID
is used with eglCreateImageKHR on sw rendering,
a fallback funcion is used.
As this returns NULL, EGL_NO_IMAGE_KHR is returned,
which crashes many apps
Using a function implemented for EGL/DRI2 in this cases
allows eglCreateImageKHR usage for other targets
(like EGL_GL_TEXTURE_2D_KHR)
return swrast_create_image_android_native_buffer(disp, ctx,
(struct ANativeWindowBuffer *) buffer);
default:
- return dri2_fallback_create_image_khr(drv, disp, ctx, target, buffer, attr_list);
+ return dri2_create_image_khr(drv, disp, ctx, target, buffer, attr_list);
}
}