blitter: a blit with no channels enabled asserts no BLTPRI CPU fence#170
Merged
Conversation
BLS follows the blitter's bus request line, and a null blit (BLTSIZE with all BLTCON0 USE bits clear) never requests the bus at all -- so with BLTPRI set it must not fence the CPU during its startup ladder either. The warm-up fence charged every BLTPRI blit ~4 colour clocks of CPU denial, which broke interrupt-driven null-blit chains: vAmigaTS Agnus/Blitter/bltint1/5 restart a USE=0 1x1 blit from the blitter interrupt every scanline, and the accumulated denial wedged the test's COLOR00 choreography into a near-solid frame (8.5% -> 95.5% divergence against the vAmiga reference in the pre-0.11 sweep). With the exemption the full Agnus/Blitter suite reads: bltint1 95.5 -> 3.9 and bltint5 95.5 -> 7.4 (both better than the 0.10-era baseline), the null-blit cputim/invisible0 case 21.8 -> 1.5, and bususage0/race0 improve; no other case moves. Jim Power (channel blits keep the warm-up fence), Rampage, and the dot-cube save-state oracles are unchanged, and all 18 golden probes are byte-identical.
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.
Found by the pre-0.11 full vAmigaTS sweep (2998 cases vs fresh vAmiga references, compared against the 0.10 release-morning baseline).
Problem
Agnus/Blitter/bltint1andbltint5collapsed from ~8-10% to 95.5% divergence: Copperline rendered a near-solid blue frame where vAmiga (and the real A500 photo in the test folder) show the interrupt-choreographed stripe pattern. Bisect: first bad at #162 (the BLTPRI BLS fence), not repaired by #166's warm-up narrowing.These tests restart a null blit (
BLTSIZEwith allBLTCON0USE bits clear, 1x1) from the blitter interrupt handler every scanline under BLTPRI. The warm-up fence charged every BLTPRI blit ~4 cck of CPU denial during the startup ladder -- but a blit with no channels never asserts a bus request at all, and BLS follows the request line. The accumulated denial across the per-line null-blit chain wedged the tests' COLOR00 choreography.Fix
bltpri_warmup_fences_cpureturns false when no channel is enabled. Channel-carrying blits keep the full warm-up fence (the Jim Power trackloader guarantee is untouched).Verification
Agnus/Blittersuite re-run against the sweep's vAmiga references: bltint1 95.5 -> 3.9, bltint5 95.5 -> 7.4 (both better than the 0.10 baseline of 8.5/10.2); the null-blitcputim/invisible0case improves 21.8 -> 1.5,bususage06.4 -> 3.2,race03.0 -> 0.02; no other case moves.cargo test --releasegreen; all 18 golden probes byte-identical; CI-exact clippy and fmt clean.Sweep summary for context (0.10 baseline -> 0.11): mean divergence 9.06% -> 7.04%, cases over 5% divergence 1148 -> 771, 1400 cases improved vs ~200 mildly moved. The remaining notable movers (
cputim2/4) are a separate story: the real-hardware photos show vAmiga does not match real hardware there either (its bars miss the red/yellow colouring that Copperline reproduces), so they are not treated as reference regressions.