platform_frameworks_native/vulkan
Yiwei Zhang c91b9b7388 libvulkan: vkGetPhysicalDeviceSurfaceSupportKHR
Refactor the explicit CPU bit mask to the CPU mask in AHardwareBuffer

Test: VulkanSurfaceSupportTest
Bug: b/77853189
Change-Id: I26d6f831b11eac2970eaa5513c1d26cd17195f46
2018-06-07 11:13:27 -07:00
..
api vulkan: Update headers to 1.1.76 2018-05-28 14:30:57 -07:00
doc vulkan: Move implementor's guide to s.a.c. 2018-05-09 16:23:53 -07:00
include Merge "vulkan: Update headers to 1.1.76" am: 381ee9c800 2018-05-28 16:28:55 -07:00
libvulkan libvulkan: vkGetPhysicalDeviceSurfaceSupportKHR 2018-06-07 11:13:27 -07:00
nulldrv Vulkan api update to 1.1 2018-04-04 22:10:24 -07:00
tools Use consistent designated initializers 2016-12-29 09:34:55 -07:00
vkjson Let vkjson use jsoncpp lib 2018-04-05 18:46:18 -07:00
.clang-format vulkan: initial loader and null driver 2016-01-25 13:49:31 -08:00
Android.bp Move vkjson into framework/native/vulkan 2018-04-05 10:29:21 -07:00
README.md vulkan: rewrite top of loader 2016-03-30 09:42:47 +08:00

frameworks/native/vulkan

This subdirectory contains Android's Vulkan loader, as well as some Vulkan-related tools useful to platform developers.

Coding Style

We follow the Chromium coding style for naming and formatting, except with four-space indentation instead of two spaces. In general, any C++ features supported by the prebuilt platform toolchain are allowed.

Use "clang-format -style=file" to format all C/C++ code, except code imported verbatim from elsewhere. Setting up git-clang-format in your environment is recommended.

Code Generation

We generate several parts of the loader and tools from a Vulkan API description file, stored in api/vulkan.api. Code generation must be done manually because the generator tools aren't part of the platform toolchain (yet?). Files named foo_gen.* are generated from the API file and a template file named foo.tmpl.

To run the generator:

One-time setup

  • Install golang, if you don't have it already.
  • Create a directory (e.g. $HOME/lib/go) for local go sources and binaries and add it to $GOPATH.
  • $ git clone https://android.googlesource.com/platform/tools/gpu $GOPATH/src/android.googlesource.com/platform/tools/gpu
  • $ go get android.googlesource.com/platform/tools/gpu/api/...
  • You should now have $GOPATH/bin/apic. You might want to add $GOPATH/bin to your $PATH.

Generating code

To generate libvulkan/*_gen.*,

  • $ cd libvulkan
  • $ apic template ../api/vulkan.api code-generator.tmpl Similar for nulldrv/null_driver_gen.*.