i965: Support Android RGBX8888 format for EGL generated images

Enabled MESA_FORMAT_RGBX8888_REV for RGBX.  Android software
requires RGBX8888 format to be supported for software rendering.
That requires EGL to be capable of generating images from this
format.

Signed-off-by: Sean V Kelley <sean.v.kelley@linux.intel.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
This commit is contained in:
Sean V Kelley
2012-04-24 07:49:10 -07:00
committed by Chad Versace
parent 81f95ce13d
commit fd0082c47e
2 changed files with 12 additions and 0 deletions
@@ -291,6 +291,8 @@ brw_format_for_mesa_format(gl_format mesa_format)
[MESA_FORMAT_RGBA8888_REV] = BRW_SURFACEFORMAT_R8G8B8A8_UNORM,
[MESA_FORMAT_ARGB8888] = BRW_SURFACEFORMAT_B8G8R8A8_UNORM,
[MESA_FORMAT_ARGB8888_REV] = 0,
[MESA_FORMAT_RGBX8888] = 0,
[MESA_FORMAT_RGBX8888_REV] = BRW_SURFACEFORMAT_R8G8B8X8_UNORM,
[MESA_FORMAT_XRGB8888] = BRW_SURFACEFORMAT_B8G8R8X8_UNORM,
[MESA_FORMAT_XRGB8888_REV] = 0,
[MESA_FORMAT_RGB888] = 0,
+10
View File
@@ -211,6 +211,11 @@ intel_create_image_from_name(__DRIscreen *screen,
image->internal_format = GL_RGBA;
image->data_type = GL_UNSIGNED_BYTE;
break;
case __DRI_IMAGE_FORMAT_XBGR8888:
image->format = MESA_FORMAT_RGBX8888_REV;
image->internal_format = GL_RGB;
image->data_type = GL_UNSIGNED_BYTE;
break;
default:
free(image);
return NULL;
@@ -327,6 +332,11 @@ intel_create_image(__DRIscreen *screen,
image->internal_format = GL_RGBA;
image->data_type = GL_UNSIGNED_BYTE;
break;
case __DRI_IMAGE_FORMAT_XBGR8888:
image->format = MESA_FORMAT_RGBX8888_REV;
image->internal_format = GL_RGB;
image->data_type = GL_UNSIGNED_BYTE;
break;
default:
free(image);
return NULL;