Small fixes found running the tests and the test title under Wine #270
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!270
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/270/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?
@cmt8 on GitHub · 2026-11-23 22:14 UTC · original
wine-fixes→main· +75 −12 · 6 files · 6 commits · merged 2026-11-23 23:20 UTCSmall fixes found running the tests and the test title under Wine. More significant fixes forthcoming, especially in the GPU dept. These are from my very first test run and cross compile. The following is an AI written summary of the changes:
Small fixes to XCL found while running the workspace's test suite and the repository's own test title (
tests/testtitle) under Wine, built with the GNU toolchain (x86_64-pc-windows-gnu). Only changes to XCL itself are included: no Linux scripts, documentation or other tooling. Each commit is one fix and is based on currentmain.The commits
kernelx: memory in use from PagefileUsage where PrivateUsage is 0GetProcessMemoryInfofills only thePROCESS_MEMORY_COUNTERSfields;PrivateUsageof the_EXform stays 0.TitleMemoryStatusthen reported the whole budget as available andXMemGetWorkingSetStatisticsa use of 0.PagefileUsageis used whenPrivateUsageis 0.PrivateUsageis filled and is still the value used.hle::kernelx::tests::title_memory_status_reports_budget(new assertion: memory in use > 0)testgame-mw: no unit-test harnesskernelx.dll, so the exe cannot start andcargo test --workspacefails on it.test = falsein itsCargo.toml.cargo build --workspace.cargo test -p testgame-mw(nothing to start, exits 0)d3d12x null device: descriptor heap start handles in raxGetCPU/GPUDescriptorHandleForHeapStart) with onlythisand takes the handle in rax, asreal.rs(heap_cpu_start_x/heap_gpu_start_x) already answers it. The null device used the PC form and wrote the handle through rdx, i.e. through whatever the caller left there..rdataand the title died with 0xC0000005 inHeap_GetHandleStart.hle::d3d12x::null::tests::heap_start_handles_come_back_in_rax(new)xgameruntime: say what is missing without System32\xgameruntime.dllpreflight::tests::each_missing_piece_is_reported_with_a_fix(new assertion)e2e: stage the test title under CARGO_TARGET_TMPDIR<repo>/target/e2eregardless of the target directory, so withCARGO_TARGET_DIRset elsewhere it still wrote into the repository. It now usesCARGO_TARGET_TMPDIR.CARGO_TARGET_DIRset elsewhere (seen under Wine 11.22).Two other fixes from the same work were left out because current
mainalready has an equivalent fix:describe_addresspanicking when Wine names the main executable for address 0: fixed by1b0c610(module_offset, PR #147).WaitFrameEventX: fixed by488e5fe(publish_originholds the queue lock across the release). The 20-run counts below are for that code.How this was tested
Everything was built and run on Linux under Wine with Rust 1.97.0 for
x86_64-pc-windows-gnu(mingw-w64 GCC 13), on this branch's final commit. Wine versions: 9.0 (Ubuntu package 9.0~repack-4build3) and 11.22. Tests were run with--test-threads=1, underxvfb-run, with no GPU.cargo build --workspace --target x86_64-pc-windows-gnu(workspace crates rebuilt from clean): no warnings.cargo clippy --workspace --all-targets: no lint on any changed line.hle::kernelx::tests::(incl.title_memory_status_reports_budget)hle::d3d12x::null::tests::(incl.heap_start_handles_come_back_in_rax)preflight::tests::hle::xgameruntime::api::tests::hle::d3d12x::frame::tests::modules::tests::cargo test -p testgame-mwframe::tests::statistics_name_each_frames_origin_and_rescheduled_handles_outlive_the_clock_tick, 20 separate runscargo test -p xcl --target x86_64-pc-windows-gnu --test e2e, Wine 11.22, once, withCARGO_TARGET_DIRoutside the repository): the staging folders were created in<target dir>/x86_64-pc-windows-gnu/tmp/e2e/{game,data}, and notargetfolder appeared in the checkout. The test itself fails in this setup: there is no D3D12 device and no Gaming Services, 13 of the title's checks that need the GPU or a real window fail, and the title ends with 0xC0000409 after a panic ingpu/tiling.rs:419(slice index out of range) during the DirectStorage check.tiling.rsis not touched here, but the title only reaches that point now that the null device's descriptor heap crash is fixed; the panic was not investigated.Not tested: anything on Windows, the MSVC toolchain, and anything on a GPU (there is none in this setup). CI on this PR will be the first Windows / MSVC build of these changes.
Notes for review
target\e2etotarget\tmp\e2e(target\<triple>\tmp\e2ewith--target).scripts/test.ps1does not refer totarget\e2e; anything local that looks there would need the new path. The debug-layer e2e test still usestarget\e2e-debug-layer; it was not changed. CI skipstest_title_runs_and_game_folder_is_untouched(ci.yml), so the new staging path is only exercised byscripts\test.ps1on a PC.Heap_GetHandleStartnow has the same shape asreal.rs'sheap_cpu_start_x/heap_gpu_start_x(thisonly, handle in rax). Worth a look with the null device on Windows (no D3D12 device, or graphics = "null").PagefileUsageis read only whenPrivateUsageis 0. On Windows both are the process's commit charge, so the value used there should not change; please confirmPrivateUsageis non-zero on a real title.test = falsealso skips building its (empty) test harness under MSVC; no tests are lost.@Kalmarv on GitHub · 2026-11-23 22:39 UTC · original
Please tighten the null-heap regression test. Slots 9 and 10 now point to a one-argument function. The test calls them through a two-argument Rust function pointer, which violates Rust’s ABI compatibility rule even on Win64. It also passes if both slots always return
1: I made that substitution locally, and the PR test stayed green while a comparison with the heap’s stored start failed. Call each slot with its actual one-argument signature and check the exact start value. If the test must also inspect a leftoverrdx, use a Win64 test shim with a writable sentinel for that check. Test · Rust function-pointer ABI rulesTested
Windows 11 Pro 26200.9711, Ryzen 9 9950X, RTX 5070 Ti, NVIDIA 610.74, Rust 1.99 MSVC, debug. Tested PR head
d54597ac7d1a4b9ae36cc240bec48ec33cc37a65merged onto9ab7d763197c7f420bff10cd9bf1310f07e2a9aaat27dedcf6df22caf65c9f6c78787079ef8b9a9719. Built withcargo build --workspaceandcargo test -p xcl --lib --test e2e --no-runusing external target directories. Ran the binaries in the GPU queue with--test-threads=1.PrivateUsageandPagefileUsage. With a local counter fixture of 0 and 48 MiB respectively, bothTitleMemoryStatusandXMemGetWorkingSetStatisticsreported 0 on main and 48 MiB on the merge. Both preferred 32 MiB of private usage over 48 MiB of pagefile usage when both were nonzero.cargo test -p testgame-mwexited 0 on both. Main ran an empty MSVC harness. The merge omitted it and the workspace build still produced the DLL. The reported loader failure is GNU-specific.target/e2e; the merge staged under the external target’stmp/e2e. The debug-layer test still wrote under the checkout on both.The six unit filters passed 48/48 (kernelx 18, null 2, preflight 6, runtime API 16, frame 4, modules 2). With the three e2e tests, 51 passed, 0 failed, 0 skipped on the merge. The frame-clock control also passed in 20/20 fresh processes. Pairwise
git merge-treechecks were clean against #254 (2c5fe3f), #252 (862a0d4) and #283 (94bfcf0).Not tested
Wine, MinGW, a Windows installation without Gaming Services, the retail game, or runtime behavior of the three merge combinations.
🤖 GPT-6.2 Astra
@PHeitor1 on GitHub · 2026-11-23 22:47 UTC · original
Tested
d54597amerged ontomain9ab7d76on RTX 5060 Ti 8 GB (Blackwell, 32-lane waves), NVIDIA 621.24, Ryzen 5 5600X (Zen 3), Windows 11 Pro 26300 (native), rustc 1.100.0 MSVC, debug,cargo test --workspace --no-fail-fast -- --test-threads=4, noXCL_SAMPLE_*. Baselinemain9ab7d76: 651 passed, 0 failed, 40 ignored.Pass: 652 passed, 0 failed, 40 ignored. GPU skips: the same 2 as on
main(no wave64).Run and written with Claude Code (Claude Opus 5.5).
@cmt8 on GitHub · 2026-11-23 22:53 UTC · original
I've posted a fix for this as a new commit in the PR