Skip to content

Roadmap: retail title past world load #1833

Backlog

Description

@ivall

The current goal: the retail title gets past world loading. Its menus run at 30 fps; the world load is where most machines stop.

Work on this goal is looked at first. Everything else stays welcome, but waits longer.

Where it stops, and the issues for it

All of them: issues and PRs labelled goal:world-load.

Where things go

Labels

  • goal:world-load: bears on this goal. On PRs it was set by a script: the PR names one of the labelled issues as what it fixes or is part of. If yours is missing, say so here or on the PR.
  • off-goal: does not bear on this goal and waits; it is not a rejection. Set by a script on PRs that change only tests, scripts, CI or docs and name none of these issues. If it is wrong on your PR, say so.
  • duplicate: confirmed by two people in PR triage: duplicate PRs and batch-tested PRs, each checked by two contributors #1607.
  • stale: a PR with no activity for 3 days. It is closed 4 days later unless something happens on it; a push or a comment takes the label off. Issues, and PRs labelled goal:world-load or keep-open, are left alone.

Nothing is closed because of off-goal or duplicate alone: a second person checks it first.

AI use: Claude Code (Claude Opus 5.5) wrote this text and set the labels on the maintainer's behalf.

Activity

  1. pinned this issue on Nov 24, 2026
  2. added
    goal:world-load
    on Nov 24, 2026
  3. throny commented on Nov 24, 2026

    @throny
    Collaborator

    What another project running the same title does past world load, and what XCL could take from it (ideas only). fxceless/victory-fork (a fork of Marvisak/VIctory, also Rust with the title's x64 code running natively) says in its README (status 2026-11-25, at 2119b0e): the opening cutscene plays from start to finish, and the first gameplay scene renders, at 2–4 fps, with shadows black (no ray tracing yet) and about 24 GB in use, on one machine (RTX 4070 12 GB, 32 GB RAM). These are its own claims; I haven't run it.

    Licence first: it is GPL-3.0-or-later, and XCL is GPL-2.0-only, so no code, comments or tests can come over, not even closely paraphrased. Techniques and their published measurements can be reimplemented independently; cite the idea in the PR, not the code.

    How it handles what stops XCL, from its source (crates/victory-gpu/src/pipeline/make.rs, library.rs):

    idea there in XCL today fits
    No PSO build on the title's threads: builds on 2–8 workers at below-normal priority. Its comment: 1 200 PSOs built on the title's threads took over 30 s and the title's GPU watchdog ended the run. yes big compute builds still run on title threads (@Anon64's dumps on #1269: ungated here (a title thread's …)) #1452, #505, #1035
    One wait budget per frame for all threads (500 ms by default), then the draw or dispatch is dropped. A per-thread budget let five threads wait 2.5 s per frame. yes XCL_PSO_WAIT_MS is per pipeline; the per-frame cap is in #1652, and @milesah3ad has asked to split it out #1452, #505, #1269
    Prewarm only what the last run used: the keys of pipelines used in one run are queued at creation in the next, during loading. yes XCL_PSO_PRELOAD exists; I haven't checked whether it limits itself to pipelines a run used #1096, #1035
    PSOs built on first draw/dispatch, not at creation: the title creates ~60 000 pipelines in its first 20 s and draws with a few dozen. yes XCL_LAZY_PSO exists #1333
    ID3D12PipelineLibrary file memory-mapped and its handle kept open: it says this saved 1 352 MB and fixed a device loss when a save replaced the mapped file. yes no pipeline library on disk found in main #1598, #1566
    Physical page pool as a pagefile section with SEC_RESERVE, committed on first map (the title asks for 6.1 GiB at once). yes not found in main (SEC_RESERVE) #1566, #646, #333

    The first two are the ones most likely to matter for the world load. The project's own measurements say the watchdog was the reason for both, which matches what @Anon64, @Pipodi and others found on #1269.

    I checked XCL's side only by searching main (177cd40) for the settings and API names, so an existing PR may already cover some rows. Say so here and I'll correct the table.

    AI use: Claude Code (Claude Opus 5.5); the fork was read by a Claude Opus 5.5 sub-agent, and the README status and the wait-budget code were checked by hand.

  4. thehollowedone commented on Nov 25, 2026

    @thehollowedone

    For the prewarm row, XCL already limits lazy preloading to shader-set keys used by an earlier run. It records the key on use in used-pipelines.txt. On the next run, a matching shader set can build on the low-priority preload workers as soon as its pipeline is created. An unseen shader set stays lazy until first use. The key identifies the shaders, so different pipeline state using the same shaders can also match. Source at 8e87fc7

    On Windows 11 with Rust 1.99.1 MSVC, cargo test --offline --locked --release -p xcl --lib hle::d3d12x::pso_async::used_tests -- --nocapture --test-threads=1 passed all six tests with zero skips. The stock preload test verifies the known-key and unseen-key cases using synthetic jobs. It does not measure retail world loading.

    AI-assisted. Codex (GPT-6 family, exact variant unavailable) ran the tests and drafted this report.

  5. tugasky commented on Nov 25, 2026

    @tugasky

    For the "crashes on the way into the world" line: #1968

    #1968 is a 0xC0000005 read at 0x3e0, at 290.069 s, on the world-load path — XCL_TITLE_COMMIT_CAP_MB=32768, commit 22 481 MB at the time, so not at the cap, and no 0x8007000E anywhere in the log. stack_callers resolves the only code frame on the stack to xcl.exe+0x1aa2b6 = hle::d3d12x::real::translated_mesh_stream (real.rs:4468), which is why it is filed separately from #846, #1164 and #1401: those are faults in the title's own code, and this one lands in XCL's streaming path.

    What makes it a blocker for the goal rather than one more crash is what follows it. The process does not exit: 125 threads stay alive, 0 ms of CPU over 0.8 s, commit frozen, and XCL_RUN_SECONDS=300 never fires — only Stop-Process ended it. So the same run is both "the load crashed" (290 s) and "loading forever" (the 20 minutes after), which is the shape a player reports.

    On the same machine a run with a 40 960 MB cap reached the world-loading artwork and ran to its 420 s timeout with 5 396 frames and no exception, so the input and the hardware are not the obstacle — but it is one occurrence, and the report says so: the same press path at 32 768 MB ended in a 0xC0000409 (XCL's own allocation abort, since fixed) on one attempt and an E_OUTOFMEMORY assert on another. A second occurrence with the exception line symbolised (#1811 does that for thread dumps) would settle it.

    AI-assisted (Claude) under my review; numbers from my runs, no game data.

  6. philip-roy-jones commented on Nov 25, 2026

    @philip-roy-jones
    Contributor

    PR #2038 makes the retail title start on GPUs without conservative rasterization, such as the Radeon RX 580 (AMD Polaris).

    The RX 580's driver refuses every pipeline that asks for conservative rasterization (E_INVALIDARG). After the refusal, XCL's fallback passes the console shaders to the driver, and amdxc64.dll ends the process with 0xc0000409 before the first frame. That happens on main 656c0e8 with default settings. #2038 turns the flag off where D3D12_OPTIONS reports no tier. With it, the RX 580 shows the menus at 30 fps (1,216 frames in a 60 s smoke run) with no refused pipeline. #303 guards the same crash path from the other side.

    AI use: Claude Code (Claude Opus 5.5) ran the tests and wrote this comment.

  7. humsterbumster commented on Nov 25, 2026

    @humsterbumster

    Status from a Linux/NVIDIA box against the "past world load" goal, because the shape changed this week.

    Where the retail title stops now (RTX 5090, 32 GB, NVIDIA 620.73.04, Wine 11 / Proton 11, XCL aa9ab8a, vkd3d-proton master ec20719 = 3.2.0 + the two-hunk relaxed-vtable change, -Db_ndebug=true)

    • Menus: 30.0 fps.
    • Story load: prestream runs for 6-9 minutes building translated compute pipelines (298-355 of them, the largest 429-481 KB of DXIL taking 9-26 s each), 13.8-15.2 GB local VRAM, and then the title ends it itself: 0x80000003 at game+0x4da6315 (417 s), exit rc=1 (564 s), 0xc0000005 with a poison pattern in rax at game+0x4f28df1 (377 s). Three runs, three different end points in the title, no device removal.
    • Before the vkd3d-proton upgrade the same box died in the driver every time: err:vulkan:vkCreateComputePipelines Exception 0xc0000005 in Unix call, at 193, 200, 242, 256 and 331 s (five legs, including one with XCL_DIRECT_DXIL=0 and one with WINEDEBUG=err+all). On 3.2.0 that line is gone from every log, so the [OFFICIAL] Looking for PRs with shaders optimization #1269/Linux / NVIDIA: XCL's cached driver blob plus a warm NVIDIA shader cache crashes in vkCreateGraphicsPipelines #2003 class of stop is no longer what is blocking this box.

    What still looks wrong on the way in

    • The story phase presents 0-2 frames per 2 s and the window stays black; on vkd3d-proton 3.1 the same phase drew the loading artwork at 4.5 fps. This is not missing draws: with XCL_PSO_WAIT_MS=500 the skip counters fall from 61,978/90,508 (draws/dispatches skipped) to 2,048, and the screen is identically black.
    • D3D12.X: Write64 Signal ... would close a GPU cycle (waiters=...) – signalled on CPU repeats through the load on 3.2.0 and did not appear on 3.1.
    • VKD3D_CONFIG=ignore_shared_fence,single_queue changes nothing measurable here (same timing, same failure shape).

    So on this machine the world-load blocker is no longer shader compile time or the driver's pipeline creation; it is whatever the title trips over ~6 minutes into prestream once the queues go idle. Next step is to find which resource/state the title expects at that point rather than to tune compile concurrency.

    AI-assisted (omp / DeepSeek V4.1 Flash 1017), nv-linux class. No game data attached.

  8. humsterbumster commented on Nov 25, 2026

    @humsterbumster

    Correction to a detail in my previous comment: the 3.2.0 legs are not black for the whole story phase. Re-running with the warm pipeline cache, the title shows its splash artwork while it prestreams (~190 s after the account picker, 3840x2160) and the window goes black only when the intro scenario itself starts. The "0-2 presents per 2 s" figure covers both phases, and the failure signatures (title failfast at ~415 s cold, +0x23cf683 null write at 246 s warm) are unaffected.

    AI-assisted (omp / DeepSeek V4.1 Flash 1017), nv-linux class.

  9. Pipodi commented on Nov 25, 2026

    @Pipodi

    The goal:world-load label is missing on #2018 and #2025. Both say "Part of #1269" in the description, like #1448 and #1692 below them in the same stack, which have the label.

    AI use: Claude Code with Claude Opus 5.5 wrote this.

  10. CharlyRien commented on Nov 25, 2026

    @CharlyRien

    A request for the lists and labels above: #697 bears directly on this goal and is neither listed nor labelled goal:world-load, and the same goes for the PRs the world's geometry depends on, #541, #2092 and #1803.

    Why: on an RTX 3090 the retail title's world stays empty (nothing rasterised, flat grey behind the HUD) because its GPU-driven culling and its mesh programs read their data from the GPU view of the title's 24 GB reservation, which translated shaders cannot read today – that is #697. With those buffers made readable (local copies) on top of #541 + #2092 + #1803, geometry reaches the depth target and the G-buffer: #697 (comment) . So "Streamed textures and pages" covers the texture half (#1031, #1055, #1102) but not the buffer half, which is what keeps the world empty.

    Setup in short (the full block is in the linked comment): main 689f2db + #1329 (+ #1326, #1327), #1448, #1323, #889, #684, #929, #640, #1850, #765, #1982, #1405, #1464, three allocator-lifetime commits from wondercrash/xcl, then #541, #2092's 3442b58 state, #1887, #1803, plus local changes; XCL_UMA_SHADOW=1 XCL_HEAP_WINDOWS=1; RTX 3090 24 GB (driver 616.56), Windows 11 22631; one clean run and one partial run.

    AI use: Claude Code (Claude Fable 5.2 coordinating, Claude Opus 5.5 for the ports and the runs) did this and drafted the comment.

  11. ozimchuk commented on Nov 25, 2026

    @ozimchuk
    Contributor

    A proposal for this goal from a Linux box (Wine + vkd3d-proton, NVIDIA (32-lane waves)): the runtime's allocations go to mimalloc instead of the process heap. Measured past the world load, on a tree of candidate PRs.

    What stops the title after its world load here

    • The GPU is mostly idle (5–24 % busy, sampled every second), so the frame rate is set on the CPU.
    • Thread dumps every 2 s for 150 s after the world load (XCL_THREAD_DUMP_AT, frames resolved against the build's debug info): the title's render thread spent about 40 % of its samples inside XCL creating resources for the title (SRV creation → resource_at → create_placed_resource_x → xg::Texture::new), most of that waiting on the process heap's lock. Its submit thread waited there too (sparse::before_execute, ExecuteCommandLists), and so did about 15 DirectStorage workers, which allocate, zero and free their buffers for every request.

    The change (3 files, +26; branch mimalloc-allocator, 94cff5d on main 568e7db): mimalloc (MIT, default-features = false) as xcl.exe's #[global_allocator]. The lock file gains only mimalloc and libmimalloc-sys. mimalloc keeps per-thread heaps, so a thread's allocations and frees take no shared lock.

    Measured (300 s runs, the same settings each, XCL_PSO_WAIT_MS=50) on main c4d37be with the open PRs #455, #929, #1278, #1102, #1055, #1044, #495, #549, #751, #684, #494, #1512, #1513 and some local changes:

    after the world load, up to each run's end without (2 runs) with mimalloc (3 runs; the later two with two small further changes of ours)
    world load 113–117 s 69–75 s
    presents per second 0.33–0.41 1.41–1.64
    dispatches per second 657–850 3 580–3 987
    thread-dump samples waiting in an allocation 90–245 0 (one run with dumps)

    Corrected: an earlier version of this comment said there was no crash in these runs and gave per-second figures over 300 s. Two of the three runs with mimalloc ended early (at 191 s and 215 s): vkAllocateMemory failed while the NVIDIA driver was out of system memory (NV_ERR_NO_MEMORY in the kernel log), and the process aborted. The third ran the full 300 s; so did both runs without it. This tree without mimalloc has met the same driver limit before, later (after 5.5–8 min). Whether mimalloc itself raises the memory use or the title only gets there sooner, I have not measured yet.

    Why not on main itself: main 568e7db crashes here at the world load (80–89 s), with and without mimalloc. The title's XG copy into its memory (xg::copy_from, hle/xg.rs:713) writes to an unmapped page; #2057 at 4df1e6e does the same here. Up to that point the two runs look alike. The tree above gets past it, and I am looking for which of its changes does that.

    Not measured: Windows. Its process heap has a low-fragmentation front end for small blocks, so the gain there may be smaller; large blocks (DirectStorage's buffers, uploads) still map and unmap per allocation. A run on Windows, main against the branch, would settle it.

    If this direction is welcome, I would open it as a PR (Part of #1701, which reports ~0.5 fps under Proton), with the suite and the smoke runs.

    AI-assisted. Claude Code, Claude Opus 5.5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    goal:world-load

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions