Repository navigation
[integration] Linux/Proton and native Windows: boot through the story load (RT-PROTON-STORY-LOAD) - #984
Conversation
|
Rebase needed: on main ( Nothing in it can be checked on this host (Linux, no Wine, no MSVC) until it is rebased, and the runtime tests it touches need Windows anyway, so this is only the conflict report. AI-assisted. No game files. |
|
Splitting this up, as asked. This pull request stays open as the tracking branch and is not meant to merge as one piece. Each topic is being cut onto current
Merged so far: #1074 (input scripts of any length). The whole diff is mapped (312 paths, every hunk assigned to one topic), so nothing is left behind in this branch at the end. Still being cut, built and tested on Held until the pull request they build on merges: the graphics-stage heap offsets (on #974). Dropped, because @Poussistar: thank you for the conflict report. Rather than rebasing 300 files in one commit, every child is based on current AI-assisted (Claude Code and Codex agents); each child states what was built and run, and on which machine. 🤖 Generated with Claude Code |
… load (RT-PROTON-STORY-LOAD) One squashed commit of a fork that was developed on a Linux/Proton machine and tested on two native Windows machines. On all of them the retail 1.0.2.1 package now launches, shows its launch movie, first-run pages and landing prompt, runs the story load to its end with the loading slideshow drawing its artwork, and enters the world phase. A first world frame is not verified yet. docs/linux_proton.md has the setup, a healthy boot's timeline, the machines and where it stops. Runtime: frames in the title's own window; DirectStorage pinned reads, page-list scatter/gather, BCPack and unshuffle with a locally generated predictor file; pooled, device-local and deferred image backing for streamed and placed textures; enhanced barriers into LAYOUT_UNDEFINED; a bindless table that degrades instead of refusing a submission; a descriptor hash finalizer (off until a library carries it); directly indexed heap offsets for compute dispatches and VS/PS/GS draws; title buffer windows outside a fragmented arena; opt-in device-local copies of streamed buffer views; write-fault retries under the tracker lock, shared trackers and write-watched title memory for native Windows; device-loss, compute-input and memory probes. Translator: loop bounds at structured exits, the eight FidelityFX programs that use a packed-dot form the disassembler skips, buffer bounds modes per view kind, a compaction option, the hash finalizer option. Tools and scripts: Linux boot scripts (Wine/Proton, no network), a Windows boot script, the paired compute translation script. No game data. AI-assisted (Claude Code and Codex agents), reviewed and booted by people on the machines named in docs/linux_proton.md. Co-authored-by: Plaaasma <47513553+Plaaasma@users.noreply.github.com> Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
ac7c344 to
273b3bd
Compare
|
Tested
|
|
Follow-up on native Windows 11 + RTX 3060 (driver
|
|
Native Windows side of this work, from the second contributor (Plaaasma). AI-assisted: written and run with Claude Code agents, checked by me. Machine: Windows 11, Intel i9-13900K, 64 GB RAM, NVIDIA RTX 4070 Ti (12 GB, driver 630.20), MSVC 2022, Vulkan backend, no Wine. What runs natively: init reaches the running state in about 70 s, the landing prompt and first-run setup pages render and take pad input, and the story load starts at about 110 s with its slideshow art (BCPack via the locally built predictor). With the streamed-geometry copies enabled, every streamed buffer view was backed and the load ran to about 220 s. After that a compute program writes through an address that isn't mapped yet. That's the open wall, shared with the Linux/Proton machine. What I wrote or found, now part of this branch:
Happy to run native Windows checks on any of the split-out PRs. |
|
Native Windows result with #968 added, and a crash past the load that #984 alone does not reach. Counts and shapes only, no game addresses. Setup: Windows 11, RTX 4070 SUPER (64 GB RAM), own 1.0.2.1 copy. Works: package splash, launch movie, first-run pages, loading slideshow with its artwork. With #968 the story load finishes; without it (#968 answered E_NOTIMPL) the title stays on the landing screen for 9 min, as your notes predict. Then a crash, every run: an access violation in title code at a random time after the load: 36, 197, 242, 287 and 477 s in five runs. Each time the last new runtime event before it is the title's first Ruled out, one run each:
So something writes into the title's memory after the load, and it is not one of the obvious paths. The page-watch / shadow copies ( AI-assisted (Claude Code). |
|
Tested on a smaller Windows machine: Windows 11, RTX 4060 Laptop (8 GB VRAM, NVIDIA 576.80), MSVC 19.44 / Ninja / RelWithDebInfo, own 1.0.2.1 copy, head What it reaches here (seen in captures of the window, none posted):
Where it stops: at 293 s the device is removed. The last batch is refused ( AI-assisted. |
|
Follow-up, second run on the same machine and build (warm pipeline cache, same settings, 420 s allowed), with GPU memory sampled every 2 s:
AI-assisted. |
|
Native Windows retest on an RTX 3060 Ti (8 GB, NVIDIA 621.24), Windows 11 build 26300. Both runs used Xbox 1.0.2.1, the Vulkan backend, the same 29,276 translated shaders and local BCPack profile, and fresh overlays. Built with clang-cl in RelWithDebInfo.
One run per configuration, with a shared pipeline cache. AI-assisted testing and report. |
…C-README-BOOT-STATUS) The status still said the game does not boot and the PE loader row said it was untested against the real executable. Since ubiquitarianism#321, ubiquitarianism#939 and ubiquitarianism#984, main boots the game from your own copy on native Windows and on Linux through Proton, through the story load into the world phase, as docs/linux_proton.md and docs/first_run_ui.md record. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Builds on ProjectLeonida#984 (which landed IXPackageImpl4, slots 5-10, 22, and 39): wires the remaining IXPackageImpl 1-3 EnumeratePackages (slots 28/35) and RegisterPackageInstalled (slots 29/36/40) vtable entries to the offline implementation, adds the nine flat C XPackage* exports in SHIM_TABLE(xgameruntime) forwarding to the same handlers, and adds unit tests in xgameruntime_test.cpp.
…LOG-ENGLISH) runtime/shims/d3d12_xs_device.cpp printed "[rt] d3d12_xs: state blob: campo sin identificar en 0x%03x = 0x%08x", the only Spanish [rt] line; it came in with #984. It now reads "unidentified field at", as aslan2142 proposed in the coordination issue (#1608). The format arguments are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…re_dot4_inline_sel The general rule from #1495 (dot4_op_sel_fields / restore_dot4_op_sel, ported from luizwidmer/palmetto) took the stored op_sel/op_sel_hi of any v_dot4_i32_i8 that llvm-mc printed with the defaults. That translated op_sel 0 / op_sel_hi 5 with a VGPR second source, a word #1317's test_fspx_dot4_op_sel_disasm.py (case (0, 5)) requires to stay refused: only op_sel 2 / op_sel_hi 5 was measured on gfx1036. The translator suite failed there. Resolve it on the measured side: - drop dot4_op_sel_fields and restore_dot4_op_sel; - keep main's restore_dot4_inline_sel (#984) and its three call sites: the clean-listing check, the forward re-anchor search, and the exact re-anchor window #1662 added today. The general rule does not cover only those cases, so it cannot replace them; - tests/semantic/test_dot4_printed_op_sel.py now checks that the inline-integer form is restored in a clean listing and on re-anchoring, and that op_sel_hi 5 with a VGPR S1, op_sel 1 / op_sel_hi 6, op_sel_hi 4 and a non-default S2 half stay refused; - docs/design.md "Signed-byte dot products" states how each form was confirmed (hardware for op_sel 2 / op_sel_hi 5, a corpus count for the inline-integer form, refused otherwise); docs/fspx.md follows. This also settles the #1662 / #1862 overlap: #1662's call site stays. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…red fields llvm-mc decodes a VOP3P v_dot4_i32_i8 whose op_sel_hi is not [1,1,1] (op_sel bit 1 clear) but prints and re-encodes it with op_sel 0 / op_sel_hi 7, so translate() refused it as a dropped field. When those two fields are the only difference between the stored and the printed bytes, they are now read from the blob, in check_printed_encodings and in both re-anchoring paths, and the v_dot4_i32_i8 rule applies them as measured on gfx1036 (a non-default S2 half stays refused). Any other difference is still refused. This replaces ProjectLeonida#984's restore_dot4_inline_sel, which took one case of the same form (op_sel_hi [1,0,1] with an inline integer S1); that case is covered by the general check. The words llvm-mc rejects (op_sel 2 / op_sel_hi 5) are printed by shader_disasm.py (ProjectLeonida#1317) and recovered from the blob by skipped_form. The approach comes from luizwidmer/palmetto (GPL-3.0). Test: tests/semantic/test_dot4_printed_op_sel.py, hand-built words; design.md contract row and docs/fspx.md updated.
Claimed in the coordination issue as: RT-PROTON-STORY-LOAD (claim).
Depends on: none. Conflicts with / overlaps: #968 (queue slot 31, which this branch does not implement and needs), #974 (graphics root arguments and mesh user data), #976 (runtime BCPack decoder), #969 (DirectStorage destination pages), #939 (Windows first-run integration), #980 (device-loss log). Where they overlap, theirs take precedence; this branch will be rebased onto them.
Draft. It is one squashed commit on
ece4ba5b3(2026-11-23) and conflicts withmainin 21 files. It is opened now so the Linux support and the test results are visible and so pieces can be claimed and split out; see "How this can land" below.What and why
A fork of this project was developed on a Linux machine under Proton/Wine and tested on native Windows by a second contributor. On both, the retail 1.0.2.1 package now:
A first world frame is not verified yet on any machine.
docs/linux_proton.md(new) has the Linux setup, the timeline of a healthy boot, the machines and where it stops.Every item below was a stop on at least one machine:
tools/build_dstorage_history.py; bounded staging.LEONIDA_TITLE_IMAGE_POOL).LAYOUT_UNDEFINEDis accepted; it failedClose, which the title treats as fatal.fnv1a_fmix32descriptor hash (runtime and translator halves, off until a library carries the marker), because the table had clustered to 8.4 M slots for 42 k keys.LEONIDA_SKIP_COMPUTEandLEONIDA_STUB_PIPELINES. The last two are for finding a stop, not for shipping around one: every program they were used on has a fix in this branch or an open item below.Where it stops now, on both platforms: the title's ~300 calls per boot to queue slot 31 are ignored here (#968 addresses that), so streamed pages never reach their destinations and the culling compute at world start reads outside mapped memory; mesh stages do not get the heap offset.
Tested
Linux: CachyOS (kernel 7.3), Proton Experimental (Wine 11), Ryzen 5 5600X, 16 GB RAM, RTX 4070 12 GB, NVIDIA 620.73. Cross-built with clang-cl 23 and an xwin SDK. About 80 boots of the retail package on 2026-11-24; the last ones run the story load to its end in 540-630 s with ~14,000-26,000 presents and no refused submission, then lose the device in the world phase's first compute work.
Windows A (second contributor,
Plaaasma): Windows 11, Core i9-13900K, 64 GB RAM, RTX 4070 Ti 12 GB, NVIDIA 630.20, MSVC 2022. Same stages at ~70 s (initialisation), ~110 s (story load) and the same stop at ~120-190 s. Each fix in the table was confirmed there or found there.ctest -R d3d12_: 126 of 127 pass with 5 skipped on that machine.Windows B: Windows 11, Ryzen 7 9800X3D, RTX 5070. Joining; no results to report yet.
Unit tests run under Wine on the Linux machine against this tree:
d3d12_existing_heap_test,d3d12_compute_test,d3d12_graphics_direct_heaps_test,xg_xs_test(88 checks),vk_bindless_grow_test,bindless_sizing_test,descriptor_table_test,shader_library_test,title_write_watch_test(18),command_list_test,replay_texture_barrier_test,d3d12_close_parity_test(117 cases),startup_trace_test(27),vulkan_title_image_pool_test. Known red there: three checks ofxmem_teston physical-page views under Wine, and one stress test skipped under Wine (a heap-lock deadlock in the fault path that is fixed natively and still open under Wine). Translator: the suites for loop bounds, buffer bounds, the descriptor hash (eight shared vectors, interpreter and GPU) and the recovered FidelityFX forms pass; all 2,680 paired compute programs and 29 of 29 FidelityFX programs translate.GPUs tested: NVIDIA RTX 4070 (620.73, Linux/Proton); NVIDIA RTX 4070 Ti (630.20, Windows 11). No AMD or Intel GPU was available: RADV and the Intel paths are untested by us.
AI-assisted: yes (Claude Code and Codex agents wrote most of it; every result above comes from boots and test runs on the machines named, not from the agents' say-so).
How this can land
I do not expect this to merge as one pull request. Suggested order, each as its own claimed ID and small PR on current
main, and I am glad to hand any of them to whoever wants it:docs/linux_proton.mdandscripts/linux-boot/(no code).LAYOUT_UNDEFINEDbarrier and the bindless flush (each with its test).Checklist
mainand merges cleanly: no, see above.scripts/check_no_game_data.pypasses on the tree; the text above has counts, timings and settings only.docs/design.md, with how they were confirmed.🤖 Generated with Claude Code