aadc1228
main: document drawTextCoverageCompareFrame as non-recoverable smoke path
a73x 2026-04-18 15:38
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>
diff --git a/src/main.zig b/src/main.zig index ec3e25f..ab6bbfd 100644 --- a/src/main.zig +++ b/src/main.zig @@ -1375,6 +1375,17 @@ fn buildTextCoverageCompareScene( }; } // Smoke-mode draw — non-recoverable on Vulkan errors. Any error returned by // this function propagates up to the caller in runTextCoverageCompareMode, // which only handles OutOfDateKHR and exits the mode on anything else. // Unlike drawClear / drawCells / renderToOffscreen in renderer.zig, this // function does NOT install a resignalFence errdefer for the post-reset / // pre-submit failure window — the smoke mode is single-shot and any pre- // submit error tears the process down before the leaked fence matters. // If this function is ever reused inside a retry loop, copy the // `submit_done` / `errdefer if (!submit_done) ctx.resignalFence(...)` // pattern from drawClear (renderer.zig). resignalFence would need to be // made `pub fn` on Context for that. fn drawTextCoverageCompareFrame( ctx: *renderer.Context, scene: *const TextCoverageCompareScene,