| Jesse Hall | 0a40209 | 2016-02-01 14:43:47 -0800 | [diff] [blame] | 1 | # frameworks/native/vulkan |
| 2 | |
| 3 | This subdirectory contains Android's Vulkan loader, as well as some Vulkan-related tools useful to platform developers. |
| 4 | |
| 5 | ## Coding Style |
| 6 | |
| 7 | We 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 | |
| 9 | 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. |
| 10 | |
| 11 | ## Code Generation |
| 12 | |
| Adithya Srinivasan | 8dce9d7 | 2019-07-11 14:26:04 -0700 | [diff] [blame^] | 13 | 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. |
| Jesse Hall | 0a40209 | 2016-02-01 14:43:47 -0800 | [diff] [blame] | 14 | |
| 15 | To run the generator: |
| Adithya Srinivasan | 8dce9d7 | 2019-07-11 14:26:04 -0700 | [diff] [blame^] | 16 | - Install Python3 (if not already installed) |
| 17 | - `$ ./<path to>/frameworks/native/vulkan/scripts/code_generator.py` |