blob: 0f660977f90b6094b279bb6e09c2e662ee435434 [file] [log] [blame] [view]
Jesse Hall0a402092016-02-01 14:43:47 -08001# frameworks/native/vulkan
2
3This subdirectory contains Android's Vulkan loader, as well as some Vulkan-related tools useful to platform developers.
4
5## Coding Style
6
7We follow the [Chromium coding style](https://www.chromium.org/developers/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.
8
9Use "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.
10
11## Code Generation
12
Adithya Srinivasan8dce9d72019-07-11 14:26:04 -070013We 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.
Jesse Hall0a402092016-02-01 14:43:47 -080014
15 To run the generator:
Adithya Srinivasan8dce9d72019-07-11 14:26:04 -070016- Install Python3 (if not already installed)
17- `$ ./<path to>/frameworks/native/vulkan/scripts/code_generator.py`