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

Chia-I Wu olvaffe at gmail.com
Fri Aug 5 00:24:21 PDT 2011

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


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

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.


[1] direct link

olv at LunarG.com

More information about the mesa-dev mailing list