summaryrefslogtreecommitdiff
path: root/dev/gui/gui.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-21 15:15:56 -0300
committerGabriel Schneider <[email protected]>2026-11-21 17:38:19 -0300
commit2de6284791f30ecb3bcc45fa58571418a07ac6e5 (patch)
tree175e2977e5c1696d5b409a239e79aa016caeabe6 /dev/gui/gui.zig
parent3ba1f19edb70494fc7f6b053e9c5c26c9e1daeca (diff)
downloadpardes-2de6284791f30ecb3bcc45fa58571418a07ac6e5.tar.gz
pardes-2de6284791f30ecb3bcc45fa58571418a07ac6e5.zip
replica: a client presents a frame only when a unit's steps asked for one, as the session's own frontend draws (Pardes.pump returns idle while `!needs_frame`), not whenever a unit moved the session's digest: "Pet cat" written to /ctl is two units (the write and the close), each moved the digest, and a client window drew the pet twice (the corpus's frames 45 and 46 one picture, every later frame shifted by one); `Replica.confirm` marks `moved` when the replayed unit left `needs_frame` set, read AFTER `tape.replayUnit` (before it, it is what the units before asked, and a replica's first unit has no core yet: `Replica.init` crashed on a null core), and `Replica.draw` clears `needs_frame` for a client's replica (`skips_render`: its replay is never watched, so never clears it, and replays nothing that reads it) while an in-process replica (the tests', test/perf.zig's client cells) keeps it as its replay of its session's own drawing left it (cleared, that replay skipped a host call its tape has: "diverged: the core did not make the host call 5"); a user's client no longer presents a frame for a unit that asked none (a ctl write's close, a clock read): CPU only, no picture changes; test: "a client marks its view moved for a unit of the session's whose steps asked for a frame, and not for one whose steps asked none" (a client joined as a dial joins: the session's key marks it, its pump with nothing to step does not; failed with the line before the replay, crashed as pair-7 left it); core-test 896/1056 (160 skipped), shell-test 1098/1101 (3 skipped) (+1 each); the screen-state soak `--clients 5` diverged 0, unequal 0 at 30/80/207 ms, quiet checks 510/0, 469/0, 545/0, unlisted 0, the corpus scene 22 of 22, no leak; daemon.py on Debug plain 3 of 3, --clients 3 of 3, --games (snake and life in two clients, keys stopped 0 of 153 and 0 of 152) (loads 4-8); the frame and perf gate against tree3 (gpu/pair8-g1): 77/77 frames byte-identical, gui unit-test 1695/1699, perfab corpus2x +0.087% (noise 0.072%), 121 counts within 0.1% (largest client-key-down on large +0.0705%); the corpus through a client window as a pair: frames 0-49 byte-identical to tree3's (the pet one frame), where the scene with a kitty image stops a screen-state client (the terminals' line's)
Co-Authored-By: Claude Opus <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'dev/gui/gui.zig')
-rw-r--r--dev/gui/gui.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/dev/gui/gui.zig b/dev/gui/gui.zig
index 7aba4c34..4e074a6a 100644
--- a/dev/gui/gui.zig
+++ b/dev/gui/gui.zig
@@ -1252,8 +1252,8 @@ const Client = struct {
// Idle, as the session's own window says it (writeTestStatus), once
// it has what the session was told: its digest asked when quiet
// and answered since the last unit (Link.quietCheck).
- // A replica's `needs_frame` is the session's steps' (Replica.draw
- // leaves it as it was): its own owed frame is the link's.
+ // A replica's `needs_frame` is the session's steps' since it last
+ // drew (Replica.draw): its own owed frame is the link's.
if (cl.test_mode) writeTestStatus(g, cl.in.core, cl.shell.presented and l.link.r.quiet() and !l.link.changed and !l.link.asked, l.link.dirty or l.link.owed);
if (latency_fd >= 0) return client_loop.forever;
var ms: u32 = if (cl.test_mode) 16 else client_loop.forever;