Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | - | - | ||||
api/ | 23-Mar-2024 | - | 13,333 | 11,425 | ||
doc/ | 23-Mar-2024 | - | 3 | 2 | ||
include/ | 23-Mar-2024 | - | 288 | 143 | ||
libvulkan/ | 23-Mar-2024 | - | 11,043 | 8,747 | ||
nulldrv/ | 23-Mar-2024 | - | 2,300 | 1,891 | ||
tools/ | 23-Mar-2024 | - | 671 | 585 | ||
vkjson/ | 23-Mar-2024 | - | 2,131 | 1,826 | ||
.clang-format | D | 23-Mar-2024 | 38 | 3 | 2 | |
Android.bp | D | 23-Mar-2024 | 1.1 KiB | 37 | 34 | |
OWNERS | D | 23-Mar-2024 | 25 | 2 | 1 | |
README.md | D | 23-Mar-2024 | 1.6 KiB | 29 | 19 |
README.md
1# 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 13We 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`. 14 15 To run the generator: 16 17### One-time setup 18- Install [golang](https://golang.org/), if you don't have it already. 19- Create a directory (e.g. `$HOME/lib/go`) for local go sources and binaries and add it to `$GOPATH`. 20- `$ git clone https://android.googlesource.com/platform/tools/gpu $GOPATH/src/android.googlesource.com/platform/tools/gpu` 21- `$ go get android.googlesource.com/platform/tools/gpu/api/...` 22- You should now have `$GOPATH/bin/apic`. You might want to add `$GOPATH/bin` to your `$PATH`. 23 24### Generating code 25To generate `libvulkan/*_gen.*`, 26- `$ cd libvulkan` 27- `$ apic template ../api/vulkan.api code-generator.tmpl` 28Similar for `nulldrv/null_driver_gen.*`. 29