perf(gpu,hle,loader,shader): add opt-in in-place heap, descriptor marks, raw CBV, and sharded journal #3470
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!3470
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3470"
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?
@legayclightning22 on GitHub · 2026-11-27 04:23 UTC · original
legayclightning22:perf/renderer-inplace-heap-and-descriptors→main· +1508 −13 · 14 files · 1 commits · openSummary
Adds opt-in in-place graphics heap/memory port support, descriptor-record mark/audit tracking, raw CBV reads (
VICTORY_PORT_CBV), per-block write guards (VICTORY_PORT_GUARD), and sharded submit journaling (VICTORY_PORT_JOURNAL) (616b6f9,+1508/-13).Changes
victory-gpu,victory-hle,victory-loader, andvictory-shader.0/off by default) and bounded for low-memory hosts.Verification
cargo test --locked -p victory-gpu --libandcargo test --locked -p victory-hle --libcargo clippy --locked -p victory-gpu -p victory-hle -p victory-shader --all-targets --all-features -- -D warningscargo xtask policy@borosf on GitHub · 2026-11-27 07:21 UTC · original
@legayclightning22 — I compared the three in-place PRs in #880 (comment 7212390146). Two overlaps from it: this PR and #2494 both touch
xmem.rsandwatch.rs(yours changes the guards' lock to shared and journals per-block writes, #2494 adds a section hook), and the in-place heap here cannot be judged against the other two while it is bundled with the descriptor marks, raw CBV and journal — splitting it would let each part be decided on its own.@oddmaniv on GitHub · 2026-11-27 08:19 UTC · original
Independent verification of the PR author's concurrent WARP pipeline/draw test at
616b6f903ce51aebd056de4b9fc2196d59085007.cargo test --locked -p victory-shader --lib emit::host::tests::parallel_warp_pipelines_and_draws -- --exact --nocaptureMain baseline pin:
63bcca43c6a00a758510398fa43096ce7e4f7df0.Windows x86_64 MSVC native runs. Local and remote source snapshots matched before and after each check. The adaptation applies the PR diff without additional source edits.
This is focused regression coverage, not the full workspace suite, a gameplay test, or an independent validation of every behavior in the PR. No new fix is claimed.
AI-assisted verification.
@futurepro62 on GitHub · 2026-11-27 10:06 UTC · original
NVIDIA full-suite run, to go with the reports above by oddmaniv, since none of them names a GPU run. Tested exact head
616b6f9(on its base63bcca4).Tested
dxil.dllfrom Windows SDK 10.0.26100 (the loader's default), debug.cargo build --workspace --locked, thencargo test --workspace --locked --no-fail-fast -- --test-threads=4 --skip emit::memory_tests::heap_direct_texture_reads_mark_their_heap_index --skip descriptor::host::tests::dynamic_slots_are_held_until_released --skip memory::tests::lists_share_a_table_and_copies_keep_their_views --skip emit::stride_tests::a_heap_buffer_read_by_element_takes_the_views_stride --skip emit::stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros --skip emit::synthetic_tests::gathers_at_a_level_match_the_hardware: 887 passed, 0 failed, 10 ignored.caps_disable_low_hosts,only_32_bit_graphics_memory_is_wanted_with_the_switch,a_stretch_of_one_committed_section_is_found,raw_table_views_need_sixteen_bytes,raw_reads_follow_the_shader_switch,marks_layout_matches_the_loader,marked_slots_are_taken_once_as_runs,audit_pages_are_bounded_and_round_robin,plan_parts_keeps_marked_runs_and_check_pages_disjoint,ranges_name_their_parts,claims_are_per_shard_and_per_generation,advancing_settles_old_claims,without_the_switch_every_page_is_fresh,test_flags_are_thread_local,busy_claims_are_per_block,shared_guards_yield_to_a_writer,the_sites_lea_their_stores_address,byte_check_gates_every_site,other_bytes_are_left_alone,raw_root_cbv_needs_the_switch_and_a_root_descriptor,constants_raw_is_opt_in.--skipleaves out tests that fail on main63bcca4on this card too, not because of this PR:heap_direct_texture_reads_mark_their_heap_indexends thevictory-shadertest process with0xc0000005(#2571), so without the skip the rest of that crate never reports;dynamic_slots_are_held_until_released,lists_share_a_table_and_copies_keep_their_viewsand the twostride_testshit the 1,000,000-view heap cap of NVIDIA drivers (#1835, #2317);gathers_at_a_level_match_the_hardwarefails on lane 0 (#1744).Not tested
AI use
@legayclightning22 on GitHub · 2026-11-27 13:41 UTC · original
Thanks @borosf for checking the overlap with #880 and #2494. Splitting this makes total sense—I will separate the in-place graphics heap (
port.rs/xmem.rs) into its own focused PR so it can be judged independently against the other #880 approaches, and keep this PR scoped cleanly to the opt-in descriptor marks, raw CBV reads, fine write guards, and sharded submit journal.@rpmaster2 on GitHub · 2026-11-27 18:07 UTC · original
RDNA4 (RX 9070 XT, 32 GB): the PR regresses the world even with every flag off; with the ports on it is unplayable and the copies balloon.
Setup
host wave lanes min=32 max=64616b6f9,cargo build --locked --profile diag -p victory --features diagnostics(27.6 s)--console series-x,VICTORY_PRESENT_TARGET=1x1:1, scripted keys, nothing elsecache-upstream, built bytranslate --cache --pipelines28,164 pipelines), the driver's own shader cache emptied and the machine rebooted before the pair, so both runs start from the same stateMethod: two runs of 300 s, base first (no flags) and then with
VICTORY_PORT_CBV=1 VICTORY_PORT_GUARD=1 VICTORY_PORT_JOURNAL=1; private bytes, working set, free RAM, commit and page-file usage sampled every 20 s.Results
PORT_CBV/_GUARD/_JOURNALmain63bcca4, same machineMemory, sampled every 20 s:
What was on screen
main.That is with all port flags at their default (off) in the first run, which is the part I would look at first: on this card the PR changes the world even when the switches are not set. The signature (black, then white, subtitle text drawn over itself, very low draw counts) is the same one I saw when testing the in-place sections of #2494, so my guess is that the in-place heap or the descriptor marks are taking effect outside their flag, or that they change the copy path for ranges the switch was meant to leave alone. That is a guess from the outside; the logs above are the facts.
Also worth noting for the ports run: copies go up, not down (235-609 MB a frame against 76-203 MB in the base run and 465-994 MB on
main), anddroppedstays at 314-455 a frame, so the switches are not doing here what they do in the AMD fork on the same card, wherePORT_CBVand the journal were worth ~10 ms and the copies fell.What would help me help you
PORT_CBValone,PORT_GUARDalone andPORT_JOURNALalone, 5 minutes each, on the same save — I have the machine and the warm caches, it is ~15 minutes of runs;PORT_*all on 48.7-51.1 ms in a scene of ~3,000 draws, with the copies halved. So the idea is sound; what I see here is that this implementation, on RDNA4, does not reach that state.AI-assisted: written by DeepSeek (OpenCode harness) from my run logs; counts, switches and driver version only, no game files or paths.
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.