Keep a retail title loading: DSP, Xbox formats, and a pipeline cache #150
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!150
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/150/head"
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?
@Yeetbot159 on GitHub · 2026-11-23 16:39 UTC · original
Yeetbot159:xdsp-chad→main· +1450 −165 · 15 files · 5 commits · closed without mergingSummary
chad.dllXDsp calls so a missing DSP returns success instead of a breakpoint.XCL_SHADER_DUMP=1still does that). Keep thousands of translated shaders in memory, and save each finished shader and the driver's compiled pipeline blob so the next launch does not compile them again.Test plan
cargo test --release -p xcl --lib%LOCALAPPDATA%\xcl\dxil\blob-*.xshand%LOCALAPPDATA%\xcl\pso\*.blobinstead of recompiling those shaders and pipelines@ShyVortex on GitHub · 2026-11-23 17:33 UTC · original
I ran into the same 118 depth format independently while bringing up a retail game on an NVIDIA laptop. One piece this PR doesn't have might be worth adding:
xg.rsdoesn't know 118, soGetResourceAllocationInfodoesn't get the console's size for these textures.The game I tested creates a 2560×1440 depth buffer in 118 and asks
GetResourceAllocationInfo(#25) for its size.xg::Texture::newfails on 118, soget_resource_allocation_info_xfalls back to the PC driver:UINT64_MAX, and the game stops at its own assertion that the size fits in 32 bits.pc_resource_format(118 → 45): the call succeeds, but it returns the PC's D24S8 size (a 4-byte depth plane) instead of the console's (a 2-byte depth plane). The title places resources in its own memory using that size.XG already models the D24S8 family as two planes, so 118 fits in with a 2-byte depth plane. On my branch it's this, plus a test that a 2560×1440 depth buffer in 118 has the same planes as one in 45 and is smaller:
The 2-byte depth plane is inferred from the format's name and from how XG lays out the D24S8 family, not checked against the console's own XG output. Happy to open it as a separate PR on top of this one if you'd rather.
@Yeetbot159 on GitHub · 2026-11-23 19:49 UTC · original
Follow-up
Depth buffers the console also marks as UAVs are created as D16, and a UAV view of a resource without unordered access is a null view, so that create does not remove the device. New driver compiles stay off the title thread.
xcl shaders --precompile --gentlefills the DXIL cache and the driver pipeline cache a few at a time.@Kalmarv on GitHub · 2026-11-23 20:41 UTC · original
Explicit color RTVs still reach the driver in the console format. On PR head
f924174fe0759378bdd2d961eb76b59f0a47b125, formats 116/117 becomeR16G16B16A16_FLOAT(10) in both the resource and graphics PSO. Atcrates/xcl/src/hle/d3d12x/real.rs:4104,dev_create_rtvforwards the original descriptor unchanged.I created a synthetic 16×16 format-10 render target and called the hook on an adopted D3D12 device with explicit Texture2D views. Windows x64 MSVC, RTX 5070 Ti, driver 610.74, native D3D12 debug layer. Main was
956a476bf738a098f39df4f4c8acef682e43030f; both revisions ran directly.A second issue concerns shader updates. In
crates/xcl/src/gpu/recomp/pso.rs:301, a miss in the existing build-keyed translation cache can hit the newblob-*.xshcache. Its key at line 232 includes the program and translation parameters but omits the translator build. With the same input on a new XCL build, a cached translation from the previous build can therefore be returned and stored under the new build identity. This follows from the lookup order; I did not perform a two-build cache migration test.The selected D3D12.X, DXC/PSO cache, shader and HLE modules passed 81 tests on head and 80 on main, plus the synthetic launcher selection test on each. The copied PR unit-test changes as a group could not compile on main because helpers and the PSO disk module are new; the RTV check runs independently on both. The RTV was never bound or drawn. No retail content, full workspace run or warm-launch performance measurement. AI-assisted review.
@raylitebull on GitHub · 2026-11-24 10:43 UTC · original
Closing as a stale, conflicting ~1,600-line monolith missing required template sections; its format and pipeline-cache pieces have since landed via #210, #634, and #690. If any standalone piece is still needed, please open a small single-purpose PR against current
main.Pull request closed