a73x

aadc1228

main: document drawTextCoverageCompareFrame as non-recoverable smoke path

a73x   2026-04-18 15:38

Commit message
main: document drawTextCoverageCompareFrame as non-recoverable smoke path

Final review flagged that this function is missing the
submit_done/errdefer fence-state recovery pattern used in drawClear,
drawCells, and renderToOffscreen. Intentional — this is a single-shot
smoke mode where any non-OutOfDateKHR error tears the process down
before the leaked fence becomes a hang. Add a comment so the next
contributor doesn't reuse this shape inside a retry loop without
copying the recovery pattern over.

Part of issue ab6c92f0.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

src/main.zig
Old New
@@ -1375,6 +1375,17 @@ fn buildTextCoverageCompareScene(
1375 }; 1375 };
1376 } 1376 }
1377 1377
1378 // Smoke-mode draw — non-recoverable on Vulkan errors. Any error returned by
1379 // this function propagates up to the caller in runTextCoverageCompareMode,
1380 // which only handles OutOfDateKHR and exits the mode on anything else.
1381 // Unlike drawClear / drawCells / renderToOffscreen in renderer.zig, this
1382 // function does NOT install a resignalFence errdefer for the post-reset /
1383 // pre-submit failure window — the smoke mode is single-shot and any pre-
1384 // submit error tears the process down before the leaked fence matters.
1385 // If this function is ever reused inside a retry loop, copy the
1386 // `submit_done` / `errdefer if (!submit_done) ctx.resignalFence(...)`
1387 // pattern from drawClear (renderer.zig). resignalFence would need to be
1388 // made `pub fn` on Context for that.
1378 fn drawTextCoverageCompareFrame( 1389 fn drawTextCoverageCompareFrame(
1379 ctx: *renderer.Context, 1390 ctx: *renderer.Context,
1380 scene: *const TextCoverageCompareScene, 1391 scene: *const TextCoverageCompareScene,