On Fri, Sep 2, 2011 at 4:03 AM, Eric Anholt <e...@anholt.net> wrote:
> On Wed, 31 Aug 2011 13:46:34 +0800, Chia-I Wu <olva...@gmail.com> wrote:
>> From: Chia-I Wu <o...@lunarg.com>
>>
>> Add a new format token, __DRI_IMAGE_FORMAT_RGBA8888_REV, to __DRI_IMAGE.
>> It maps to MESA_FORMAT_RGBA8888_REV in core mesa or
>> PIPE_FORMAT_R8G8B8A8_UNORM in gallium.  It is the format of translucent
>> surfaces on Android.
>
> This could use some explanation: Why can't android use the existing
> format with alpha?  Does the GL get no input into the hardware formats
> chosen?  Who chooses the format?  Would it work if we just didn't report
> HAL_PIXEL_FORMAT_RGBA_8888 for configs?
Android defines both

  HAL_PIXEL_FORMAT_RGBA_8888 (maps to MESA_FORMAT_RGBA8888_REV)
  HAL_PIXEL_FORMAT_BGRA_8888 (maps to MESA_FORMAT_ARGB8888)

among others.  The 2D graphics toolkit and the reference (software)
OpenGL renderer only support the former format.  With i915/i965, on
the other hand, EGLConfig's reported by Mesa never use the former
format but the latter one.

Now this is on the app side.  GL gets a say about the formats it
wants.  But as both formats above may be used by apps, the compositor,
which is also a GL user, have to support sampling from buffers in
either format.  That is the reason for this new __DRI_IMAGE format.

> Also, I'd prefer to see the name ABGR8888 to the ridiculous _REV naming,
> if we do need a new format.
I am fine with changing the naming.

-- 
o...@lunarg.com
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to