Repository navigation
Memory: defer GPU tiles for private physical page storage - #1916
CallMeBrado wants to merge 1 commit into
Conversation
Melow-code
left a comment
There was a problem hiding this comment.
896→320 MiB peak sparse pool is a strong win. The opt-in flag is the right approach since deferred allocation changes the fault pattern.
|
On an RTX 5060 Laptop GPU (8 GiB, driver 615.78.08), the Series S startup trace shows a smaller sparse pool with this option. Bazzite 44, Proton Experimental 11.0-20261112, XCL main
Both runs composited two planes. I stopped both when free VRAM stayed below 640 MiB for two samples. The window captures were still black. Neither run logged an NVIDIA Xid. This pair covers startup on one low-VRAM setup. Separately, the CPU-write / map / GPU-readback regression passed on this adapter in a composite build of the earlier main. OpenAI Codex assisted with the builds, tests and report. |
|
Full-suite run, since this PR has no test report yet. Tested exact head Tested
Not tested
AI use
|
|
Independent check of
AI-assisted. Codex (GPT-6 family, exact variant unavailable) extended the fixture, ran the test, and drafted this report. |
|
Code review on
What is still needed before merge: Independent AMD verification on |
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
A DirectStorage transfer can fill a physical page before the title maps it anywhere the GPU can use it. XCL currently allocates a GPU tile at the page's home address as soon as the CPU needs backing. In two 60-second runs on the same title, the sparse pool peaked at 896 MiB on main and 320 MiB with deferred tiles enabled. Peak process commit fell from 14,596 to 13,947 MiB.
What is in it
XCL_DEFER_PRIVATE_HOME_TILES=1. Keep CPU-only sparse page homes private until mapped. When exposing a page, upload its existing bytes even if an earlier write-watch scan already consumed the write.Tested
cargo build --locked --workspaceandcargo build --locked --release -p xclpassed.cargo test --locked --workspace --no-fail-fast -- --test-threads=4 --show-outputreported 972 passed, 4 failed and 45 ignored.gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_0through_3. The same seeds (70, 545, 1019, 1507) fail on clean main689f2dbon this adapter. All four report0x8007000EfromCreateComputePipelineState.Adapter skips reported by the workspace tests
gpu::recomp::lower::tests::a_2d_or_3d_group_agrees_with_the_hlsl_path_on_the_gpu(no wave64)gpu::recomp::lower::tests::coalesced_guarded_runs_agree_with_the_hlsl_path_on_the_gpu(no wave64)gpu::recomp::lower::tests::cross_lane_reads_agree_with_the_hlsl_path_on_the_gpu(no wave64)gpu::recomp::lower::tests::the_wave64_lowering_agrees_with_the_hlsl_path_on_the_gpu(no wave64)gpu::recomp::lower_dxil::tests::a_per_lane_2d_or_3d_group_runs_on_the_gpu(no wave64)gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu(f16 arithmetic, wave32, per-lane form: refused (unsupported V_MUL_F16 (its gpu: direct RDNA2 -> DXIL backend (no HLSL / DXC), behind XCL_DIRECT_DXIL #1426 semantics differ from the console's)) / f16 arithmetic, wave64: no wave64 / f16 packed, wave32, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its gpu: direct RDNA2 -> DXIL backend (no HLSL / DXC), behind XCL_DIRECT_DXIL #1426 semantics differ from the console's)) / f16 packed, wave64: no wave64)gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu(f32 arithmetic, wave64: no wave64 / f32 compares, wave64: no wave64 / f32 conversions, wave32, per-lane form: refused (unsupported V_CVT_F16_F32 (its gpu: direct RDNA2 -> DXIL backend (no HLSL / DXC), behind XCL_DIRECT_DXIL #1426 semantics differ from the console's)) / f32 conversions, wave64: no wave64 / f32 rounding, wave64: no wave64 / f32 three-source, wave64: no wave64 / f32 transcendentals, wave64: no wave64)gpu::recomp::lower_dxil::tests::f64_programs_on_the_gpu(f64, wave64: no wave64)gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu(integer arithmetic, wave64: no wave64 / integer carries, wave64: no wave64)gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask(no wave64)gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware(no wave64)heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows)test_title_draws_with_a_root_signature_under_the_debug_layer(no xgameruntime.dll)Regression run
Main
This branch, with deferred tiles enabled
Not tested
AMD and Intel GPUs, Wine, title-specific
XCL_SAMPLE_*fixtures, and gameplay beyond the 60-second startup run.AI use
OpenAI Codex (GPT-6) isolated the change from a local build, wrote the test, ran the checks, and drafted this description.