Repository navigation
shader: look up an input channel without underflowing - #56
Conversation
find_input matched each input element with `(row and channel in the element).then_some((id, channel - e.col))`. then_some evaluates its argument first, so the subtraction ran for every element, also those whose first channel is past the one asked for. In a build with overflow checks (tests, debug runs) a pixel shader reading a channel below any element that starts at z or w panicked, whichever row that element was in, and packed inputs such as a float2 in .zw are common. Release builds wrapped and threw the value away. then() computes it only when the element holds the channel. Found with a random-input harness over pixel, vertex and mesh programs with matching signatures. The new test panics without the fix.
|
juwwww |
|
Tested
AI-assisted (DeepSeek V4.1 Flash coding agent). |
|
Verified
AI-assisted. |
|
checked: this was already merged (8fe0b74) while I was running these, so this is a post-merge confirmation of 5fbea47 rather than a pre-merge review. Environment: Linux x86_64 (Debian, kernel 6.12), Rust 1.98.1 from rust-toolchain.toml, cargo -j4, no game files, no GPU. What I ran (in a throwaway worktree of the PR head 5fbea47, base 97c78d1):
Review notes:
Not verified: |
shader: look up an input channel without underflowing
…t first use (Marvisak#56) With VICTORY_PIPELINE_LOW_MEMORY=1 (off by default), pipelines known to take long count against the slow-build limit when a draw or a pass over the screen requests them, not only when they were started early. Requested ones get the next free slow slot ahead of early ones (screen passes first), and quick ones, cache hits included, keep going while a long one waits, also when it heads its queue. A long one promoted from the early list is made once. The slow limit is now a quarter of the configured worker count (VICTORY_PIPELINE_WORKERS included) instead of the processor default. Queue tests cover a held slot with first-use and screen misses waiting while quick jobs proceed, the release order, screen-only workers, cache hit/miss, no pipeline library, worker-count overrides and the mode off. The existing scheduler tests are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YScU9PQ8SkVkHX9jpbC2E2
…1216, tiles let_go, Belobug, triippywhale wide, RX 6700 XT tuning
find_input matched each input element with
(row and channel in the element).then_some((id, channel - e.col)). then_some evaluates its argument first, so the subtraction ran for every element, also those whose first channel is past the one asked for. In a build with overflow checks (tests, debug runs) a pixel shader reading a channel below any element that starts at z or w panicked, whichever row that element was in, and packed inputs such as a float2 in .zw are common. Release builds wrapped and threw the value away.then() computes it only when the element holds the channel.
Found with a random-input harness over pixel, vertex and mesh programs with matching signatures. The new test panics without the fix.