Tests: make the Windows no-GPU CI job pass on amd-dev again #3361
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3361"
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?
Imported from ivall/xcl. Originally posted by iggyvilla on 2026-11-29T10:21:13Z.
On
amd-dev(f33df5a7), every PR'sBuild and test (Windows, no GPU)job fails inhle::d3d12x.There are two separate test-only causes:
real::release_tests::the_last_release_drops_entries_before_the_object_goes:a68f609fmaderes_releasecallGetDescon a resource's last release (to log a buffer's GPU address). Thetest's fake resource only has AddRef and Release in its vtable, so
GetDesccalls a nullpointer. The child process the test runs in (
XCL_LATE_RELEASE=0) dies with 0xC0000005 beforeit prints anything, and the parent's
output.status.success()assertion fails with emptyoutput. This happens on a PC with a GPU as well as on CI.
sparse::tests::a_gpu_write_into_a_gpu_view_lands_in_its_cpu_viewdoes not fail on its own.It runs next to
a_gpu_view_tile_is_filled_from_its_cpu_view_and_follows_its_writes, whichuses
software()to size its GPU view: 53 tiles on a software device, 3 GiB on a GPU.software()only checksDXGI_ADAPTER_FLAG_SOFTWARE. The CI runner's default adapter isthe Microsoft Basic Render Driver, which does not have that flag, so the test reserves 3 GiB
there (the
0xc0000000 bytesreservation in the CI logs). The shared device is then removed,the next
Map(ina_gpu_write_…) returns 0x887a0005, andstop_if_device_removedends thewhole test process. That is why the failing test name changes between runs (#3112's log ends
before
a_gpu_write_…prints FAILED). main and nvidia-dev already fixed this in9d967cf8(#2837), which never reached amd-dev. This PR cherry-picks it.
What is in it
Tests: give the last-release test's fake resource a GetDesc: the fake's vtable gets aGetDesc(slotpc_slot!("ID3D12Resource", "GetDesc")) that returns a texture's desc, sores_releaseskips the buffer-address log and the test checks the same things as before.No assertion was changed.
Tests: sparse tests take CI's Basic Render Driver for a software device: a cherry-pick of9d967cf8from main (author kept,-x).software()also treats vendor 0x1414 / device 0x8cas software (WARP and the Basic Render Driver).
Tests: a console MS in the AS slot is refused by its MS translation: a cherry-pick of2331f2eafrom main (-x).tests/d3d12_mesh_stream.rson amd-dev still expects the pre-#541 refusal text (in the AS slot); since #541 an MS in the AS slot is translated as the MS and refused for having no NGG variant. It only showed up once the lib tests passed, because cargo stops at the first failing test binary.Only
#[cfg(test)]code and a test file change.Tested
Windows 11, AMD RX 6650 XT, branch head
95e36515:cargo test --lib release_tests -- --test-threads=1: 1 passed (before the fix: 1 failed, child exit 0xC0000005).cargo test -q --lib hle::d3d12x::sparse::tests::a_gpu_write_into_a_gpu_view_lands_in_its_cpu_view -- --exact, run 10 times on the GPU and 10 times withXCL_TEST_WARP=1: 20 of 20 passed.XCL_TEST_WARP=1 cargo test -q --lib hle::d3d12x::sparse:: -- --test-threads=4, run 3 times: 77 passed, 0 failed, 1 ignored each time.cargo test --lib hle::d3d12x:: -- --test-threads=1: 654 passed, 7 failed, 2 ignored. All 7 also fail on unmodified amd-devf33df5a7on this PC, and none is touched here:sparse::private_physical_pages_reach_the_gpu_on_mapping,sparse::a_tile_decommitted_and_committed_again_keeps_its_video_memory,sparse::flush_parked_does_not_free_or_reuse_tiles_while_unmap_is_in_flight,title_textures::placed_title_textures_share_vram_and_preserve_pixels, and the threetitle_textures::stream_recheck_*(PoisonError left by theplaced_…panic).cargo test --test d3d12_mesh_stream -- --test-threads=1: 3 passed (before: 1 failed).Not run to the end:
cargo test --workspacelocally (it has GPU/game-dependent failures of its own on this PC, e.g.e2eandgpu::tests that also fail on amd-dev).Regression run
Only
#[cfg(test)]code changes, butscripts/pr_check.pycountsreal.rsandsparse.rsas runtime files, so here are the two 60 sscripts/smoke.ps1runs (XCL_PREPARE=0, same title, RX 6650 XT, compute pipeline cache warmed withxcl pso-precompile --used). Firstmaind8bd9a38, then this PR's head.Peak commit is past the 1.25x rule, but that is
amd-dev's: unmodifiedamd-devf33df5a7peaks at 25,028 MB in the same run, and the cause is in #3360. This PR does not change it.Not tested
cargo test --workspace -- --test-threads=4) was not run. Only thehle::d3d12xtests were.hle::d3d12xafter this is not known. On main's CI,placed_title_textures_…skips (no reserved cube with mips) and thestream_recheck_*tests pass.AI use
Claude Code (Claude Opus 5.5, medium effort, subagent) found the cause, wrote the fix and ran the tests; coordinated by Claude Code (Claude Sonnet 5.5); the account owner did not write it. The second commit is a cherry-pick of an existing main commit (
9d967cf8, its own AI disclosure is in its message).Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T09:02:01Z.
Review (head
95e36515, diff read, not a merge-check; draft, baseamd-dev):origin/amd-dev(41aa60ce) changes nothing. Equivalent commits are there already:f5ccab5b(yours),1e75126cand2331f2ea. It can be closed.9d967cf8and2331f2eaare on main, and theGetDescfake isn't needed there (main'sres_releasedoesn't callGetDesc).Fine: every hunk is test code (
release_testsandsparse::testsare#[cfg(test)]), with no#[ignore]and no new skips. The"MS: "prefix match ind3d12_mesh_stream.rsis the same as on main.AI review: Claude Code (Claude Opus 5.5), posted by Foniass without a human check of each point.
Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T09:51:34Z.
Triage (#1607) – head
95e3651All three commits of this PR are already on
amd-devwith identical patches:f5ccab5b(fake resource gets aGetDescinrelease_tests),2331f2ea(d3d12_mesh_stream.rsexpects the MS translation's refusal) and1e75126c(sparse.rssoftware()takes the Basic Render Driver 0x1414:0x8c).The large line overlap with #3111, #3112, #3335 and #3099 is only their shared
amd-devbase, not the same change.Recommendation: close (superseded by amd-dev commits
f5ccab5b,2331f2ea,1e75126c).AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
Imported from ivall/xcl. Originally posted by throny on 2026-12-01T16:01:34Z.
Closing as superseded: this change is already on
amd-dev(f5ccab5b,1e75126c,2331f2ea). From Foniass's rechecked close list on #1607, checked again by script just now. If something here is still missing, say so and reopen it, or ask and I will.AI use: Claude Code (Claude Opus 5.5).
Pull request closed