Add vulkan video support

Implements #174.
This commit is contained in:
Robin Voetter
2025-03-15 02:42:05 +01:00
parent dcd538828c
commit dcb1d96c59
11 changed files with 544 additions and 321 deletions

View File

@@ -4,6 +4,7 @@ pub fn build(b: *std.Build) void {
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});
const maybe_registry = b.option(std.Build.LazyPath, "registry", "Set the path to the Vulkan registry (vk.xml)");
const maybe_video = b.option(std.Build.LazyPath, "video", "Set the path to the Vulkan Video registry (video.xml)");
const test_step = b.step("test", "Run all the tests");
// Using the package manager, this artifact can be obtained by the user
@@ -23,6 +24,11 @@ pub fn build(b: *std.Build) void {
if (maybe_registry) |registry| {
const vk_generate_cmd = b.addRunArtifact(generator_exe);
if (maybe_video) |video| {
vk_generate_cmd.addArg("--video");
vk_generate_cmd.addFileArg(video);
}
vk_generate_cmd.addFileArg(registry);
const vk_zig = vk_generate_cmd.addOutputFileArg("vk.zig");