Repository navigation
[BUNDLE] GPU host copies, descriptors, sampler heaps and footprints: 5 PRs, #322 #982 #409 #474 #1206 (rebuilt on main 70564ae) - #1426
MamaLeVrai wants to merge 12 commits into
Conversation
Two copies into title memory asked the host about the destination before every copy. copy_mapped's own comment tells what that costs: asking VirtualQuery about the source took about 2 ms per copy in the title's big pools, because the query walks the page tables to the end of the region with the same state, whatever the size of the copy. - A list's copy into title memory checked that the whole destination was committed first, with VirtualQuery. The destinations were private pools of about 600 MiB. - The copy-back of what shaders wrote used WriteProcessMemory, which asks for the destination's region before it writes: the same walk for every 64 KiB piece. Both now rely on the kernel copy the other copies already use (ReadProcessMemory on our own process). It fails on a destination page that is not mapped writable as it does on a source page it cannot read, without faulting. A title destination is asked for its region only after its copy has failed, which keeps the page retries (they write their zeros themselves) off unmapped memory. write_mapped does what it did: mapped pages are written, unmapped and read-only ones are not. One difference: a title destination that was not all mapped used to be left alone, and the bytes before its first unmapped page may now arrive (the kernel copy stops at that page). No title copy of the run below had such a destination, and none failed. Measured in the world (first mission's intro; i7-13650HX, RTX 4060 Laptop, diagnostics build), with the old and the new call timed on the same copies of one run, 41 frames of about 1.15 s each: title copies, 80 per frame (0.45 MB): the check alone 59.5 ms per frame; the whole copy now 0.56 ms copy-back, 110 pieces per frame (4.9 MB): 38.6 ms per frame; now 0.55 ms That is 98 ms of a frame (8.6 %) down to about 1 ms. In stacks of the submitting thread sampled at 10 Hz, VirtualQuery under these two calls was 47 of 462 samples before and 0 of 189 after. Two tests run both copies against reserved memory with a committed block on each side of a hole (no GPU, no game data). Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…nd invalid enum values
Transient upload buffers allocated during list recording (buffer copies, large scratch allocations) were previously created as new committed resources on every copy and dropped on list reset. They are now retained in a host-wide pool upon HostList::reset (bounded to 32 buffers, aligned to D3D12 64 KiB placement granularity) and reused by subsequent uploads with matching or compatible capacities.
…d add root.rs tests
Runtime boot check on real hardware with a retail dumpResult: no difference from I merged head 3fc262e onto
Warnings: 7, the same kinds as on Limits. Without input, the title stays on the first-boot screens. This run does not exercise saves, the intro video, the start screen, loading or the world. It shows only that the change does not break startup or the first menus on this machine. I did not run the PR's tests. Machine: Ryzen 7 7800X3D, RTX 4070 SUPER, Windows 11 25H2, game 1.0.2.1. AI-assisted (Claude Code). |
…erlaps with the GPU bundles Marvisak#189 (wave64 on 32-lane hosts) and the GPU bundles Marvisak#1426 and Marvisak#1439 overlap in three places: - host.rs, where the host is built: Marvisak#208 (Marvisak#1426) logs the capabilities summary, Marvisak#189 chooses the Wave64 mode. Both lines are kept. - host.rs, after the device helpers: Marvisak#208's adapter and capability probe and Marvisak#189's recommended_wave64_mode are two new functions at the same spot. Both are kept. - shader_cache.rs: Marvisak#189 prefixes the translation input with a mode byte (input[33..]), Marvisak#358 (Marvisak#1439) records that a translation ran (self.translated). Both are kept; the two tests of Marvisak#358 that call cached() pass Wave64Mode::Native, as Marvisak#189's own tests do. cargo clippy --workspace --all-targets --locked -- -D warnings, with and without --all-features, is clean and cargo test --workspace --locked passes (725 passed, 11 ignored, two runs). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ps, footprints) onto Marvisak#1418 + shader stack Conflicts in crates/victory-gpu/src/descriptor/host.rs: 1. `dynamic`: the warning for a full dynamic-slot heap; Marvisak#1426 adds the free-slot counts (`free_space`, which it brings). Took Marvisak#1426's. 2. buffer SRV views off a host copy: the stack (Marvisak#704) clamps NumElements to what the host copy holds and refuses an empty view; Marvisak#1426 refuses a raw view whose first element is not on 16 bytes. Independent guards: both kept, clamp first. The UAV function, merged without conflict, already has both.
…e, frame wait) onto Marvisak#1426 + Marvisak#1418 + shader stack Conflict in crates/victory-gpu/src/pipeline/host.rs, mesh pipeline stream: the stack only reformatted the blend and sample-mask subobjects; Marvisak#1439 passes the blend through `host_blend(&g.blend, &g.targets)` (which it brings and already uses for the other pipeline kinds). Took Marvisak#1439's blend, kept the formatting.
…+ Marvisak#1418) + shader stack No textual conflict; checked with cargo check --workspace --all-targets and the full test suite (RTX, WARP, all features) when first merged on the previous Marvisak#1511 head (289f241); this replay with cargo check --workspace --all-targets --all-features, and the full suite at the end of the line.
…+ Marvisak#1418) + shader stack No textual conflict; checked with cargo check --workspace --all-targets and the full test suite (RTX, WARP, all features) when first merged on the previous Marvisak#1511 head (289f241); this replay with cargo check --workspace --all-targets --all-features, and the full suite at the end of the line.
…6B16A16_FLOAT) onto Marvisak#211 + Marvisak#1024 + Marvisak#346 + Marvisak#334 + integ/next Conflicts, both in tests: 1. crates/victory-gpu/src/descriptor/host.rs: the stack's tests (`raw_views_start_on_16_bytes` and the raw/structured view tests after it, from Marvisak#1426/Marvisak#704) and Marvisak#492's four `rgb9e5_srv_*` tests at the same place; git interleaved them over shared lines (a resource description's `SampleDesc`, a closing brace), so the two hunks are not separable texts. Resolved by keeping the stack's tests exactly as they were and adding Marvisak#492's four tests whole, as Marvisak#492 has them, before `dynamic_slots_are_held_until_released` (where Marvisak#492 put them). The resulting diff of the file against the previous head equals Marvisak#492's own (+235/-5 against main). 2. crates/victory-gpu/src/resource.rs: the stack's `get_desc_reports_the_allocated_mip_chain` and Marvisak#492's `r9g9b9e5_target_format_substitutes_rgba16f` / `r9g9b9e5_render_target_and_uav_textures_create_on_host` at the end of the module. The shared text holds the `#[test]` before and the closing braces after: the stack's test is closed in the hunk and Marvisak#492's follow as separate tests (not nested). The non-test changes (`target_format`, `fits` taking a resource description, `fits_texture_srv`, RTV and pipeline formats) merged without conflict. `fits` has no other caller in the stack. Uploads from title memory still skip render-target/UAV textures (`texture::title_written`), so no 4-byte RGB9E5 rows are detiled into a substituted 8-byte texture. Known open point from the review, not fixed by Marvisak#492: a copy between a substituted target and a sampled-only RGB9E5 texture would mismatch formats on the host; no report shows the title doing that. No non-textual fix needed (cargo check --all-targets --all-features).
3fc262e to
2f99619
Compare
|
Automated triage for the maintainers. Needs rebase. This pull request conflicts with Generated by Claude Code |
One PR in place of 5. After
mainmoved, this bundle keeps the 5 of its earlier 15 PRs that still merge; the left-out ones are listed below. The earlier description follows, and may mention PRs or measurements that no longer apply. Fifteen GPU PRs on host memory copies, upload buffers, adapter selection, descriptor tables, sampler heaps, texture footprints and root signature validation. Every head is merged unchanged ontomain(70564ae, after the maintainer's 28 commits of Nov 24, 22:36 CET), and the result is built and tested together.What is inside
b58d198d9b4abe5db6340499c44e34cb5396ef0c3e944Changes made while bundling
No PR was edited, and there is no hand resolution: a PR that does not merge as it is, is left out (below).
Left out, and why
Rebuilt on the new
main. The earlier version of this bundle had 15 PRs; 5 merge here in order, each checked with clippy as it went in.main(or with an earlier PR of this bundle) in crates/victory-gpu/src/host.rs.main(or with an earlier PR of this bundle) in crates/victory-gpu/src/host.rs.main(or with an earlier PR of this bundle) in crates/victory-gpu/src/host.rs.main(or with an earlier PR of this bundle) in crates/victory-gpu/src/host.rs.main(or with an earlier PR of this bundle) in crates/victory-gpu/src/descriptor/host.rs.main(or with an earlier PR of this bundle) in crates/victory-gpu/src/descriptor/host.rs.main(or with an earlier PR of this bundle) in crates/victory-gpu/src/descriptor/host.rs.main(or with an earlier PR of this bundle) in crates/victory-gpu/src/resource.rs.Verification
Windows 11, RX 6950 XT, Rust 1.98.1 (the pinned toolchain):
cargo clippy --workspace --all-targets --locked -- -D warningscargo clippy --workspace --all-targets --all-features --locked -- -D warningscargo test --workspace --lockedmain: 476 passed, 7 ignored)The title was not run, so this says nothing about in-game effect. No game data is used or committed.
Re-verify in one go
To confirm that no component PR moved since this was built, compare each
Headabove withgh pr view <n> --repo Marvisak/VIctory --json headRefOid. If one differs, the branch needs a rebuild: merge the new head in the same order.If this lands
The component heads are in the history unchanged, so each PR's commits and authorship are kept and GitHub should mark them merged. Merging them one by one instead works too, with the exceptions noted above.
AI-assisted (Claude Code); no game data.
🤖 Generated with Claude Code