GPU capture: checksum PNG chunks by byte #3757
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3757"
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 Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-28T15:43:13Z.
Use a compile-time 256-entry table for the existing PNG CRC polynomial. A chunk now does one table lookup per byte. The checksum covers the chunk type and payload, and the writer stores it in PNG byte order. PNG specification
The optimized Windows fixture compared the exact old and new CRC code with miniz_oxide 0.9.1 and generated rows. After compression had produced the same IDAT bytes, the median time to assemble a PNG across 11 alternating pairs was:
All four PNGs matched the old output byte for byte. Independent zlib checks verified the three chunk CRCs and decoded rows in every file. Complete encode timings ran separately and varied more across repeats, with most time spent compressing the rows.
The capture tests, both strict GPU Clippy configurations, and the asset policy passed.
Please retain the Git author on cherry-pick or rebase, or add
Co-authored-by: andrewpozdnakov7-jpg <[email protected]>if folding the change into another commit.AI-assisted with OpenAI Codex.
Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-28T15:47:30Z.
Windows CI passed on
1cdd5c3, including both Clippy configurations and the workspace tests. All four generated PNGs matched byte for byte and passed independent CRC and decode checks. For the generated mixed 4K case, assembly from the compressed data took 56.968 ms before and 27.491 ms with this change across 11 alternating pairs. The five capture tests passed locally.The next step is maintainer review. Please retain the Git author on cherry-pick or rebase, or add
Co-authored-by: andrewpozdnakov7-jpg <[email protected]>if folding the change into another commit.AI-assisted with OpenAI Codex.
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.