mirror of
https://github.com/4ld0-vito/victory-gta6.git
synced 2026-11-26 21:30:45 +01:00
[PR #1] Perf Phases 2-6: GPU/CPU pipeline & memory sync optimizations #2
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
4ld0/victory-gta6#2
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
📋 Pull Request Information
Original PR: https://github.com/4ld0-vito/victory-gta6/pull/1
Author: @4ld0-vito
Created: 11/24/2026
Status: 🔄 Open
Base:
main← Head:work📝 Commits (5)
98cb97aperf: parallelize CARD_COMPARE, incremental heap_buffers, small card buffers, release VICTORY_KEYS1c4f8e5Phase 3 perf: VEH safe_copy, O(dirty) card_dirty, fused card_before submit, indirect window 512, batched defer_refreshesc3100ebPhase 4 perf: async COPY queue relay fetch, BlockRuns interval guards, RwLock journal, Deferred buffer reusec6cda00Phase 5 perf: O(K) BlockRuns::missing_ranges, parallel word-wise relay merge, zero-syscall write_mapped, incremental heap_buffersbcc0465Phase 6 perf: GPU cbv_copy & direct CBVs, kernel fallback in read_pieces/write_mapped, coalesced REMAPPED📊 Changes
7 files changed (+1455 additions, -256 deletions)
View changed files
📝
crates/victory-gpu/src/descriptor/host.rs(+16 -4)📝
crates/victory-gpu/src/draw.rs(+160 -33)📝
crates/victory-gpu/src/host.rs(+658 -75)📝
crates/victory-gpu/src/indirect.rs(+7 -10)📝
crates/victory-gpu/src/shadow.rs(+153 -33)📝
crates/victory-gpu/src/watch.rs(+461 -96)📝
crates/victory-hle/src/modules/gameinput.rs(+0 -5)📄 Description
Summary
This PR aggregates Performance Optimization Phases 2-6 on top of upstream/fork base (
578d459):98cb97a): EnabledVICTORY_KEYSin release builds; parallelized theCARD_COMPAREcompute shader; addedVICTORY_CARD_BUFFERS_MIN_KBthreshold tuning; added incrementalHeapCache&VICTORY_HEAP_TEX_MSbudgeting forheap_buffers/heap_textures.1c4f8e5): Added VEH-recoveredsafe_copy(global_asm!) replacing kernelReadProcessMemoryin hot read paths; O(dirty)DIRTY_CARDStracking; hoisted root/PSO bindings & fusedcard_beforesync submission; removed redundant NULL UAV barrier inindirect.rs; raised indirect window limit (64 -> 512); batchedState::heap_buffersrefreshes viaHostList::defer_refreshes.c3100eb): Added dedicated D3D12COPYqueue (VICTORY_COPY_QUEUE, default on) for asyncrelay_card_backfetches; replacedGuardsBTreeSets with interval-mergingBlockRuns; convertedJOURNALtoRwLock; added 3-stateShadow::watched+writes_exguard fast-path; reused heap allocations inHostList::reset(Deferred::clear()).c6cda00): AddedBlockRuns::missing_ranges()for O(K) guarding; 8-byte word-wisemerge_piece+ parallelwide_runrelay merge inrelay_card_back; coalesced disjoint <=256 KiB spans;safe_copyfast-path inwrite_mapped; incrementalHeapCache::by_copy+ smaller background sweep.bcc0465): Splitread_kernel(ReadProcessMemory) for unmapped-page fallbacks inread_pieces/write_mapped(eliminating VEH fault storms); addedHost::default_buffer+HostList::cbv_copy(VICTORY_GPU_CBV_COPY, default on) & direct 256B-aligned CBVs inroot_view/View::Constant(eliminating allfill of upload memorystalls); coalescedREMAPPEDintervals indescriptor::host.Verification & Benchmarks (Xbox Series X profile, RTX 4070 12 GB, 32 GB RAM)
cargo test -p victory-gpu: 114 passed, 0 failed, 1 ignored (warp_copy_queue_reads_after_direct_fence,warp_cbv_copy_aligns_unaligned_offset,block_runs_tests,safe_copy_tests,merge_piece_matches_bytewise_behavior).speed4_opt_release, 210s): 4.13 avg / 4.3 med / 9.7 max fpsspeed7_p3_diag,MIN_KB=64+WIDE_REFRESH=1): up to 14.8 fps peak (67.4 ms)speed8_p4_release): 6.7-7.5 fps (3.2k-3.9k draws), 15.2 fps peak (65.6 ms at 544 draws)speed10_p5_release,LATE_WAIT_LISTS=512): 15.9 fps peak (63.1 ms),512 lists in the airstalls = 0.0 msspeed12_p6_seriesx, 210s, 4K default): 8.5 fps (118.1 ms) at 3,040 draws/frame, 13.0 fps peak (77.2 ms) at 537 draws/frame,fill of upload memorysettles = 0.0 ms (down from 25-31 ms), GPU busy 66-75%speed14_p6_1080p(VICTORY_DISPLAY_MODE=1920x1080,HEAP_TEX_MS=2, 180s): 0 errors, peak 21.4 GB RAM, 4.8-13.3 fps (106-207 ms/frame at 1.3k-5.2k draws, CPUpreparing84-122 ms + relay 53-75 ms)speed15_p6_1080p_inplace(+VICTORY_INPLACE=1, 180s): 0 errors, peak 21.3 GB RAM, 76 windows (348 MB) placed in-place, process CPU dropped 1163s -> 873s, 5.2-12.9 fps (GPU settles slightly higher reading L0 in-place memory)🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.