| 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 | |
| Yiwei Zhang | 113ee6a | 2019-08-06 19:26:18 -0700 | [diff] [blame] | 5 | ## Documentation |
| 6 | |
| 7 | The former contents of doc/implementors_guide/ are now at https://source.android.com/devices/graphics/implement-vulkan. |
| 8 | |
| Jesse Hall | 0a40209 | 2016-02-01 14:43:47 -0800 | [diff] [blame] | 9 | ## Coding Style |
| 10 | |
| 11 | 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. |
| 12 | |
| 13 | 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. |
| 14 | |
| 15 | ## Code Generation |
| 16 | |
| Adithya Srinivasan | 8dce9d7 | 2019-07-11 14:26:04 -0700 | [diff] [blame] | 17 | 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] | 18 | |
| Yiwei Zhang | 113ee6a | 2019-08-06 19:26:18 -0700 | [diff] [blame] | 19 | ### Run The Code Generator |
| 20 | |
| 21 | Install Python3 (if not already installed) and execute below: |
| 22 | `$ ./scripts/code_generator.py` |