diff options
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -889,3 +889,21 @@ canvas, in release mode, and fails if a simple one (30 shapes) takes 1 ms to parse and draw: an equation of 8 shapes parses in 0.02 ms, draws on the CPU in 0.25 ms, and is recorded as a GPU pass in 0.02 ms (the GPU's own time is not measured). + +### Optional native profiling + +Build the host with `zig build -Doptimize=ReleaseFast -Dtracy=/absolute/path/to/tracy`. +The checkout supplies `public/TracyClient.cpp`; no profiler is downloaded or +linked by default. Linked native apps pass their `-Dtracy` option to `sketchbook.init` as +`.tracy = path` and can import `sb.modules.tracy` for their own zones: +`const zone = tracy.zone(@src(), "work"); defer zone.end();`. +The host marks frames, input polling, drawing, command painting and presentation. +These are CPU wall times (presentation includes waits), not GPU timestamps. +Use a matching `tracy-capture` or the Tracy UI. Disabled builds compile the +calls out; tests disable their zones too. The wrapper follows Pardes's small +Zig Tracy binding. Forward the same option through dependencies that also +initialize Sketchbook so the build shares one host/client module. + +ASCII text caches coverage independently of animated ink. The pinned SDL Vulkan +patch keeps memory relocation disabled and lets small transfer buffers share +allocations, avoiding hundreds of dedicated allocation frees during presentation. |
