Repository navigation
Keep a retail title loading: DSP, Xbox formats, and a pipeline cache - #150
Yeetbot159 wants to merge 5 commits into
Conversation
Connect, activate, submit, deactivate and disconnect succeed. Each command finishes in the call, and an output block inside the registered buffer is silence.
Keep chad.dll on the audio processor. Drop the separate XDsp module so the two implementations do not both claim the DLL.
…formats. A cold load translated every shader twice and kept only 128 of them, and the driver recompiled every pipeline on the next launch. Xbox D16-with-stencil was also rejected as an unknown format.
|
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: The game I tested creates a 2560×1440 depth buffer in 118 and asks
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: // depth + stencil formats: a 4-byte depth plane and a 1-byte stencil plane – a 2-byte
// depth plane in the console's own D16_UNORM_S8_UINT (118) and its plane views (119, 120)
let planar = matches!(format, 19..=22 | 44..=47 | 118..=120);
let (e, side) = if planar { (if format >= 118 { 1 } else { 2 }, 1) } else { element(format).ok_or(E_INVALIDARG)? };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. |
…shaders beside other work. A console depth buffer that is also a UAV is created as D16, and a UAV view of a resource without unordered access is a null view. New pipeline compiles stay off the title thread. xcl shaders --precompile --gentle fills the DXIL and driver caches a few at a time. Co-authored-by: Cursor <cursoragent@cursor.com>
Follow-upDepth 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. |
…pelines that carry an amplification shader. Upstream shares one deadline across frame-event types and runs ExecuteCommandListsX, which is what gets a retail title to a steady 30 fps. An amplification shader is still not translated; the mesh shader is, so the pipeline is created instead of refused. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Explicit color RTVs still reach the driver in the console format. On PR head 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
A second issue concerns shader updates. In 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. |
Summary
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