Repository navigation
Conversation
…code and stages The draw key now has a shape: the key without the user words the stages read. A draw whose key misses but whose shape has an entry copies that entry's decode, re-reads only the user words (and merged-stage pointers), and reuses each compiled stage whose captured reads still hold, compiling the rest. APS5_NO_DRAW_DATA_HITS=1 disables it; APS5_VERIFY_DRAW_DATA_HITS=1 also decodes and compiles in full and throws when the results differ. A shape keeps its previous entries and only points at its newest key, so draws of one shape that alternate between stable user words keep their own key hits. The shape is passed only when data hits are on, so APS5_NO_DRAW_DATA_HITS=1 keeps the previous behaviour exactly. Rebased onto main a8b032b by CouchRiv (the conflicts with boykopovar#639 resolved; built and tested on Linux with an RTX 4070 Ti and RADV, and on Windows with an RTX 5080), and onto main 6ac63bf by gjonn (main's free-function decoder with its static-ABI mode, its incremental register key as the shape key). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Co-authored-by: CouchRiv <270190108+CouchRiv@users.noreply.github.com> Co-Authored-By: Gjon Gojcevic <7807870+gjonn@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.
Closed: upstream feature merged
Upstream #494 merged as
f59d91ffc35b99502f7106ffd800190a974c31c1on October 14. Current maineea428ca8includes its updated admission policy: once a shape is resident, another key is admitted only after that key has been seen before (Driver::admitDrawKey). It therefore avoids inserting every one-off replacement that this draft’s retirement follow-up addressed. The measured local experiment below established no Astro FPS gain. Closing the superseded fork integration rather than replaying the old admission policy onto current main. The branch and historical results are retained. The old baseline recommendation below applies only to that historical comparison; use a separately validated current-main build for new tests.What
Refresh Michon's draw-shape reuse proposal (boykopovar#494, source
5fe165d371c) on mainb1d07f8b123, preserving author/co-author credits, shared stage results, raw user-data-tail tracking and the newer instanced-tessellation cache guard. This is a fork validation branch, not a duplicate upstream submission. It merges cleanly with mainf785b88a625, which now includes boykopovar#5792.Admit a changing draw key when its key or shape was seen before, using separate bounded sightings tables. Preserve main's key-only admission when data hits are disabled. Refresh current user words, merged pointers and raw tail continuation on a donor decode, and validate captured reads before stage reuse.
Retire a one-off key when a newer key replaces its shape. Repeated keys remain cached, including keys promoted by a direct hit and entries whose stage variants rotate. This prevents streams of per-draw keys from keeping every superseded shape entry until a capacity eviction. Capacity and validation rules are unchanged. The branch includes the separate AudioOut2 lifetime repair (#61 / upstream boykopovar#5971) for native shutdown; it introduces no title-specific behavior or additional switches beyond boykopovar#494.
Tested
Current head
d8417359e0abuilds full Linux libraries. Ten selected cases pass without skips on Radeon RX 6650 XT / RADV Mesa 26.2.4; eleven pass on lavapipe, including tessellation. They cover draw reuse with/without pipeline libraries, changing user words, repeated keys separated by one-off keys, register-key fuzzing, prepared graphics/prebuild modes, prepared shaders and raw fragment/vertex tails. Two Radeon checks with data hits disabled also pass.The same changing-user-word fixture fails against unchanged main's draw-cache code. Removing shape admission fails decode reuse; restoring the older disabled-path policy fails admission. In the retention follow-up, disabling retirement fails the one-off-entry assertion, and removing exact-hit promotion fails the repeated-key assertion. Final restored code passes.
Radeon's direct tessellation case crashes in Mesa's pipeline optimizer on both baseline
8e57bb2d9e9and the candidate, including with data hits disabled. It bypasses the changed driver draw cache and is excluded from the ten passing Radeon cases; lavapipe passes it.Native PPSA21564
-lvl hub_crashsiteon the current head reaches standing Astro/HUD301 and a legible CRASH SITE banner with full decode/stage comparison enabled. Reported intervals contain 1,370,657 data-only hits, 841,013 stage-result comparisons and 1,363,917 one-off replacements, with no verifier mismatch. Normal close exits 0 and restores the temporary kernel setting. No input or audio-quality check was performed. Verification forces fresh stages for comparisons, so its counters are not FPS evidence.Timing: no improvement established
Same Ryzen 9 7950X / RX 6650 XT / RADV host, existing converted app, warm shared shader/pipeline caches, 3072×1728 Crash Site, pipeline enabled, no input. Each capture used only
APS5_TRACE_SECONDS=180:60, no other trace/profile/verifier flag, and terminal-attached game output. Baseline8e57bb2d9e9is mainb1d07f8b123plus the same AudioOut2 lifetime repair.8e57bb2d9e9441920a955dd8417359e0aThe first candidate was 22.44% slower by mean frame interval in this initial sequence. Retention removes most of that observed penalty, but its first capture remains about 1.06% slower than baseline. No gameplay FPS gain is established, and this stays a draft experiment. The baseline remains the recommended game-testing build.
There is one capture per version, in first-candidate / baseline / retention order, without repeat statistics. The elapsed-time windows begin at different present indices (1206 / 1052 / 1295), so animation timing is not identical; the comparison tool flags that difference. All default event buffers overflowed: phase totals include work omitted from detailed traces. These results do not prove a statistically established code-only regression or gain. Complete summaries and traces remain local along with private title assets/logs; none are committed.
CI
The previous-head build (
441920a955dagainst mainb1d07f8b123) completed partially: Linux 1,139 passed / 57 skipped / one failed (agc_driver_recorder, dma-buf probe cannot open/dev/udmabuf); both draw-reuse cases passed. Windows passed 777 / 442 skipped, zero failures. Those results do not validate the new retention commit. Fresh full Linux/Windows CI is running for current headd8417359e0aagainst current fork main. Its eligibility checkout will identify the exact tested main revision; the native comparison above remains pinned to mainb1d07f8b123.Checklist
Latest full CI update: run 38631413195 tests this published head merged into
f785b88a625922cbd2969dee878b45f8e11620df. Linux completed with 1144 passed, 57 skipped and two failures: agc_driver_recorder rejects the runner’s failed /dev/udmabuf import probe (permission denied), and guest_user_service aborts because its old event test calls before initialization. Upstream subsequently reverted that obsolete test in boykopovar#6043. Windows also completed: 780 passed, 444 skipped, with guest_user_service failing at the same obsolete event assertion (exit 0xc0000409). These failures remain recorded; the Linux run is not green.