From 30a603341e3b23da6e5ab5995b060c8e4ec52242 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Tue, 17 Nov 2026 00:01:02 -0300 Subject: test: the GPU move's gates, sharper: a window the harness starts runs under PARDES_TEST_WRAP when it names a command (perf stat, a script), given the window's argv, its binary made absolute; a test window's series keeps its frames as PAM (P7 RGB_ALPHA), so the corpus sees the alpha a blend writes (latest.ppm and every other capture stay RGB); the corpus adds a translucent addon picture, test/veil.zig (zig build veil: a GPU pass that clears to half alpha and draws nothing), for the addon pipeline's colour factor, which the snake's opaque picture never showed; the snake's window ends with its pane gone and at rest, so it ends having drawn as many frames every run --- build.zig | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'build.zig') diff --git a/build.zig b/build.zig index 0e67b61e..7e3c812d 100644 --- a/build.zig +++ b/build.zig @@ -447,6 +447,7 @@ pub fn build(b: *std.Build) void { const addon_mod = b.createModule(.{ .root_source_file = b.path("src/kinds/addon.zig"), .target = target, .optimize = optimize, .imports = &.{.{ .name = "pardes_addon", .module = kind_mod }} }); const snake_shader_step = b.step("snake-shader", "build the optional GPU snake addon into zig-out/lib"); var snake_shader_lib: ?*std.Build.Step.Compile = null; + const veil_step = b.step("veil", "build the frame corpus's translucent GPU test addon (test/veil.zig) into zig-out/lib"); if (b.lazyDependency("sketchbook", .{ .@"gpu-only" = true })) |sb| { const files = b.addWriteFiles(); for ([_][]const u8{ "vert", "frag", "post.frag" }) |stage| { @@ -461,6 +462,9 @@ pub fn build(b: *std.Build) void { snake_shader_lib = lib; snake_shader_step.dependOn(&b.addInstallArtifact(lib, .{}).step); snake_shader_step.dependOn(&b.addRunArtifact(b.addTest(.{ .root_module = module })).step); + // The frame corpus's translucent addon (test/veil.zig), into lib/ beside the snake. + const veil = b.addLibrary(.{ .name = "veil", .linkage = .dynamic, .root_module = b.createModule(.{ .root_source_file = b.path("test/veil.zig"), .target = target, .optimize = optimize, .imports = &.{ .{ .name = "addon", .module = addon_mod }, .{ .name = "gpu_scene", .module = sb.module("gpu_scene") } } }) }); + veil_step.dependOn(&b.addInstallArtifact(veil, .{}).step); } // The PDF addon (addons/pdf/pdf.zig over MuPDF through pdf_bridge.c), built // and installed as the image addon is: compiled only for a step that -- cgit v1.3