-
Notifications
You must be signed in to change notification settings - Fork 172
Home
Please take special note of the Contributing.md file.
Note: The complete set of header update changes should be squashed into a single commit
Check out the Khronos Vulkan-Docs repository or switch to the 1.0 branch and update
- Copy vulkan.h from Vulkan-Docs to Vulkan-LoaderAndValidationLayers\include\vulkan
- Copy vk_platform.h from Vulkan-Docs to Vulkan-LoaderAndValidationLayers\include\vulkan
- Copy vk.xml from Vulkan-Docs to Vulkan-LoaderAndValidationLayers\scripts
- Copy generator.py from Vulkan-Docs to Vulkan-LoaderAndValidationLayers\scripts
- Copy cgenerator.py from Vulkan-Docs to Vulkan-LoaderAndValidationLayers\scripts
- Copy reg.py from Vulkan-Docs to Vulkan-LoaderAndValidationLayers\scripts
- Pull the appropriate version of the Vulkan-Docs repository, build
validusage.json
, and copy it to Vulkan-LoaderAndValidationLayers\scripts - Merge any changes to genvk.py into lvl_genvk.py in Vulkan-LoaderAndValidationLayers\scripts.
In the Vulkan-LoaderAndValidationLayers\layers and Vulkan-LoaderAndValidationLayers\tests\layers directories, modify the Vulkan version numbers contained in the *.json files to match the new version number
Update the VUID database and header file (Vulkan-LoaderAndValidationLayers\layers\vk_validation_error_*.*):
- In the Vulkan-LoaderAndValidationLayers/scripts directory, run ‘python spec.py -update’
- If running from Windows, be sure to reset to unix line endings
- If no errors, check in diffs. Note that this will probably add a bunch of new VUs.
- Run vkvalidatelayerdoc.[sh|ps1] and it’ll probably fail, outputting a list of VUs that appear in the source code but not in the database. Update these VUs in the database by changing the <check_implemented> field from 'N' to 'Y'.
Using the instructions below, update include/vulkan/vulkan.hpp
This may include updates for new APIs, new extensions, or changes to existing APIs that cause incorrect validation errors or false positives.
The loader may need modifications for new Instance or PhysicalDevice Extensions
Resolve build issues, and run all tests with combined header update changes to verify correct operation. Ideally, this should include a CTS test pass including tests for new APIs/Extensions
- Create a PR to notify the appropriate folks
- After a successful run through GitHub's CI, push the commit
The vulkan.hpp file is generated from the Vulkan-Hpp repo, located here. Currently, an up-to-date copy of vulkan.hpp is kept in Vulkan-LoaderAndValidationLayers\include\vulkan alongside vulkan.h. When the header is updated, vulkan.hpp must be regenerated in order for the Vulkan-LoaderAndValidationLayers repo to build correctly.
- Clone the project from: https://github.com/KhronosGroup/Vulkan-Hpp.git
- Update submodules by running
git submodule update --init --recursive
- Build the project using cmake and the native build system, i.e.,
cmake -H. -Bbuild
and thenmake
(Linux) or'mkdir build; cd build; cmake -G "Visual Studio 15 Win64" ..
for Windows, followed by opening the solution and building in MSVC. - Run the resultant executable
VulkanHppGenerator.exe
with one argument, which is the path to the updated copy of vk.xml - The output should be generated in
Vulkan-Hpp/vulkan/vulkan.hpp
. If there are build errors or run-time issues these will need to be resolved before continuing. - If necessary, reset vulkan.hpp file to use Unix-style line endings before committing