Repository navigation
Conversation
…ed view A DSV made without a description of a typeless depth buffer gets XCL's default view (`default_dsv`, since 38b05b7). It was TEXTURE2D for every 2D buffer, also a 4x MSAA one. Minecraft makes such a view of its 1920x1080 4x MSAA R24G8 depth buffer; the AMD driver (RX 9070) then faulted reading address -1 in ClearDepthStencilView, the device was removed (invalid call) and Minecraft's crash handler ended the process ~2 s in with 0xC0000409, which left no trace in XCL's log. A multisampled buffer now gets TEXTURE2DMS (TEXTURE2DMSARRAY with slices), as `pc_srv` already does for its default SRV.
… recent Since f9e6ac5 the virtual gamepad makes a reading only when its state changes. With nothing pressed, GetCurrentReading kept handing out the reading from the title's start, its timestamp seconds old. Minecraft takes that for a pad that is gone: ~13 s in, its menu showed "your controller was disconnected" (the gamepad_disconnected screen). Before f9e6ac5 every current reading was a new one. The pad now also reports its unchanged state once per poll interval (4 ms), as a connected device does; a change still makes its reading at once, and the retained history and its next / previous readings work as before.
|
Tested on NVIDIA: the crash is fixed there too, but the menus have texture glitches that the Nov 23 build doesn't have. Setup: RTX 5070 Ti (driver 32.0.16.2114), Ryzen 7 7800X3D, Windows 11 Pro build 26300, release builds. Same title and version as in the PR description. Crash
xcl-smoke blocks (same title, 60 s)Glitches
It looks like the UI drawing from the wrong texture data. Not bisected. Since it started after f5999e4, it may come from 38b05b7 too, but that's a guess. Not tested: AMD (do you see it on your 9070?), the controller fix (no pad in these runs), the test suite. Also on this machine: without Claude Code with Claude Opus 5.5 ran the builds, the smoke runs and the screenshots, and wrote this report; checked by Fonias. |
|
Follow-up on the menu glitches from my earlier comment (wrong icons, black and white boxes, magenta / blue / noise backgrounds). They don't come from this PR. Bisected on the same RTX 5070 Ti machine. First bad commit: 9acc031 "D3D12.X: a submit looks at the textures under its written pages, not at all of them (local test)". It came into Method: each build had this PR's DSV fix (caeff35) on top, plus the GameInput commit where it applied. Each run used
What in 9acc031 does it (all at 9acc031 + DSV fix):
So the new texture index looks fine. What breaks it is the write-watch timing, and mostly the walk's longer pause. Likely mechanism (inferred from the code and these runs, not traced): with hot looks (7c18bc4), a submit only takes written pages from 2 MiB blocks written in the last On current main (this PR's head, c4be321):
A real fix probably needs a submit not to proceed while CPU writes in cold blocks before it are still unseen, rather than relying on the walk's timing. Turning hot looks off by default would fix this title, but the code's own comment measures 4–7 ms a look on a large retail title, so I haven't proposed it as a patch. Not tested: AMD, other titles, the test suite with any of these changes. Claude Code with Claude Opus 5.5 did the bisect, the experiments and this write-up; posted at Fonias's request without Fonias checking it first. |
Two regressions that stopped Minecraft Preview (1.18.30.64) on current main, one commit each.
default_dsv, since 38b05b7) asTEXTURE2D. The AMD driver faulted inClearDepthStencilView(a read at -1), the device was removed (invalid call) and the title ended ~2 s in with 0xC0000409, with nothing in XCL's log (its own crash handler fail-fasts). The default DSV of a multisampled buffer is nowTEXTURE2DMS/TEXTURE2DMSARRAY, aspc_srvalready does for SRVs. This part overlaps D3D12.X: fix default_dsv MSAA/1D dimensions and DXGI_FORMAT_UNKNOWN on typeless depth buffers #3280 and D3D12.X: match default depth views to MSAA textures #1087 (both conflict with main; D3D12.X: fix default_dsv MSAA/1D dimensions and DXGI_FORMAT_UNKNOWN on typeless depth buffers #3280 also changes 1D views and UNKNOWN formats).GetCurrentReadingkept returning the reading from the title's start. ~13 s in, Minecraft's menu showed "your controller was disconnected" (itsgamepad_disconnectedscreen). Before GameInput: retain recent gamepad readings between polls #565 every current reading was a new one. The pad now also reports its unchanged state once per poll interval (4 ms); a change still makes its reading at once, and the retained history works as before.What is in it
D3D12.X: a default DSV of a multisampled depth buffer is a multisampled view–crates/xcl/src/hle/d3d12x/real.rs(default_dsv, tests indefault_dsv_tests)GameInput: an idle gamepad keeps reporting, its current reading stays recent–crates/xcl/src/hle/gameinput.rs(ReadingHistory::record, testan_idle_gamepad_keeps_reporting)Tested
cargo build --workspace && cargo test --workspace --no-fail-fast -- --test-threads=4at c4be321: 2899 passed, 8 failed, 51 ignored; SKIPPED: 2 (two_pass_binds_set_the_shared_view_heap,heap_window_out_of_memory_falls_back_to_the_switch_form: no heap windows).gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1and_3,gpu::recomp::heap_window_tests::gpu_smem_flat_descriptor_windows_and_limits,gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu,gpu::recomp::tests::gpu_f32_compares_with_nan,gpu::recomp::tests::gpu_float_compares_random,gpu::recomp::tests::gpu_ps_readfirstlane_loop_on_a_primitive_edge_ends,gpu_two_pass_cache_e2e::two_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobs.a_multisampled_depth_buffer_gets_a_multisampled_view(view dimension 3 instead of 5),an_idle_gamepad_keeps_reporting.Minecraft.Windows.exe.original), release builds of this diff on f07e426 before it was committed: main ends ~2 s in with 0xC0000409; with the DSV fix alone it runs at 60 fps but shows the controller-disconnected dialog ~13 s in; with both a 30 s run reaches the main menu with no dialog (frame dumps), 60 fps, 0 ERROR lines, exit 0. A longer run was also checked by hand in the menu.Regression run
xcl-smokeblocks in this PR.Not tested
scripts/smoke.ps1regression runs (main and this head).GetCurrentReading).AI use
XCL_PROBEand disassembly of the title to trace the dialog; a build of 5c6bbc5 to confirm it was a regression), wrote the code, the tests, the commit messages and this description.