gpu/shadow: O(dirty) CopiedPages bitmask, lock-free mirrors & AVX2 merge/diff (2/4 of #51, stable-amd) #184
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/184"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from PastiiJay/klbf-lab. Originally posted by Vladimir-Human on 2026-11-28T18:24:51Z.
Clean port of #57 (part 2/4 of #51) onto origin/stable-amd (
75022ba, Cargo.lock untouched).Supersedes #57.
Verification (clean port on
75022ba)Imported from PastiiJay/klbf-lab. Originally posted by HandshakeHackin on 2026-11-28T19:20:29Z.
I carried the untouched-tail check requested in #57 onto this head. The retained copy, the title buffer and the GPU input each get a different byte pattern in the prefix, clean page and unused suffix. Dirty pages 62, 64 and 65 cross the bitmap’s 64-page boundary. The test compares both complete destination buffers with the scalar reference at seven tail lengths (1, 31, 32, 33, 63, 64 and 65 bytes).
On a Windows runner with AVX2 required, all five active tests in the module passed. In a separate negative control I widened the last merge by one byte. The new test failed at byte 196,609, exactly the first untouched byte for the one-byte tail. Test-only commit · Windows run and negative control.
Imported from PastiiJay/klbf-lab. Originally posted by Habluer on 2026-11-29T01:09:16Z.
Tried this on a Ryzen 5 8500G (6C/12T) + RX 6750 XT, on top of v26.11.6 with PR #26,
VICTORY_ABSENT_CACHE=1, Port 2 andLEAN_MATH=247, scenebm-v1.This PR replaces PR #26's
mask_runswithmerge_back_pieceinshadow.rs, so I had to apply it on top of PR #26 before building.Result: 11.6–12.9 FPS,
copying back19.0–21.1 ms, vs. ~13–15 FPS / 17.7–19.7 ms on my baseline. But this run had 37–56 pipelines being made throughout (the control had 0), so I don't think it says anything about the AVX2 path. Treat it as inconclusive, not a regression.If it's useful I can rerun it with a fully warm cache.
Full breakdown of the setup and measurements: #219
Imported from PastiiJay/klbf-lab. Originally posted by PastiiJay on 2026-11-29T08:25:17Z.
appreciated, and good call saying right away the run isn't clean. yes, a rerun would help: same build with and without the PR, fully warm cache, so both stay at 0 pipelines being made. the two copying back lines from steady blocks are enough
Imported from PastiiJay/klbf-lab. Originally posted by Habluer on 2026-11-29T17:34:28Z.
@PastiiJay here is the clean rerun: same warm cache, same profile and same save, one run per arm. Arm A is my current baseline build, arm B is the same build plus this PR (#184).
shaders=25717 | early=3797 | warm=8073in both arms.1E35E7DCAEF9E81C59296626242F19810A4881495B90B213B2BA2EAABE7BD5B1; with the PR5501551209C3906C61E00BBD581A3695801C25C7CE8A9EC3A8A78D5AE2FCA66F.0 being made: 13 blocks in A, 14 in B.AUTO_INPUTran in both arms with no cancellation logged. The save hash was identical before and after each run.Two
copying backlines from steady blocks (0 being madein both):Over all the steady blocks with
0 being made, copying back was:In this run the PR did not lower copying back on my machine. The median was about 3 ms higher with it. Caveats: one run per arm, A then B, no repeat and no reversed order. The draw counts per block also differ a lot (from about 1.1k to about 5.2k per frame), so I am not reading the absolute fps between the arms. I would not call this a regression either, only a result with no gain in copying back.
Ryzen 5 8500G + RX 6750 XT, 32 GB RAM, Windows 11, BM-v1.
Imported from PastiiJay/klbf-lab. Originally posted by PastiiJay on 2026-11-29T17:38:08Z.
thanks @Habluer for the clean A/B, same cache and save in both arms is exactly what makes it readable. passed on.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.