[Mesa-dev] upstreaming Android support [Was: i965, mesa, glapi: Build libi965_dri on Android]

Chad Versace chad at chad-versace.us
Fri Aug 5 14:01:28 PDT 2011


On 08/05/2011 12:24 AM, Chia-I Wu wrote:
> On Fri, Aug 5, 2011 at 3:42 PM, Chia-I Wu <olvaffe at gmail.com> wrote:
>> We will be basically doing everything from scratch, in smaller steps.
>> In that case, I see no reason not to do this based on what is already
>> there.  I did plan to upstream my changes.  So cleaning it up should
>> not be a nightmare.
> I've pushed a branch here for discussion
> 
>   http://cgit.freedesktop.org/~olv/mesa/log/?h=android-gingerbread-upstream-wip
> 
> This is still WIP.  It still needs to be cleaned up.  The goal of the
> branch is to provide
> 
>  * a clean tree to be merged to master
>  * integration with Android(-x86) Gingerbread
>  * gallium drivers that work well
>  * i915/i965 drivers that work with simple tests
> 
> The main focus is the integration with Android.  Missing features in
> i915/i965 should be added later.
> 
> The commits in this branch can be divided into four groups
> 
> 1) Fix portability issues (the first 5 commits)
> 
>   Android has its own C library called bionic.  There are a few places
>   where it is incompatible with GNU C.  These five commits adds
>   compile-time tests to define the compatibility layer for Android.
> 
> 2) Add support for Android to st/egl (the next 3 commits)
> 
>   These should only be interesting to EGL developers.  These commits
>   add _EGL_PLATFORM_ANDROID and Android-specific extensions to EGL
>   core.  Support for the new platform and extensions is then added to
>   st/egl.
> 
> 3) Integration with Android build system (the next 2 commits)
> 
>   This first commit here should be killed.  Ignore it for now.
> 
>   The second commit[1] adds a bunch of Android.mk's to the source
>   tree.  Android.mk's are read by the Android build system to build
>   Mesa.  No changes are made to the existing files.
> 
>   IMHO, this is the better way to upstream Andoird support.  We know
>   that things work at this point.  We know that nothing can break due
>   to this commit.  We can then refactor Makefile's, one by one as
>   follow-up commits, until we are satisfied with the results.
> 
> 4) Add support for Android to egl_dri2/i915/i965 (the last 3 commits)
> 
>   These commits add Android support to egl_dri2.  Build rules for
>   i915 and i965 are also added.
> 
> The most interesting changes should be 3).  I prefer the approach I
> described in it, but I am also fine with interleaving refactoring
> Makefile's with adding Android.mk's.  That could take a while as we
> need to have a consensus on how to refactor Makefile's systematically.
> 
> Thoughts?
> 
> [1] direct link
> http://cgit.freedesktop.org/~olv/mesa/commit/?h=android-gingerbread-upstream-wip&id=90f8f6dc2fa3e121a9e5921fac106d2b058e08cc
> 

The branch looks like a good candidate for merging. I gave it a quick review.

[have comment]        mesa: fix !FEATURE_GL build
[looks good to me]    glsl: remove an unnecessary header include
[no comment]          gallium: add PIPE_OS_ANDROID support
[looks good to me]    ralloc: SIZE_MAX is missing on Android
[have comment]        mesa: fix compile issues on Android
[have comment]        egl: add _EGL_PLATFORM_ANDROID
[looks good to me]    egl: add Android-specific extensions
[needs discussion]    android: add Android.mk's
[needs discussion]    egl_dri2: allow a platform to specify RGBA masks
[have comments]       egl_dri2: add support for Android

I have comments on some patches, and both of the egl_dri2 patches need to be
reviewed by the other EGL devs. Could you post the patch series for review? That
way, it will be easier for everyone to post comments inline.

Since we (you, me, Jose, and Dan) have not yet decided how to handle the build
system issue, when you email the patches please strip the makefiles out.

Thanks.

-- 
Chad Versace
chad at chad-versace.us

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 900 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20110805/98d5b7bb/attachment.pgp>


More information about the mesa-dev mailing list