libGLES_android: Add generic 32bpp BGRA EGLConfig

Add generic 32bpp EGLConfig for BGRA pixel format.

BGRA8888 is a common pixel format supported by ARM vendors for a while
now and we end up using this proposed fix more often than not for
software rendering display support during initial AOSP bringups or
AOSP master smoke testing when corresponding hardware graphics blobs
are not in sync with AOSP master changes.

This EGLConfig is identical to config_4_attribute_list (RGBA_8888) with
the only difference of BGRA_8888 EGL_NATIVE_VISUAL_ID.

Boot tested on Hikey without hardware graphics (MALI) binary blobs.

Boot failure without this patch:
    W SurfaceFlinger: no suitable EGLConfig found, trying a simpler query
    F SurfaceFlinger: no suitable EGLConfig found, giving up
    F libc    : Fatal signal 6 (SIGABRT), code -6 in tid 1959 (surfaceflinger)
    F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
    F DEBUG   : Build fingerprint: 'generic/hikey/hikey:6.0.1/MASTER/pundir06081327:userdebug/test-keys'
    F DEBUG   : Revision: '0'
    F DEBUG   : ABI: 'arm64'
    F DEBUG   : pid: 1959, tid: 1959, name: surfaceflinger  >>> /system/bin/surfaceflinger <<<
    F DEBUG   : signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
    F DEBUG   : Abort message: 'no suitable EGLConfig found, giving up'

Boot success with this patch:
    W SurfaceFlinger: no suitable EGLConfig found, trying a simpler query
    W SurfaceFlinger: EGL_SLOW_CONFIG selected!
    I SurfaceFlinger: EGL information:
    I SurfaceFlinger: vendor    : Android
    I SurfaceFlinger: version   : 1.4 Android META-EGL
    I SurfaceFlinger: extensions: EGL_KHR_get_all_proc_addresses EGL_ANDROID_presentation_time
EGL_KHR_swap_buffers_with_damage EGL_KHR_image_base EGL_KHR_fence_sync EGL_ANDROID_image_native_buffer
    I SurfaceFlinger: Client API: OpenGL_ES
    I SurfaceFlinger: EGLSurface: 8-8-8-8, config=0x8
    I SurfaceFlinger: OpenGL ES informations:
    I SurfaceFlinger: vendor    : Android
    I SurfaceFlinger: renderer  : Android PixelFlinger 1.4
    I SurfaceFlinger: version   : Open GLES-CM 1.0

Change-Id: I9b17ff67275fe4284a1c0699af04ba480280f607
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
1 file changed