Provide more info about vk.xml path

This commit is contained in:
Codotaku
2023-07-26 16:39:20 +01:00
parent e014248b3b
commit a5aac7ad14

View File

@@ -23,15 +23,11 @@ A CLI-interface is provided to generate vk.zig from the [Vulkan XML registry](ht
$ zig-out/bin/generator path/to/vk.xml output/path/to/vk.zig $ zig-out/bin/generator path/to/vk.xml output/path/to/vk.zig
``` ```
This reads the xml file, parses its contents, renders the Vulkan bindings, and formats file, before writing the result to the output path. While the intended usage of vulkan-zig is through direct generation from build.zig (see below), the CLI-interface can be used for one-off generation and vendoring the result. This reads the xml file, parses its contents, renders the Vulkan bindings, and formats file, before writing the result to the output path. While the intended usage of vulkan-zig is through direct generation from build.zig (see below), the CLI-interface can be used for one-off generation and vendoring the result.
NOTE: you need to replace `path/to/vk.xml` with the spec path from whatever source you prefer, here are some example orderered from the most recommended: NOTE: you need to replace `path/to/vk.xml` with the spec path from whatever source you prefer, here are some examples orderered from the most recommended:
- Vulkan-Headers repo: - Vulkan SDK, you need the package installed on your system with environment path setup but its the most stable option:
/share/vulkan/registry/vk.xml
- Vulkan-Headers repo, doesn't require the Vulkan SDK in the build environment:
https://github.com/KhronosGroup/Vulkan-Headers/blob/main/registry/vk.xml https://github.com/KhronosGroup/Vulkan-Headers/blob/main/registry/vk.xml
- Vulkan SDK (you need the package installed on your system with environment path setup):
Windows:
Powershell: ${env:VULKAN_SDK}/share/vulkan/registry
Cmd: %VULKAN_SDL%/share/vulkan/registry
Linux:
/usr/share/vulkan/registry/vk.xml
- local vk.xml inside examples: - local vk.xml inside examples:
vulkan-zig\examples\vk.xml vulkan-zig\examples\vk.xml