diff options
| author | Gabriel Schneider <[email protected]> | 2026-08-14 13:40:29 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-08-15 11:57:13 -0300 |
| commit | f67fec978a9296c651ec06bd2f43686d34ff86ee (patch) | |
| tree | cbf5568883e5888398e0887093fc5afc524fd54d /build.zig | |
| parent | 9280c597b000eed661fd98793e182fdcb640f6cd (diff) | |
| download | pardes-f67fec978a9296c651ec06bd2f43686d34ff86ee.tar.gz pardes-f67fec978a9296c651ec06bd2f43686d34ff86ee.zip | |
look: richer path/range parsing, pdf rendering, corner-drag and stepgrain snapshots
Diffstat (limited to 'build.zig')
| -rw-r--r-- | build.zig | 26 |
1 files changed, 26 insertions, 0 deletions
@@ -122,12 +122,15 @@ pub fn build(b: *std.Build) void { const mupdf_check = b.step("mupdf-check", "compile, link, render, and search docs/design.pdf with MuPDF"); const pdf_bench_step = b.step("pdf-bench", "benchmark real MuPDF page rendering (-- [--json] [--reps N] [--warmup N] [--path FILE] [--page N] [--pages N])"); const pdf_sections_bench_step = b.step("pdf-sections-bench", "benchmark PDF outline/sections paths in ReleaseFast (-Doptimize=ReleaseFast -- [--json] [--reps N] [--warmup N])"); + const pdf_scroll_bench_step = b.step("pdf-scroll-bench", "benchmark fast continuous-strip PDF scrolling in ReleaseFast (-Doptimize=ReleaseFast -- [--json] [--reps N] [--warmup N] [--path FILE])"); if (!enable_mupdf) mupdf_check.dependOn(&b.addFail("mupdf-check is unavailable with -Dmupdf=false").step); if (!enable_mupdf) pdf_bench_step.dependOn(&b.addFail("pdf-bench is unavailable with -Dmupdf=false").step); if (!enable_mupdf) pdf_sections_bench_step.dependOn(&b.addFail("pdf-sections-bench is unavailable with -Dmupdf=false").step); + if (!enable_mupdf) + pdf_scroll_bench_step.dependOn(&b.addFail("pdf-scroll-bench is unavailable with -Dmupdf=false").step); // The other half of -Dprebuilt-shaders: recompile every shader and write // the SPIR-V back into shaders/prebuilt/, which is TRACKED rather than @@ -488,6 +491,29 @@ pub fn build(b: *std.Build) void { if (b.args) |args| run_pdf_sections_bench.addArgs(args); run_pdf_sections_bench.setCwd(b.path(".")); pdf_sections_bench_step.dependOn(&run_pdf_sections_bench.step); + + // The fling scoreboard. Same real-core wiring as the sections + // bench: what it measures is one shell frame — a whole batch of + // wheel notches through update() followed by a single render() — + // so it needs the production core, not the raster wrapper alone. + const pdf_scroll_bench = b.addExecutable(.{ + .name = "pardes-pdf-scroll-bench", + .root_module = b.createModule(.{ + .target = target, + .optimize = .ReleaseFast, + .root_source_file = b.path("test/pdf_scroll_bench.zig"), + .link_libc = true, + }), + }); + pdf_scroll_bench.root_module.addImport("pardes", hx_core_mod); + pdf_scroll_bench.root_module.addImport("mupdf", mupdf_mod); + const scroll_bench_opts = b.addOptions(); + scroll_bench_opts.addOption(bool, "release_fast_core", optimize == .ReleaseFast); + pdf_scroll_bench.root_module.addOptions("pdf_scroll_bench_config", scroll_bench_opts); + const run_pdf_scroll_bench = b.addRunArtifact(pdf_scroll_bench); + if (b.args) |args| run_pdf_scroll_bench.addArgs(args); + run_pdf_scroll_bench.setCwd(b.path(".")); + pdf_scroll_bench_step.dependOn(&run_pdf_scroll_bench.step); } } |
