Name |
Date |
Size |
#Lines |
LOC |
||
---|---|---|---|---|---|---|
.. | - | - | ||||
generated/ | 15-Dec-2024 | - | 11,526 | 11,063 | ||
profiles/ | 15-Dec-2024 | - | 2,562 | 2,558 | ||
Android.bp | D | 15-Dec-2024 | 1.4 KiB | 69 | 65 | |
README.md | D | 15-Dec-2024 | 2.1 KiB | 39 | 28 | |
vkprofiles.cpp | D | 15-Dec-2024 | 6.5 KiB | 199 | 151 | |
vkprofiles.h | D | 15-Dec-2024 | 1.3 KiB | 41 | 9 |
README.md
1 2Get a local copy of the Vulkan-Profiles repository (https://github.com/KhronosGroup/Vulkan-Profiles/) 3 4NOTE: If the Vulkan-Headers you need for generation is later than the one that exists in 5`external/vulkan-headers`, then `external/vulkan-headers` will need to be updated to match. 6These updates to `external/vulkan` need to be made in AOSP. Changes to `ndk_translation` may 7need to be first made in internal-main. 8 9Run Vulkan-Profiles/scripts/gen_profiles_solutions.py in debug mode. 10 11Debug mode (at time of writing) requires a dedicated debug folder within the output-library location. 12~/Vulkan-Profiles$ mkdir debug 13~/Vulkan-Profiles$ python3 scripts/gen_profiles_solution.py --debug --registry ~/<PATH_TO_YOUR_ANDROID_REPO>/external/vulkan-headers/registry/vk.xml --input ~/android/main/frameworks/native/vulkan/vkprofiles/profiles/ --output-library-inc . --output-library-src . 14 15Take the generated vulkan_profiles.h and vulkan_profiles.cpp from the debug directory you just created. 16 17~/Vulkan-Profiles$ cp debug/vulkan_profiles.cpp <PATH_TO_YOUR_ANDROID_REPO>/frameworks/native/vulkan/vkprofile/generated/ 18~/Vulkan-Profiles$ cp debug/vulkan_profiles.h <PATH_TO_YOUR_ANDROID_REPO>/frameworks/native/vulkan/vkprofile/generated/ 19 20 21The files need to be modified to land. 221. Replace the generated license with the correct Android license 23(https://cs.android.com/android/platform/superproject/main/+/main:development/docs/copyright-templates/c.txt). 24Make sure to set the copyright to the current year. You should also remove the `This file is ***GENERATED***` part. 252. Add VK_USE_PLATFORM_ANDROID_KHR between the license and the first includes for vulkan_profiles.cpp 26``` 27 */ 28 29#ifndef VK_USE_PLATFORM_ANDROID_KHR 30#define VK_USE_PLATFORM_ANDROID_KHR 31#endif 32 33#include ... 34``` 353. Rewrite the includes so that `vulkan_profiles.h` is correctly included 364. Modify the #define `VP_DEBUG_MESSAGE_CALLBACK(MSG) ...` from "Profiles ERROR/WARNING" to "vkprofiles ERROR/WARNING" 375. You may need to modify the Android.bp to remove warnings as errors, e.g. `"-Wno-error=unused-parameter",` 386. Add `clang-format off` to the beginning and `clang-format on` to the end of the files 39