Avoid redundant VU cycle work - #248
Open
GTTeancum wants to merge 2 commits into
Open
Conversation
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.
Summary
instruction boundaries already retire them in
advanceOneCycle(), beforePATH1 reads VU memory, so the next loop iteration need not repeat that scan.
memcpy.Retain byte-wise wrapping for split qwords and unsigned address overflow.
checks, write-readiness updates, and first-written-register selection. VI0
remains excluded and registers are still visited in ascending order.
boundaries, complete packet equality, and zero/one-cycle resume timing.
loads to the same register, VI0, high registers, final values, cycle counts,
and the end-bit delay slot.
No instruction arithmetic, pipeline latency, event order, packet batching, or
game-specific behavior is changed. This PR is based directly on upstream main
14b1e5cand does not depend on the occupancy-mask or operand-preparation PRs.Validation
failures are not represented as passing by this result.
register/pipeline state, all 16 KiB of VU data, and every emitted GIF byte and
emission cycle. All 4096 timed executions match, digest
75d4ff1e67bbbc4c.The replay tool is not part of this PR, and no retail microcode or data is
included or redistributed.
Nine interleaved runs of the captured workload measured median execution times
of 589.740 ms before and 564.147 ms after removing the duplicate retirement scan
(about 4.3%). This measurement is from the bring-up branch, not this clean
upstream branch. Packet-copy-only timings were noisy, so no separate gain is
claimed. These are VU workload timings, not whole-game FPS measurements.
For the VI-mask follow-up, a longer nine-pair comparison alternated execution
order and used 512 repeats per captured case (16,384 timed slices and 20,891,136
VU cycles per run). Median execution time fell from 2299.731 ms to 1981.324 ms,
about 13.85%, with the same state/memory/GIF digest throughout. Every candidate
run in that batch was faster than every baseline run. These numbers are also
from the bring-up branch and do not constitute an end-to-end FPS claim.