summaryrefslogtreecommitdiffstats
path: root/src/egl
diff options
context:
space:
mode:
authorNataraj Deshpande <[email protected]>2019-08-28 14:18:43 -0700
committerGurchetan Singh <[email protected]>2019-08-29 23:16:08 +0000
commite3f54cb0c1845de20d63ca88006b6fcbe19ab9ea (patch)
tree403a3962d758f2cc211779bb7e3d82a89b680272 /src/egl
parenta69ae76cc8b5cb707c6a4ec064a0d097dc25a0d1 (diff)
egl/android: Enable HAL_PIXEL_FORMAT_RGBA_FP16 format
The patch adds support for 64 bit HAL_PIXEL_FORMAT_RGBA_FP16 for android platform. Fixes android.graphics.cts.BitmapColorSpaceTest#test16bitHardware which failed in egl due to "Unsupported native buffer format 0x16" on chromebooks. Signed-off-by: Nataraj Deshpande <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
Diffstat (limited to 'src/egl')
-rw-r--r--src/egl/drivers/dri2/platform_android.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/egl/drivers/dri2/platform_android.c b/src/egl/drivers/dri2/platform_android.c
index 601b29e1d84..97e7947c8b7 100644
--- a/src/egl/drivers/dri2/platform_android.c
+++ b/src/egl/drivers/dri2/platform_android.c
@@ -109,6 +109,9 @@ get_format_bpp(int native)
int bpp;
switch (native) {
+ case HAL_PIXEL_FORMAT_RGBA_FP16:
+ bpp = 8;
+ break;
case HAL_PIXEL_FORMAT_RGBA_8888:
case HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED:
/*
@@ -143,6 +146,7 @@ static int get_fourcc(int native)
* TODO: Remove this once https://issuetracker.google.com/32077885 is fixed.
*/
case HAL_PIXEL_FORMAT_RGBX_8888: return __DRI_IMAGE_FOURCC_XBGR8888;
+ case HAL_PIXEL_FORMAT_RGBA_FP16: return __DRI_IMAGE_FOURCC_ABGR16161616F;
default:
_eglLog(_EGL_WARNING, "unsupported native buffer format 0x%x", native);
}
@@ -161,6 +165,7 @@ static int get_format(int format)
* TODO: Revert this once https://issuetracker.google.com/32077885 is fixed.
*/
case HAL_PIXEL_FORMAT_RGBX_8888: return __DRI_IMAGE_FORMAT_XBGR8888;
+ case HAL_PIXEL_FORMAT_RGBA_FP16: return __DRI_IMAGE_FORMAT_ABGR16161616F;
default:
_eglLog(_EGL_WARNING, "unsupported native buffer format 0x%x", format);
}