Budget: split upload= by creator (Part of #3676 item c) #3715
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3715"
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?
Imported from R0Y00/Xbox2Windows. Originally posted by SimSalabimse on 2026-12-01T09:13:24Z.
Part of #3676 item (c). Claim: https://github.com/R0Y00/Xbox2Windows/issues/3676#issuecomment-7305589249
The
x2w-budgetline keepsupload=as the total and adds seven creator columns betweenupload=andreadback=:upload_ring,upload_slot27,upload_slot70,upload_slot148,upload_linear,upload_mesh86andupload_other, each in the live/retained form. They add up toupload=.Linux:
upload_budget_checkpasses on g++ and clang++ with-Werror=narrowing, andstartup_triage_run_check.pypasses.resource_budget.hneedsd3d12.h, so the live/retained charge sites have not been compiled yet. The Windows test PC build and WARP run ofstartup_resource_budget_creators_warpare still to come. This PR is a draft until then.#3491 changes
report_budget's signature and the local/nonlocal sources. This change leaves both alone, but it shares the category buffer (640 to 2048 bytes) and the print loop, so a small rebase may be needed if #3491 merges first.AI-assisted (Cursor)
Imported from R0Y00/Xbox2Windows. Originally posted by SimSalabimse on 2026-12-01T09:49:09Z.
Windows test at
b45c0ad3: first Windows build of the resource_budget.h changes succeeded.WARP: 8/8 passed (startup_resource_budget_creators_warp, startup_resource_budget_warp_debug0/1 with their inline controls, upload_budget, startup_triage_run, and the triage CLI check).
Hardware twins: 5/5 passed.
AI-Assisted
Imported from R0Y00/Xbox2Windows. Originally posted by SimSalabimse on 2026-12-01T11:42:16Z.
Measured the creator split on the Windows test PC with this branch combined with #3716 on main
a061032f, gfx2hlsl translate mode, about 7 minutes from startup into the first playable 3D area (prologue).Live upload heap by creator,
x2w-budgetline:So in-world, the slot-70 creator holds about 89% of live upload memory, and the ring stays small. Local GPU memory at the last line was 9,746,374,656 of a 11,187,499,008 budget. No device removal in the run.
AI-Assisted
Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-12-01T14:21:29Z.
Review: COMMENTED
The Windows PR job ran
startup_triage_run, but its 257 tests do not includeupload_budgetorstartup_resource_budget_creators_warp. Could both targets and tests be added to theprpresets so subsequent changes exercise the creator accounting on WARP?check_creatorstakes its final snapshot whilecreated27is still live. Releasing that wrapper and taking one more snapshot would exercise the other half of the log contract: one object and its allocation size should move from live to retained in bothuploadandupload_slot27, with the other creator counts unchanged.Imported from R0Y00/Xbox2Windows. Originally posted by SimSalabimse on 2026-12-01T14:53:16Z.
Added both targets and tests to the PR presets; the test selection now adds exactly
upload_budgetandstartup_resource_budget_creators_warp. The creator fixture also releases the slot 27 wrapper and checks the exact live-to-retained move while all other creator columns stay unchanged. Tested on the Windows test PC:upload_budget,startup_resource_budget_creators_warp,startup_resource_budget_warp_debug0,startup_resource_budget_warp_debug1.AI-Assisted
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-12-02T05:43:47Z.
Review: COMMENTED
I merged current main into the PR branch and resolved
CMakePresets.json, preserving its new targets and test selections alongsideupload_budget_check,startup_resource_budget,upload_budget, andstartup_resource_budget_creators_warp. Both new tests are listed by theprpreset. The Windows Debug run ofctest --preset dev --no-tests=error -j 1 -R '^(upload_budget|startup_resource_budget_creators_warp)$' --output-on-failurepassed 2/2. The GPU case used WARP (10.0.26100.9818) on Windows 11 26300.9974 with the preset's debug layer off. New hosted checks are running on the integrated head.Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-12-02T08:57:45Z.
Review: COMMENTED
The Linux failure was the export census (
d3d12_xs entries 80 != 79). I pushed a test-only follow-up that counts and checks the source evidence of the existing test hookx2w_budget_mesh86_upload_for_test.python -B tests/standin_exports_check.pynow passes 472 cases with 6/6 mutations killed, andpython -B tests/startup_triage_run_check.pypasses. No budget runtime code was changed in this follow-up. Please review2638480aonce CI has run.Imported from R0Y00/Xbox2Windows. Originally posted by SimSalabimse on 2026-12-02T11:45:01Z.
I reviewed
2638480a. It's test-only: d3d12_xs is now 80 with 45 unmeasured, and x2w_budget_mesh86_upload_for_test is checked by name with its source in src/startup_stubs/d3d12_xs_device.cpp. I ran tests/standin_exports_check.py (472 cases, 6/6 mutations killed) and tests/startup_triage_run_check.py; both passed. It looks right, and CI is green.AI-Assisted
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-12-02T19:30:38Z.
Review: COMMENTED
Revalidated
7477451dwith MSVC Debug on Windows 11 build 26300. The localupload_budget, bothstartup_resource_budget_creatorscases, andstartup_triage_runpassed 4/4 (WARP 10.0.26100.9818 and RTX 4060 Laptop 32.0.16.1656 for the GPU cases). The trial merge into23986134conflicts only inCMakePresets.json. Please keep the upload budget target and both creator selections alongside the Mesh86 additions now on main. The export catalog change is still awaiting another reviewer.Imported from R0Y00/Xbox2Windows. Originally posted by SimSalabimse on 2026-12-02T20:25:31Z.
Reply to https://github.com/R0Y00/Xbox2Windows/pull/3715#pullrequestreview-6157482825:
Merged current
maininto this branch. The only textual conflict wasCMakePresets.json: I keptupload_budget_checkandstartup_resource_budgetin the build targets andupload_budgetplusstartup_resource_budget_creators_warpin the PR test selection, alongside main's Mesh86 entries. Main's export inventory also moved, sotests/standin_exports_check.pynow expects 85d3d12_xsentries (35 implemented, 50 unmeasured) with this PR's Mesh86 upload test export, and its evidence check is kept.Run on the Windows test PC (Debug build of the merged head):
resource_budget,upload_budget,triage_runandstandin_exports_checkselections, warp and hardware: 14 of 14 pass.AI-Assisted
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-12-02T20:25:59Z.
Review: COMMENTED
I independently checked
0e300171with MSVC Debug.ctest --preset dev --no-tests=error -j 1 -R '^(startup_resource_budget_creators_(warp|hardware)|upload_budget|startup_triage_run|standin_exports_check)$'passed 5/5 on Windows 11 build 26300, WARP 10.0.26100.9818 and RTX 4060 Laptop 32.0.16.1656. The catalog passed 477 checks and caught six mutations. A trial merge onto75759370still conflicts inCMakePresets.jsonandtests/standin_exports_check.py. Please keep the new XMem selection from #3697 and the existing Mesh86 material resolver export alongside this branch's upload-budget coverage.Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-12-02T20:37:43Z.
Review: COMMENTED
I resolved the conflicts on
c4b0a933after #3728 landed. The PR preset lists both upload-budget tests alongside the existing XMem and Mesh86 selections. The catalog retained checks for the main-branch Mesh86 material resolver and this PR's upload test export. Independent MSVC Debugctest --preset dev --no-tests=error -j 1 --output-on-failure -R '^(startup_resource_budget_creators_(warp|hardware)|upload_budget|startup_triage_run|standin_exports_check)$'passed 5/5, including WARP and RTX 4060 Laptop. The integrated export census passed 478 checks with six mutations caught. The current review request is still open for the integration.Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-12-02T20:38:20Z.
Integration note for #3715 and #3716: each adds one export and bumps the same census counts. The current heads merge cleanly in Git, but I tested the combined tree and
python -B tests/standin_exports_check.pyfails withd3d12_xs entries 86 != 85. Please land #3716 first if its checks and review clear, then update this PR on the new main to expect 86 entries, including 51 unmeasured, while keeping both export-specific checks. I'll check the combined census again before the second merge.Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-12-03T06:34:50Z.
#3716 has landed in
mainat2710917d. I tested merging that baseline withb382db96:tests/standin_exports_check.pyreproducedd3d12_xs entries 86 != 85. On the trial merge, changing the two expectations to 86 entries and 51 unmeasured was sufficient: all 480 cases passed and all six mutations were caught, with both export-specific assertions active. Please include those two expectation updates when refreshing this branch.Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-12-03T07:11:40Z.
After #3732 landed, the only Git conflict against
mainat29bb2aedis nowCMakePresets.json. I resolved it locally by keepingstartup_upload_reservein the build and test selections alongsideupload_budget_check,startup_resource_budget,upload_budgetandstartup_resource_budget_creators_warp. With the two catalog counts from my previous note, the trial merge passed the triage script, stand-in catalog (480 cases and all six mutations), the MSVC upload budget check, and the MSVC slot 148 reserve check. The allocator and budget files merge cleanly.I also rebuilt the same trial merge and ran all ten
startup_resource_budget_*tests plusupload_budgetandstartup_upload_reservewith MSVC Debug: 12/12 passed, including creator accounting on WARP and RTX 4060 Laptop, with no skips. This is still the local trial merge.Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-12-03T11:14:15Z.
Review: APPROVED
Re-reviewed
ec6de0fc. The PR preset retains both the creator check and main's slot-148 reserve check, and the export catalog now counts 86 entries. Independent MSVC Debug on Windows build 26300: ctest --preset dev -j 1 --no-tests=error --output-on-failure -R '^(startup_resource_budget_.*|upload_budget|startup_upload_reserve|startup_triage_run|standin_exports_check)$' passed 14/14 with no skips. That includes WARP and RTX 4060 Laptop 32.0.16.1656 creator accounting, debug on/off and inline controls, the reserve fixture, and triage/catalog checks. I used /DEBUG:NONE for the local linker after a PDB limit. Compilation and test settings stayed in the Debug preset.Imported from R0Y00/Xbox2Windows. Originally posted by SimSalabimse on 2026-12-03T11:35:03Z.
Reply to https://github.com/R0Y00/Xbox2Windows/pull/3715#issuecomment-7370703799:
Merged current
main(d2e6a4ed) into this branch. As you described, the only conflict wasCMakePresets.json: I keptstartup_upload_reservein the build and test selections alongsideupload_budget_check,startup_resource_budget,upload_budgetandstartup_resource_budget_creators_warp.tests/standin_exports_check.pynow expects 86d3d12_xsentries with 51 unmeasured, and both export-specific checks are kept. On Linux the stand-in catalog passes (480 cases, 6/6 mutations caught) andupload_budget_checkpasses.Windows test PC, MSVC Debug build of
ec6de0fc: all tenstartup_resource_budget_*tests (WARP and hardware, including the creators pair),upload_budget,startup_upload_reserveandstandin_exports_check: 13/13 passed, none skipped.AI-Assisted