| From d53f7b8111188451be1f7d1aa79a784158a59368 Mon Sep 17 00:00:00 2001 |
| From: Nataraj Deshpande <nataraj.deshpande@intel.com> |
| Date: Wed, 28 Aug 2019 14:18:43 -0700 |
| Subject: [PATCH 12/12] UPSTREAM: egl/android: Enable |
| HAL_PIXEL_FORMAT_RGBA_FP16 format |
| MIME-Version: 1.0 |
| Content-Type: text/plain; charset=UTF-8 |
| Content-Transfer-Encoding: 8bit |
| |
| 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. |
| |
| Change-Id: I44f886fce27fe5f738d2dc229eed8b59088cf6d6 |
| Signed-off-by: Nataraj Deshpande <nataraj.deshpande@intel.com> |
| Reviewed-by: Tapani Pรคlli <tapani.palli@intel.com> |
| (cherry picked from commit e3f54cb0c1845de20d63ca88006b6fcbe19ab9ea) |
| --- |
| src/egl/drivers/dri2/platform_android.c | 5 +++++ |
| 1 file changed, 5 insertions(+) |
| |
| diff --git a/src/egl/drivers/dri2/platform_android.c b/src/egl/drivers/dri2/platform_android.c |
| index a71d55adfe1..a6e6139248d 100644 |
| --- a/src/egl/drivers/dri2/platform_android.c |
| +++ b/src/egl/drivers/dri2/platform_android.c |
| @@ -103,6 +103,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: |
| /* |
| @@ -137,6 +140,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); |
| } |
| @@ -155,6 +159,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); |
| } |
| -- |
| 2.21.0 |
| |