The source code for The Vulkan-ValidationLayer components is sponsored by Khronos and LunarG. While there are often active and organized development efforts underway to improve their coverage, opportunities always exist for anyone to help by contributing additional validation layer checks and tests.
There are some VUID that are incomplete and need to be added. The following can be used to find them
Coverage - html
page at the Vulkan SDK documentation pagescripts/vk_validation_stats.py
with -todo
to see a list of as-yet unimplemented validation checks.# Get summary report python3 scripts/vk_validation_stats.py external/Vulkan-Headers/registry/validusage.json -summary # Some VUIDs are handled in `spirv-val` and need to pass in the repo to check against python3 scripts/vk_validation_stats.py external/Vulkan-Headers/registry/validusage.json -spirvtools ~/path/to/SPIRV-Tools/ -summary # Print out all the information to an HTML page (also has text and csv support) python3 scripts/vk_validation_stats.py external/Vulkan-Headers/registry/validusage.json -spirvtools ~/path/to/SPIRV-Tools/ -html vuid.html # -todo filters out only VUID that are unimplemented python3 scripts/vk_validation_stats.py external/Vulkan-Headers/registry/validusage.json -spirvtools ~/path/to/SPIRV-Tools/ -todo -html todo.html
Of course, if you have your own work in mind, please open an issue to describe it and assign it to yourself. Finally, please feel free to contact any of the developers that are actively contributing should you wish to coordinate further.
It is the maintainers goal for all issues to be assigned or triaged
within one business day of their submission. If you choose to work on an issue that is assigned, simply coordinate with the current assignee.
triaged = decide if real issue, label it, assign it
main
branch. SDK branches are generally not updated except for critical fixes needed to repair an SDK release.public:
) is indented 2 spaces instead of the default 1 space. Again, the clang-format tool will handle this.*.cpp
instead of the default *.cc
.New code should target the above Google style guide, avoid copying/pasting incorrectly formatted code.
For the python generated code scripts, please follow the python coding style guide
Run clang-format on your changes to maintain consistent formatting
.clang-format
files present in the repository to define clang-format settings which are found and used automatically by clang-format.14
to check that the lines of code you have changed are formatted properly. It is recommended that you use the same version to format your code prior to submission.# Make changes to the source. $ git add -u . $ git clang-format --style=file # Check to see if clang-format made any changes and if they are OK. $ git add -u . $ git commit
NOTE
: scripts/check_code_format.py
will run clang-format for you and is required for passing CI.
NOTE
: scripts/check_code_format.py
will check your commit for you and is required for passing CI.
Strive for commits that implement a single or related set of functionality, using as many commits as is necessary (more is better). That said, please ensure that the repository compiles and passes tests without error for each commit in your pull request. Note that to be accepted into the repository, the pull request must [pass all tests](#testing your changes) on all supported platforms -- the continuous integration features will assist in enforcing this requirement.
When writing an error message for LogError
it is important to
Example of a good error message
if (render_pass == VK_NULL_HANDLE) { // ... } else if (value != 0 && HasDepthFlag(flag)) { // print Render Pass object // Value is not the expected one, log it // List flag users used skip |= LogError(render_pass, "value is %" PRIu32 " but flag (%s) is missing VK_FLAG_DEPTH.", value, string_VkFlag(flag)); }
Run the included layer validation tests (vk_layer_validation_tests
) in the repository before and after each of your commits to check for any regressions.
Write additional layer validation tests that explicitly exercise your changes.
Feel free to subject your code changes to other tests as well!
TIP
: It's ideal to test your changes in a fork and let Github Actions verify your changes before making a PR.
FormatHandle()
function, and that all object handles visible in a message should also be included in the callback data. If more than a single object is output, the LogObjectList structure should be used.layers/vulkan/generated
directory contains source code that is created by several generator scripts in the scripts
directory. All changes to these scripts must be submitted with the corresponding generated output to keep the repository self-consistent. Here for more information.You will be prompted with a one-time “click-through” CLA dialog as part of submitting your pull request or other contribution to GitHub.
All contributions made to the Vulkan-ValidationLayers repository are Khronos branded and as such, any new files need to have the Khronos license (Apache 2.0 style) and copyright included. Please see an existing file in this repository for an example.
All contributions made to the LunarG repositories are to be made under the Apache 2.0 license and any new files need to include this license and any applicable copyrights.
You can include your individual copyright after any existing copyrights.