diff --git a/build.zig b/build.zig index a9a2be0..8fef2dc 100644 --- a/build.zig +++ b/build.zig @@ -257,12 +257,17 @@ pub fn build(b: *std.Build) !void { } fn addCTS(b: *std.Build, target: std.Build.ResolvedTarget, impl: *const ImplementationDesc, impl_lib: *Step.Compile, comptime mode: RunningMode) !*Step { + const arch = if (target.query.cpu_arch) |arch| arch else builtin.cpu.arch; + if (!arch.isX86()) + return error.NoCTSForPlatform; + const cts = b.dependency("cts_bin", .{}); const cts_exe_name = cts.path(b.fmt("deqp-vk-{s}", .{ switch (if (target.query.os_tag) |tag| tag else builtin.target.os.tag) { .linux => "linux.x86_64", .windows => "windows.exe", + .macos => "macos.x86_64", else => return error.NoCTSForPlatform, }, })); @@ -334,12 +339,17 @@ fn addCTS(b: *std.Build, target: std.Build.ResolvedTarget, impl: *const Implemen } fn addMultithreadedCTS(b: *std.Build, target: std.Build.ResolvedTarget, impl: *const ImplementationDesc, impl_lib: *Step.Compile, comptime mode: RunningMode) !*Step { + const arch = if (target.query.cpu_arch) |arch| arch else builtin.cpu.arch; + if (!arch.isX86()) + return error.NoCTSForPlatform; + const cts = b.dependency("cts_bin", .{}); const cts_exe_name = cts.path(b.fmt("deqp-vk-{s}", .{ switch (if (target.query.os_tag) |tag| tag else builtin.target.os.tag) { .linux => "linux.x86_64", .windows => "windows.exe", + .macos => "macos.x86_64", else => return error.NoCTSForPlatform, }, })); diff --git a/build.zig.zon b/build.zig.zon index 5eceb52..a7d1c3f 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -23,8 +23,8 @@ .hash = "zmath-0.11.0-dev-wjwivdMsAwD-xaLj76YHUq3t9JDH-X16xuMTmnDzqbu2", }, .cts_bin = .{ - .url = "git+https://git.kbz8.me/kbz_8/Vulkan-CTS-bin.git#b316a134bc0aa7ac21d9c57a1df588809824dcdc", - .hash = "N-V-__8AAF9uOh0I4P_99za7N822J3JwsDaqONrFVrcEQo59", + .url = "git+https://git.kbz8.me/kbz_8/Vulkan-CTS-bin.git#190a251847dd8d41b1cd05493d5e2b5fd3d4cd32", + .hash = "N-V-__8AAF_AmSKsM1ucsQiHOIC71T6pFAneEsOu2hzlc2IA", }, .drm = .{ .url = "git+https://github.com/Kbz-8/zig-drm#409f58daa8f5174b2fcb8897f1c30f0b0729b611",