Repository navigation
Backport faster GFX10 tiled texture copies and measure Rosetta throughput - #163
Merged
pragyaangaur merged 1 commit intoNov 26, 2026
Merged
Conversation
Adapt Marvisak/VIctory#2736 (d33104738a) to the macOS branch. Includes the offset oracle and deterministic copy-error regression tests. Co-authored-by: brainbudt <32467201+brainbudt@users.noreply.github.com>
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.
Backports brainbudt’s tiled texture copy traversal onto macOS main. It derives contiguous run width from the swizzle, copies adjacent rows together for short runs, and processes depth slices while their tiled blocks are still in cache. The tests compare with the per-element address calculation and check that invalid inputs leave the destination intact.
I ran the same generated release benchmark against the old and new implementations on an M5 Max. Median throughput across three trials under CrossOver Preview / Rosetta, in decimal GB/s:
The last case regressed 24%. Across the 14 tested directions and layouts it was the only Rosetta regression in these trials. The native arm64 medians ranged from 1.02× to 2.19× baseline throughput. The benchmark uses synthetic surfaces. The native and Rosetta format suites each passed 39 tests with six ignored. The staged asset-policy check passed.
I also compared two separate integration builds differing only in this file, with the same prologue checkpoint and starting shader cache, at 720p. Both reached world frame +90. Frames +8 through +48 ran at 1.12 FPS on the control and 1.14 FPS with this patch. Frames +48 through +90 ran at 0.86 and 0.81 FPS respectively. Those single runs do not establish a gameplay frame-rate improvement.
The benchmark can be repeated with
cargo test --release -p victory-formats detile_throughput -- --ignored --nocapture.