Repository navigation
fix: split the bloom blur so every toolchain can type-check it - #1
Merged
Merged
Conversation
Swift 6.3.1 compiles the nested closure fine; the toolchain on the macOS runner gives up on it, which is the worst way to find out — green locally, red in CI. The two passes are now separate methods with explicit signatures and the index arithmetic hoisted into named locals, so nothing in the expression is large enough to strain inference. The composited frame is byte-identical before and after at a fixed seed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The first CI run on
mainfailed to build:blurBloominlined the index arithmetic for both blur passes into two nestedwithUnsafeMutableBufferPointerclosures. Swift 6.3.1 locally handles it; thetoolchain on the
macos-15runner gives up. Green locally, red in CI — theworst failure mode for a build only one machine ever compiles.
Approach
The two passes are now
blurRowsandblurColumns: static methods withexplicit signatures, with the incoming and outgoing indices of the sliding
window as named locals rather than sub-expressions. Nothing left is large enough
to strain inference. The loop structure and the arithmetic are unchanged.
Look at this sceptically
before and after at a fixed seed (
WINDFLOW_SEED=99, 800×450, t=20s). Thepaint checksum alone would not have proved this — bloom never touches the
paint buffer — so the comparison is of the final PNG.
expression from tripping a different toolchain, and CI is the only thing that
would catch it. The composite loop in the same file nests nine closures and is
the obvious next candidate.