tree: 790e893b33b0e73b3672c53ac89cee3355f4ed42 [path history] [tgz]
  1. doc/
  2. include/
  3. libvulkan/
  4. nulldrv/
  5. scripts/
  6. tools/
  7. vkjson/
  8. .clang-format
  9. Android.bp
  10. OWNERS
  11. README.md
vulkan/README.md

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 driectly from the Vulkan Registry (external/vulkan-headers/registry/vk.xml). Code generation must be done manually because the generator is not part of the platform toolchain (yet?). Files named foo_gen.* are generated by the code generator.

To run the generator:

  • Install Python3 (if not already installed)
  • $ ./<path to>/frameworks/native/vulkan/scripts/code_generator.py