summaryrefslogtreecommitdiff
path: root/build.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-17 00:01:02 -0300
committerGabriel Schneider <[email protected]>2026-11-17 12:15:01 -0300
commit30a603341e3b23da6e5ab5995b060c8e4ec52242 (patch)
tree9a24941b147a5265e6b0726285e9501cd7b61c6d /build.zig
parentafc60e735274b0de5423ac375a9ea582f64b516f (diff)
downloadpardes-30a603341e3b23da6e5ab5995b060c8e4ec52242.tar.gz
pardes-30a603341e3b23da6e5ab5995b060c8e4ec52242.zip
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
Diffstat (limited to 'build.zig')
-rw-r--r--build.zig4
1 files changed, 4 insertions, 0 deletions
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