Tests: GPU UMA tests skip where D3D12 has no heaps over process memory #1053
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1060"
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 vakaobr on 2026-11-24T11:05:03Z.
On Apple's D3DMetal (macOS, CrossOver)
OpenExistingHeapFromAddressanswers E_NOTIMPL (0x80004001), so there are no GPU heaps over process memory. Six GPU tests that need them fail there instead of skipping: five unwraprunner::run_in_arenaand panic on that error, andgpu_sparse_vram_descriptors_buffers_and_xmemfinds no window VAs afterreal::init(). Part of #258.What is in it
crates/xcl/src/gpu/recomp/tests.rs:no_host_heaps()skips withno GPU UMAonly when the error is E_NOTIMPL fromOpenExistingHeapFromAddress.run_in_arena_or_skip()wrapsrun_in_arenawith it, used bygpu_unified_memory_arena,gpu_mesh_mode_reads_memory_windows(itspositionsclosure now returns anOption),gpu_memory_windows_above_4_gib,gpu_memory_windows_reject_out_of_uma_aliasingandgpu_bvh64_intersect_ray_across_memory_windows_and_grazing.gpu_sparse_vram_descriptors_buffers_and_xmemchecks the runtime'suma_errorthe same way before reading the window VAs. Any other error still fails the tests.Tested
x86_64-pc-windows-gnu(mingw-w64 GCC 16.2.0), debug, DXC 1.9.2609. Each test in its own process (<lib test exe> --exact <test> --test-threads=1 --nocapture).main9aec53d(full per-test run): all six fail, five withcalled Result::unwrap() on an Err value: "OpenExistingHeapFromAddress: Not implemented. (0x80004001)"and the sparse test with no valid window VAs.b22e57c(onmain384f7f7): 6 passed, all sixSKIPPED …: no GPU UMA.Regression run
Test-only change in
tests.rs: noxcl-smokeblocks.Not tested
OpenExistingHeapFromAddresssucceeds, nothing should skip, and the tests run as before, but I have not run it.XCL_REQUIRE_GPU=wave64/meshturns these skips into failures, as for every reason but "no mesh shaders".list_x::tests::write_buffer_immediate_on_open_existing_heap_visible_to_cpufails the same way but lives inlist_x.rs(a runtime file forPR checks), andgpu::shader::tests::readable_answers_from_the_working_set_without_touching_pagesfails for another reason (Wine'sQueryWorkingSetEx).gpu_uma_import_check_at_initthe same way in another part of the file; the two do not overlap. #614 edits thereal::init()line above the sparse test's new check and still applies on top of this change.AI use
Imported from ivall/xcl. Originally posted by mikebuckets171 on 2026-11-24T11:45:13Z.
Verified on a macOS host: all six tests this PR names do get the skip, from the E_NOTIMPL condition, and the skip does not fire anywhere it should not.
Host: MacBook Pro M5 Pro (48 GB), macOS 27.2.1, CrossOver 26 with D3DMetal (adapter reports "AMD Compatibility Mode"), Rosetta 2, Rust 1.100.0,
x86_64-pc-windows-gnullvm(LLVM-MinGW, clang 23.1.6),--release --locked, test binaries under Wine, one test per process (--exact <full test path> --nocapture --test-threads=1), a fresh data root per run. Base47efa2e, headb22e57c, each side built from its own checkout.47efa2eb22e57cgpu::recomp::tests::gpu_unified_memory_arenatests.rs:3115:54, exit0x65SKIPPED …gpu_unified_memory_arena: no GPU UMA->ok0.29 sgpu::recomp::tests::gpu_mesh_mode_reads_memory_windowstests.rs:3172:56SKIPPED …: no GPU UMA->ok0.27 sgpu::recomp::tests::gpu_memory_windows_above_4_gibtests.rs:3236:54SKIPPED …: no GPU UMA->ok0.26 sgpu::recomp::tests::gpu_memory_windows_reject_out_of_uma_aliasingtests.rs:3342:54SKIPPED …: no GPU UMA->ok0.27 sgpu::recomp::tests::gpu_sparse_vram_descriptors_buffers_and_xmemtests.rs:3397:5,assertion left == right failed,left: 0,right: 4SKIPPED …: no GPU UMA->ok0.35 sgpu::recomp::tests::gpu_bvh64_intersect_ray_across_memory_windows_and_grazingtests.rs:4420:56SKIPPED …: no GPU UMA->ok0.32 sSix for six: the five
run_in_arenasites fail on the base exactly as the description says (the unwrap on the heap-opening error, panic locations above), andgpu_sparse_vram_descriptors_buffers_and_xmemfails on its window-count assertion (left: 0, right: 4- no window VAs recorded). At the head each one takes theno GPU UMAskip and the process exits 0.The condition your
no_host_heaps()looks for is the host's real answer here: a plain D3D12 program (no XCL, no game content) callingOpenExistingHeapFromAddressgetsNot implemented (0x80004001)on this host, and the XCL runs record the same thing, so the narrowE_NOTIMPL-only trigger is the right discriminator rather than a general "UMA is missing" guess.One failure in the same family this PR does not reach:
hle::d3d12x::list_x::tests::write_buffer_immediate_on_open_existing_heap_visible_to_cpupanics atlist_x.rs:5034:74, exit0x65, on both sides - unchanged by this PR, because it lives inlist_x.rsand this change touches onlytests.rs. Its title is the same premise (write-buffer-immediate into a heap opened from an address), so on a Mac host it is the remaining failure of this family. Mentioning it only so the Mac-host list is complete; where it should be handled is your call.Tree state, so the test counts line up with other reports: this head branched from
384f7f7; main is 9 commits further (vram.rs,vfs.rs,vfs_hooks.rs, which add 4 tests), so the lib test binary here reports 715 tests at the head and 719 at47efa2e- the difference is main's newer tests, not anything this PR removes.git merge-treeof main47efa2eagainstb22e57creports no conflict, so no rebase is needed for this pair to describemainas it stands.Not tested here: Windows (no Windows machine on this bench), a host where the skip must not fire - @DavidM1911's Windows row on #1024 covers that shape for the sibling PR (skip correctly not taken, "ok, 1 window(s)"), and I ran these seven tests rather than the whole suite (the whole lib binary does not run to completion on this host), and no titles.
Host: macOS 27.2.1 (Apple silicon, M5 Pro), CrossOver 26, D3DMetal; local inference unloaded and the bottle's wineserver stopped for each run. AI use: GPT-6 Luna built both trees, ran the tests and drafted this comment; the panic locations, codes and timings are from those runs.
Imported from ivall/xcl. Originally posted by mynzjerko on 2026-11-24T11:53:54Z.
Tested on Windows 11 with an AMD GPU (native wave64 and host heaps over process memory): all 6 GPU UMA tests ran without skipping, and the full suite passed.
Tested
b22e57cceafdeb46f01deab6f633d491e35a648832.0.32029.2010), AMD Ryzen 5 7500F, Windows 11 Pro 10.0.26300,rustc 1.100.0(stable-x86_64-pc-windows-msvc), DXC1.9.2602.17, debug buildcargo build --workspace: okcargo test -p xcl --lib -- gpu_unified_memory_arena gpu_mesh_mode_reads_memory_windows gpu_memory_windows_above_4_gib gpu_memory_windows_reject_out_of_uma_aliasing gpu_sparse_vram_descriptors_buffers_and_xmem gpu_bvh64_intersect_ray_across_memory_windows_and_grazing --nocapture --test-threads=1: 6 passed, 0 failed, 0 ignored (0 SKIPPED; none hitno_host_heaps)cargo test --workspace -- --test-threads=4: 737 passed, 0 failed, 41 ignored (xcl --lib: 694 passed, 0 failed, 21 ignored;SKIPPEDGPU tests: 0)Not tested
OpenExistingHeapFromAddressreturnsE_NOTIMPL), NVIDIA / Intel GPUs, Linux / Wine, release build, retail titles (scripts/smoke.ps1)AI use
Imported from ivall/xcl. Originally posted by jesuarchive on 2026-11-24T12:36:49Z.
Native Windows + NVIDIA check that
no_host_heapsdoes not skip where D3D12 can place heaps over process memory. Headb22e57c, merged locally ontomain47efa2e(clean merge, nothing pushed).Tested
stable-x86_64-pc-windows-msvc; DXC 1.9.2602.17 from the Windows SDK; debug.--test-threads=1 --nocapture:gpu_uma_import_check_at_init,gpu_unified_memory_arena,gpu_memory_windows_above_4_gib,gpu_memory_windows_reject_out_of_uma_aliasing,gpu_mesh_mode_reads_memory_windows,gpu_bvh64_intersect_ray_across_memory_windows_and_grazing,gpu_sparse_vram_descriptors_buffers_and_xmem,gpu_global_atomics_and_sub_dword_access: 8 passed, 0 failed. None printedskippingorSKIPPED: they all ran on the GPU. Same eight onmain47efa2e: 8 passed.cargo test --workspace -- --test-threads=4: 741 passed, 0 failed, 41 ignored, the same asmain.main:gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware(no wave64).Not tested
384f7f7; release build.AI use
upstream-sync referenced this pull request2026-11-24 19:06:45 +00:00
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T09:04:42Z.
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)Thanks!
Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-29T07:41:03Z.
Nothing has happened on this PR for 3 days, so it is marked
staleand will be closed in 4 days. A push or a comment takes the mark off: rebase it ontomainif it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.Imported from ivall/xcl. Originally posted by BBareth on 2026-11-30T09:30:29Z.
merge-check claim
head:
b22e57cceaImported from ivall/xcl. Originally posted by BBareth on 2026-11-30T09:39:19Z.
merge-check
base:
9dfbe3ea66head:
b22e57cceamerge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2885 passed, 1 failed, 51 ignored; failing: gpu::dxil::msaa_tests::gpu_direct_image_get_resinfo_d16, which fails on the base alone too (base: 2885 passed, 1 failed, 51 ignored). 28 SKIPPED lines, the same count as on the base. The six tests the PR touches all ran and passed here (
gpu_unified_memory_arena,gpu_mesh_mode_reads_memory_windows,gpu_memory_windows_above_4_gib,gpu_memory_windows_reject_out_of_uma_aliasing,gpu_sparse_vram_descriptors_buffers_and_xmem,gpu_bvh64_intersect_ray_across_memory_windows_and_grazing), so on a host with heaps over process memory nothing is skipped that ran before.review: no blocking finding; test-only, one file, every hunk read. The skip is narrow: only an error that starts with
OpenExistingHeapFromAddressand contains0x80004001skips (throughrunner::skip_test, so it prints SKIPPED); any other error still panics as before. Not exercised on this machine: the skip path itself (this D3D12 has the heaps), so that it skips on D3DMetal rests on the author's report. #1024 (open) is the sibling for another test, not a duplicate.performance: none; tests only.
verdict: safe to merge
hardware / tool and model: RTX 5070 Ti 16 GB, driver 621.24 (32.0.16.2124); i7-12700K; Windows 11 26200. Claude Code, Claude Fable 5.2 read the diff, ran the build and the suite and wrote this check.
Imported from ivall/xcl. Originally posted by Elytes on 2026-11-30T10:09:01Z.
merge-check
base:
9dfbe3ea66head:
b22e57cceamerge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2885 passed, 1 failed, 51 ignored; SKIPPED: 28 (22 no wave64, 2 no heap windows, 3 no D3D12 debug layer, 1 driver cache needs Developer Mode); failing: gpu::dxil::msaa_tests::gpu_direct_image_get_resinfo_d16, also failing on the base alone (base lib 2737 passed / 1 failed, the same as the merge: this PR adds no test). The six tests it touches ran and passed here; none printed the no-heaps skip.
review: no blocking finding after reading the whole diff and the comments; test-only. The skip fires only for an OpenExistingHeapFromAddress error carrying 0x80004001, so any other error still fails the tests.
performance: none (tests only).
verdict: safe to merge
hardware / tool and model: NVIDIA GeForce RTX 5090 (driver 32.0.16.1742, wave32), Intel Core i9-14900KS, 192 GB, Windows 11 build 26300.10075, rustc 1.100.1, debug / Claude Code (Claude Opus 5.5) ran the merge, build and suite, and reviewed the diff and comments.
Imported from ivall/xcl. Originally posted by vakaobr on 2026-11-30T13:21:31Z.
Closing, although it has two
safe to mergechecks (thank you @BBareth and @Elytes). Since #1329, D3DMetal gets a video-memory copy of the window instead of theOpenExistingHeapFromAddresserror, so this skip never fires. Onmain9dfbe3ewith this PR merged, on a Mac,gpu_unified_memory_arena,gpu_mesh_mode_reads_memory_windowsandgpu_bvh64_intersect_ray_across_memory_windows_and_grazingrun and pass without skipping. The other three tests it touches stop on a Mac for an unrelated reason (UMulin Apple's shader converter), which #3525 fixes.Pull request closed