[Mesa-dev] [PATCH mesa] meson: wire up egl/android
Tomasz Figa
tfiga at chromium.org
Mon Oct 30 07:48:24 UTC 2017
Hi everyone,
On Sat, Oct 28, 2017 at 2:38 AM, Dylan Baker <dylan at pnwbakers.com> wrote:
> Whooo! Thanks for doing this!
>
> Quoting Eric Engestrom (2017-10-27 07:40:17)
>> Cc: Rob Herring <robh at kernel.org>
>> Cc: Tomasz Figa <tfiga at chromium.org>
>> Signed-off-by: Eric Engestrom <eric.engestrom at imgtec.com>
>> ---
>> Completely untested!
>> It's a step in the right direction though; doesn't hurt non-android,
>> and gets android closer to building on meson :)
>> ---
>> meson.build | 13 +++++++++++--
>> src/egl/meson.build | 5 ++++-
>> 2 files changed, 15 insertions(+), 3 deletions(-)
Thanks for looking into this!
I think I'd be the right person to test this with Chrome OS Android
build, but need to figure out how to use Meson with our Gentoo-based
build system. Do we already have upstream Gentoo experimenting with
Meson?
Best regards,
Tomasz
>>
>> diff --git a/meson.build b/meson.build
>> index 875f9d4d294d1911f239..761c33f4651ab37ab7b6 100644
>> --- a/meson.build
>> +++ b/meson.build
>> @@ -152,7 +152,7 @@ endif
>> # TODO: other OSes
>> with_dri_platform = 'drm'
>>
>> -# TODO: android platform
>> +with_platform_android = false
>> with_platform_wayland = false
>> with_platform_x11 = false
>> with_platform_drm = false
>> @@ -161,6 +161,7 @@ egl_native_platform = ''
>> _platforms = get_option('platforms')
>> if _platforms != ''
>> _split = _platforms.split(',')
>> + with_platform_android = _split.contains('android')
>> with_platform_x11 = _split.contains('x11')
>> with_platform_wayland = _split.contains('wayland')
>> with_platform_drm = _split.contains('drm')
>> @@ -252,7 +253,7 @@ if _vulkan_drivers != ''
>> with_intel_vk = _split.contains('intel')
>> with_amd_vk = _split.contains('amd')
>> with_any_vk = with_amd_vk or with_intel_vk
>> - if not (with_platform_x11 or with_platform_wayland)
>> + if not (with_platform_x11 or with_platform_wayland or with_platform_android)
>> error('Vulkan requires at least one platform (x11, wayland)')
>> endif
>> endif
>> @@ -330,6 +331,14 @@ endif
>> if with_platform_surfaceless
>> pre_args += '-DHAVE_SURFACELESS_PLATFORM'
>> endif
>> +if with_platform_android
>> + dep_android = [
>> + dependency('cutils'),
>> + dependency('hardware'),
>> + dependency('sync'),
>> + ]
>
> The indent looks off here, it looks like 4 space instead of 2, and the closing
> brace should be dedented.
>
> Otherwise this looks good to me, though it would be great if one of the
> ChromeOS guys could look at it (since I think that android builds are always
> done with android.mk, and this would only be for the ChromeOS ARC++ container)
>
> Reviewed-by: Dylan Baker <dylan at pnwbakers.com>
>
>> + pre_args += '-DHAVE_ANDROID_PLATFORM'
>> +endif
>>
>> prog_python2 = find_program('python2')
>> has_mako = run_command(prog_python2, '-c', 'import mako')
>> diff --git a/src/egl/meson.build b/src/egl/meson.build
>> index ea7ae06761f75c00a40c..cc51671f9d8f24708405 100644
>> --- a/src/egl/meson.build
>> +++ b/src/egl/meson.build
>> @@ -129,7 +129,10 @@ if with_platform_wayland
>> 'wayland/wayland-egl', 'wayland/wayland-drm',
>> )
>> endif
>> -# TODO: android
>> +if with_platform_android
>> + deps_for_egl += dep_android
>> + files_egl += files('drivers/dri2/platform_android.c')
>> +endif
>>
>> # TODO: glvnd
>>
>> --
>> Cheers,
>> Eric
>>
More information about the mesa-dev
mailing list