From be09d1ec7abd71f4e52f05942a941d76b6d420f2 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Mon, 28 Sep 2026 16:26:08 -0300 Subject: Post chain review fixes: glslc on stdin, level A at the display's refresh Stage 9 review: a user's Shadertoy file goes to glslc on its stdin, so no source file is written anywhere (the old predictable name under XDG_RUNTIME_DIR or /tmp was a symlink-clobber hazard). std's spawn does all its allocation before fork and searches PATH on the stack after it, said at the call. Level A redraws are paced by the display's refresh rate (SDL_GetCurrentDisplayMode), not a fixed 16 ms. Shared files touched: gui.zig. --- docs/render-pipeline.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'docs') diff --git a/docs/render-pipeline.md b/docs/render-pipeline.md index 254187a3..d991a1ce 100644 --- a/docs/render-pipeline.md +++ b/docs/render-pipeline.md @@ -492,11 +492,11 @@ Mirror ghostty 1.3.2 (`zig-pkg/ghostty-*/src/renderer/shadertoy.zig`, `crt.zig` is deleted. If the user insists on barrel in the bundled CRT, keep `crt.zig`'s inverse keyed to "bundled crt active". - **Compile** (decision 3): a user's file is compiled by spawning `glslc` with - the build's own invocation (`-fshader-stage=fragment -o -`, SPIR-V on - stdout), on a thread of its own when the file joins the chain, never on the + the build's own flags, prefix and file on its stdin, SPIR-V on its stdout + (no file of ours anywhere; std's spawn allocates before fork), on a thread of its own when the file joins the chain, never on the frame path; the result is taken in at the next loop step. The prefix ends in `#line 1`, so glslc's errors count the file's own lines, and they name the - file, not the temporary source. A failed compile keeps the file's last good + file, not ``. Level A redraws once a refresh of the window's display. A failed compile keeps the file's last good pipeline and says glslc's first line as a message; glslc missing is said once, and only files stay off (the bundled passes are compiled with the build, through the same prefix). No file watching: `Shader ` twice -- cgit v1.3