Repository navigation
Conversation
|
Update: a second fix in the same call chain, and the title now survives the full run. The Evidence (RTX 5070 Ti, standalone probe + a temporary diagnostic log in The clear value's format was mapped to the resource's typeless format itself (44), and D3D12 refuses a clear value in a typeless format — it must be the family's DSV format (45 = D24_UNORM_S8_UINT). Result on the same title / lockhart / idle GPU / 120 s: Timeline on this title: 21.7 s breakpoint (+0xcc2834, format 67) → 27.1 s breakpoint (+0x131a2ad, format 118 depth) → 120 s clean exit. Both resource-creation refusals in the chain are gone. The title is still in its front end ( |
|
Hardware check of Tested
Regression run
PR ( Not tested
AI use
|
|
Tested
Not tested
AI use
|
|
Test report on Windows + NVIDIA for Tested
Regression run From the local merge above, not from this PR's head alone. Not tested
AI use
|
|
Test report on @eizispark's Series X run above is on AMD, which takes format 67 as a target; this is the NVIDIA side, where the pipelines @CryingLaughing found are refused. Tested
Regression run Base ( This PR ( Not tested
AI use
|
|
Closing as a duplicate of #605, which is smaller, cleaner, and passes the |
What is in it
pc_resource_descmaps console format 67 (R9G9B9E5_SHAREDEXP) to PC format 26 (R11G11B10_FLOAT) when the title asks for a render target or UAV, andpc_shader_view_formatmaps a view requested in 67 onto a resource made 26 (mirroring the existing(28, 86 | 115) => 28). Plain textures (flags 0) keep format 67.pc_clearadditionally takes(console format, PC format)so an optimized clear value the console wrote in its own format follows the retyped resource. Without it the resource is created fine and still refused, because a clear value's format must match the resource's.One table-driven test covers the desc conversion (67 with flags 0/1/4/5, plus the existing 116/117 and 86/115 rules as no-regression cases) and the view conversion; two more cover the clear-value follow.
Why
On an RTX 5070 Ti (driver 32.0.16.1742), a 1920x1080 resource in console format 67 with console flags
0x300005(truncated to PC0x05) is refused by every creation path —vram::place_on_pages' reserved attempt, the arena'sCreatePlacedResource, and theCreateCommittedResourcefallback — withE_INVALIDARG. That call is the last log line before the title's0x80000003at+0xcc2834when the run usesdevice_type = "lockhart".Measured on this device with a standalone D3D12 probe (no game files):
Format 26 is 32 bpp like 67 and holds values above 1.0, so the resource footprint and the title address range (computed from the original console desc in
create_placed_resource_x) are unchanged. Format 28 would clamp HDR values; format 10 would double the bytes per pixel.The clear-value half was verified the same way: a reserved resource in format 26 with flags 0x5 creates with no clear value and with a clear value in format 26, and fails with
E_INVALIDARGwhen the clear value says format 67 or 28 — under bothD3D12_RESOURCE_STATE_COMMONandD3D12_RESOURCE_STATE_UNORDERED_ACCESS.title_textures::registeris not touched:gpu_ownedresources return fromcreate_placed_resource_xat thevram::placeearly return (device_x.rs:888-898), before the register call at line 909, so these targets are not CPU-uploaded.Tested
cargo build --workspacethencargo test --workspace -- --test-threads=4on Windows 11 (build 26200), RTX 5070 Ti, DXC 1.9.2609: 645 passed, 0 failed, 21 ignored in the main crate (666 tests), all other suites green except one e2e — details under this, it fails identically onmainwithout the patch:test_title_runs_and_game_folder_is_untouched:exit code -1073740791after 15 s, withmfplat: MFResetDXGIDeviceManagerX bridged ResetDevice failed: 0x80070057in the log. Verified as pre-existing: stashing this PR's changes and re-running on cleanmainproduces the same failure, same exit code, same mfplat line. This machine has nod3d12SDKLayers.dll, which may be related; I did not dig further since it is independent of this change.Format probe:
cargo test --release -p xcl --test format_probe -- --nocapture, 4 passed / 0 failed — local probe, not part of this PR.Regression run
Both runs on the same title,
-Seconds 180, lockhart config (see below), idle GPU, no uncommitted changes.mainis the merge base9ce2070; the PR's block names its head commit.main@9ce2070(without this PR):This PR @
1cd4dbc(both commits):What this shows and what it does not. The frame-count comparison does not apply here:
maincrashes ~21.7 s in at+0xcc2834, which is exactly the crash this PR removes — the run's last log line is thatCreatePlacedResourceX ... format 67 ... (0x80070057)refusal. With the PR, the title creates that resource (the refusal line is gone from the log) and runs to 27.1 s, then hits a new0x80000003at+0x131a2ad, whose last log line is a different refusal:CreatePlacedResourceX ... 1024x1024 format 118 flags 0x1800002 – (0x80070057)— consoleD16_UNORM_S8_UINT, already retyped toR24G8_TYPELESS, with a depth-stencil flag. That looks like the same class of problem (a console format the PC device refuses under these flags) and is worth its own investigation; I have not bundled it here since one problem per PR.lockhart(device_type = "lockhart"inxcl.toml) is used because with the defaultanacondathis title never renders at all on this machine — every activity line reads0 draws, 0 dispatchesfor the whole run, so neither run can support a frame-count comparison. Peak commit (14300 → 16233 MB, the title allocating further) is the stable number here.Not tested
gpu_ownedand do not reachtitle_textures::register).+0x131a2adbreakpoint (see above — separate investigation).AI use
AI-assisted (gpt-6.2-astra via a local relay): reviewed the approach across several rounds, wrote the standalone D3D12 format/clear probes and the patch. All measurements, source-tracing and the regression runs were executed locally by the contributor; the final text was written by the contributor.