(This is v4 submission of the series, but contains v9 of the key patch).

This series adds Android support to Anvil. And Android requires
VK_ANDROID_native_buffer.


I tested the series on 64-bit ARC++ on a Skylake Chromebook with a 3.18
kernel. (ARC++ is the Android container in Chrome OS). (Yes, I said 3.18.
That's not a typo).


Here's my test results on v4:

  - Many Sascha demos, when built as a x86_64 APK, work as expected.

And old results from v1. I will rerun these tests when asap:

  - On Linux (non-Android), this patch series caused no regressions in
    VK-GL-CTS (master@dfcb8e87) under Wayland.

  - On Android dEQP from android-cts-7.1_r8-linux_x86-x86 had 1 failure.

     Passed:         66889/81423 (82.2%)
     Failed:             1/81423 (0.0%)
     Not supported:  14529/81423 (17.8%)
     Warnings:           4/81423 (0.0%)

     The sole failure was
     
dEQP-VK.pipeline.image_view.view_type.cube_array.format.r16g16_sint.component_swizzle.one_r_g_zero

This patch series lives at:

    git://git.kiwitree.net/~chadv/mesa refs/tags/chadv/review/anv-android-v04
    cgit 
http://git.kiwitree.net/cgit/~chadv/mesa/tag/?h=chadv/review/anv-android-v04

To test on ARC++, I had to rebase the submitted patches atop Google's
ARC++ patches. The branch I tested on ARC++ lives at:

    git://git.kiwitree.net/~chadv/mesa refs/tags/chadv/review/arc-vulkan-v04
    cgit 
http://git.kiwitree.net/cgit/~chadv/mesa/tag/?h=chadv/review/arc-vulkan-v04


Note that Mesa's ARC++ build uses Autotools, not Android.mk. This series
probably broke the Android.mk files. Someone, please review and test
that.


Each patch but the last is just prep. You should read the last patch
first to better understand the goal, then afterwards review the series
linearly from the beginning.


v2:
  - A few patches have already landed on master.
  - Drop the ugly flag params from anv_bo_cache_import(), for jekstrand.
  - Reject VkNativeBufferANDROID if the dma-buf's size is too small for
    the VkImage.
  - Stop abusing VkNativeBufferANDROID by passing it to vkAllocateMemory
    during vkCreateImage. Instead, directly import its dma-buf during
    vkCreateImage with anv_bo_cache_import(). [for jekstrand]
  - Rebase onto Tapani's VK_EXT_debug_report changes.


v3:
  - Omit v2 patches already upstreamed.
  - Many fixes to "anv: Implement VK_ANDROID_native_buffer".
  - Don't break the Android.mk buildsystem used by Android-IA.
  - Rebase onto the anv_image.c:needs_shadow changes in master.


v4:
  - Rework key patch "anv: Implement VK_ANDROID_native_buffer (v9)".  [for krh]
  - Fix the meson build. [for dcbaker]
  - Rebase onto Lionel's recent work for VK_KHR_sampler_ycbcr_conversion
    and VK_KHR_bind_memory2.
  - Omit all refactoring patches. They were not strictly needed, and the
    ongoing rebasing of the refactor patches made me grumpy.
  - Omit v3 patches already upstreamed.


Chad Versace (8):
  anv/android: Link to Android libraries in the autotools build
  intel: Add simple logging façade for Android (v2)
  anv: Better support for Android logging (v2)
  anv: Add field anv_image::planes[]::bo_is_owned (v2)
  anv: Move close(fd) from anv_bo_cache_import to its callers
  anv: Add sizeless anv_bo_cache_import()
  anv: Add func anv_gem_get_tiling()
  anv: Implement VK_ANDROID_native_buffer (v9)

Tapani Pälli (2):
  anv/android: Link to libsync, liblog in Android.mk
  anv: Install as Vulkan HAL module in Android.mk build

 src/intel/Android.vulkan.mk             |  13 +-
 src/intel/Makefile.sources              |   7 +-
 src/intel/Makefile.vulkan.am            |   7 +
 src/intel/common/intel_log.c            |  87 +++++++
 src/intel/common/intel_log.h            |  82 +++++++
 src/intel/common/meson.build            |   1 +
 src/intel/vulkan/anv_allocator.c        | 126 ++++++----
 src/intel/vulkan/anv_android.c          | 416 ++++++++++++++++++++++++++++++++
 src/intel/vulkan/anv_device.c           |  29 ++-
 src/intel/vulkan/anv_entrypoints_gen.py |   4 +-
 src/intel/vulkan/anv_extensions.py      |   1 +
 src/intel/vulkan/anv_gem.c              |  16 ++
 src/intel/vulkan/anv_image.c            |  29 ++-
 src/intel/vulkan/anv_intel.c            |   7 +-
 src/intel/vulkan/anv_private.h          |  33 ++-
 src/intel/vulkan/anv_queue.c            |   5 +-
 src/intel/vulkan/anv_util.c             |  21 +-
 src/intel/vulkan/genX_cmd_buffer.c      |   4 +-
 18 files changed, 788 insertions(+), 100 deletions(-)
 create mode 100644 src/intel/common/intel_log.c
 create mode 100644 src/intel/common/intel_log.h
 create mode 100644 src/intel/vulkan/anv_android.c

-- 
2.13.0

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to