Independent hardware verification of d3d12_xs hw_ tests on an NVIDIA RTX 4070 Ti (slots 29, 44, 64, 70, 74, 85, 86) #157

Closed
opened 2026-11-26 06:12:05 +00:00 by github-bot · 6 comments
Owner

@⁠MeNoSkills on GitHub · 2026-11-22 16:43 UTC · original

BLOCKERS/progress.json hold several D3D12.x slots at "partial pending independent verification (fresh GPU test runs)". I ran the hardware tests on a machine that is not the maintainer's, in case it helps.

Environment: NVIDIA GeForce RTX 4070 Ti, driver 32.0.16.2124, Windows 10 build 19045, MSVC stable toolchain, upstream main at 604b5a1.

  • cargo test --locked -p d3d12_xs --lib hw_ -- --ignored --test-threads=1: 38 passed, 0 failed, 0 ignored.
  • TOMBOX_EXEC_HW=1 cargo test --locked -p d3d12_xs --lib hw_db_count -- --ignored --test-threads=1: 4 passed, 0 failed.

They include hw_slot29_console_packed_buffers_share_heap_bytes_on_the_gpu, hw_slot44_sub_page_placements_at_title_vas_share_bytes_on_the_gpu, the four hw_db_count_* tests (slot 64), the hw_write64_* tests (slot 70), the seven hw_execute_indirect_bundle_* tests (slot 74), the predication tests hw_advance_steps_one_64bit_predicate..., hw_plain_set_predication_interplay... and hw_reset_drops_the_predication_buffer_cursor (slots 85/86), and the three hw_perf_counter_* tests (slot 101, clock counters only).

This covers only the GPU test runs. I do not have a title dump, so I cannot provide the Fortnite runtime logs the note asks for.

Separate observation: cargo test --locked -p d3d12_xs --lib -- --test-threads=1 reports 22 failures on main on this machine (device_console_fix, placed_offset, title_shadow, pso_ext, map_x and others), but each of those modules passes when run on its own (cargo test ... device_console_fix, placed_offset, title_shadow, alias, pso_ext, map_x), so the failures look like state shared between tests in one process, not a code problem. I can try to find the test that leaves the state dirty if that is useful.

**@⁠MeNoSkills** on GitHub · 2026-11-22 16:43 UTC · [original](https://github.com/omonkeyz/xbox-emulator/issues/157) BLOCKERS/progress.json hold several D3D12.x slots at "partial pending independent verification (fresh GPU test runs)". I ran the hardware tests on a machine that is not the maintainer's, in case it helps. Environment: NVIDIA GeForce RTX 4070 Ti, driver 32.0.16.2124, Windows 10 build 19045, MSVC stable toolchain, upstream main at 604b5a1. - `cargo test --locked -p d3d12_xs --lib hw_ -- --ignored --test-threads=1`: 38 passed, 0 failed, 0 ignored. - `TOMBOX_EXEC_HW=1 cargo test --locked -p d3d12_xs --lib hw_db_count -- --ignored --test-threads=1`: 4 passed, 0 failed. They include hw_slot29_console_packed_buffers_share_heap_bytes_on_the_gpu, hw_slot44_sub_page_placements_at_title_vas_share_bytes_on_the_gpu, the four hw_db_count_* tests (slot 64), the hw_write64_* tests (slot 70), the seven hw_execute_indirect_bundle_* tests (slot 74), the predication tests hw_advance_steps_one_64bit_predicate..., hw_plain_set_predication_interplay... and hw_reset_drops_the_predication_buffer_cursor (slots 85/86), and the three hw_perf_counter_* tests (slot 101, clock counters only). This covers only the GPU test runs. I do not have a title dump, so I cannot provide the Fortnite runtime logs the note asks for. Separate observation: `cargo test --locked -p d3d12_xs --lib -- --test-threads=1` reports 22 failures on main on this machine (device_console_fix, placed_offset, title_shadow, pso_ext, map_x and others), but each of those modules passes when run on its own (`cargo test ... device_console_fix`, `placed_offset`, `title_shadow`, `alias`, `pso_ext`, `map_x`), so the failures look like state shared between tests in one process, not a code problem. I can try to find the test that leaves the state dirty if that is useful.
github-bot 2026-11-26 06:12:05 +00:00
  • closed this issue
  • added the
    question
    label
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 06:12:06 +00:00
Author
Owner

@⁠omonkeyz on GitHub · 2026-11-22 16:58 UTC · original

Thank you, an independent second-vendor run is exactly what those "pending independent verification" slots were waiting for. I've passed your results (38/38 hw_ tests and 4/4 hw_db_count on an RTX 4070 Ti, at 604b5a1) to the maintainers, who decide on the slot status. As you say, the Fortnite runtime-log part stays open.

On the 22 failures in a single-process --test-threads=1 run that pass module by module: yes, finding the test that leaves state behind would be very useful. A PR that isolates it (resets the shared state, or gives that test its own process) is welcome. Please also note which test it is in the PR.

**@⁠omonkeyz** on GitHub · 2026-11-22 16:58 UTC · [original](https://github.com/omonkeyz/xbox-emulator/issues/157#issuecomment-7082478409) Thank you, an independent second-vendor run is exactly what those "pending independent verification" slots were waiting for. I've passed your results (38/38 `hw_` tests and 4/4 `hw_db_count` on an RTX 4070 Ti, at 604b5a1) to the maintainers, who decide on the slot status. As you say, the Fortnite runtime-log part stays open. On the 22 failures in a single-process `--test-threads=1` run that pass module by module: yes, finding the test that leaves state behind would be very useful. A PR that isolates it (resets the shared state, or gives that test its own process) is welcome. Please also note which test it is in the PR.
Author
Owner

@⁠omonkeyz on GitHub · 2026-11-22 17:01 UTC · original

Thanks for running the hardware tests on real NVIDIA hardware. The RTX 4070 Ti results at 604b5a1 (hw_ 38/38 and hw_db_count 4/4) are accepted as independent GPU verification. That covers the GPU-verification part for slots 29, 44, 64, 70, 74, 85, 86 and 101. For slot 101 it covers the clock counters only. The progress tracker will be updated to match. The Fortnite runtime-log part of those slots stays open.

On the 22 failures you saw in one process: could you run these two commands and post both results?

cargo test -p d3d12_xs --lib -- --test-threads=1
cargo test -p d3d12_xs --lib

If the failures go away with one thread, they come from shared state between tests running in parallel, not from the code under test.

**@⁠omonkeyz** on GitHub · 2026-11-22 17:01 UTC · [original](https://github.com/omonkeyz/xbox-emulator/issues/157#issuecomment-7082517792) Thanks for running the hardware tests on real NVIDIA hardware. The RTX 4070 Ti results at 604b5a1 (`hw_` 38/38 and `hw_db_count` 4/4) are accepted as independent GPU verification. That covers the GPU-verification part for slots 29, 44, 64, 70, 74, 85, 86 and 101. For slot 101 it covers the clock counters only. The progress tracker will be updated to match. The Fortnite runtime-log part of those slots stays open. On the 22 failures you saw in one process: could you run these two commands and post both results? cargo test -p d3d12_xs --lib -- --test-threads=1 cargo test -p d3d12_xs --lib If the failures go away with one thread, they come from shared state between tests running in parallel, not from the code under test.
Author
Owner

@⁠MeNoSkills on GitHub · 2026-11-22 17:42 UTC · original

Results on upstream main 9cd1305 (Windows 10 build 19045, RTX 4070 Ti, MSVC):

  • cargo test -p d3d12_xs --lib -- --test-threads=1: 490 passed, 23 failed
  • cargo test -p d3d12_xs --lib: 484 passed, 29 failed

So the failures do not go away with one thread (23 vs 29; the 6 extra in parallel are a race on the same cause). Each module passes when run alone. The shared state is the one you suspected, and I opened a PR with the fix: #171. In short: D3D12EnableExperimentalFeatures must run before any device exists in the process. Four tests create a real device through the host's D3D12CreateDevice without it (alias::tests::title_heap_does_not_block_unmap_or_free, alias::tests::two_placements_at_one_va_share_title_memory, alias::tests::two_textures_at_one_va_share_gpu_local_heap, cl2_state::tests::real_device_query_spanning_a_split_resolves_the_whole_total), and when create_device_tests::create_device_returns_wrapped_device later calls it through the emulator, every creation after it fails with DXGI_ERROR_DEVICE_RESET (0x887a0007). With the fix both modes give 512 passed, 1 failed (the test that needs a console d3d12_xs.dll).

**@⁠MeNoSkills** on GitHub · 2026-11-22 17:42 UTC · [original](https://github.com/omonkeyz/xbox-emulator/issues/157#issuecomment-7083040131) Results on upstream main 9cd1305 (Windows 10 build 19045, RTX 4070 Ti, MSVC): - cargo test -p d3d12_xs --lib -- --test-threads=1: 490 passed, 23 failed - cargo test -p d3d12_xs --lib: 484 passed, 29 failed So the failures do not go away with one thread (23 vs 29; the 6 extra in parallel are a race on the same cause). Each module passes when run alone. The shared state is the one you suspected, and I opened a PR with the fix: #171. In short: `D3D12EnableExperimentalFeatures` must run before any device exists in the process. Four tests create a real device through the host's D3D12CreateDevice without it (alias::tests::title_heap_does_not_block_unmap_or_free, alias::tests::two_placements_at_one_va_share_title_memory, alias::tests::two_textures_at_one_va_share_gpu_local_heap, cl2_state::tests::real_device_query_spanning_a_split_resolves_the_whole_total), and when create_device_tests::create_device_returns_wrapped_device later calls it through the emulator, every creation after it fails with DXGI_ERROR_DEVICE_RESET (0x887a0007). With the fix both modes give 512 passed, 1 failed (the test that needs a console d3d12_xs.dll).
Author
Owner

@⁠marquezinii on GitHub · 2026-11-22 17:43 UTC · original

A second NVIDIA data point, on a newer architecture (Blackwell), at current main 1e77fcc:

NVIDIA GeForce RTX 5070, driver 621.24, Windows 11 26H2 (build 26300), MSVC 14.52, Rust 1.99.1.

  • cargo test --locked -p d3d12_xs --lib hw_ -- --ignored --test-threads=1: 38 passed, 0 failed.
  • TOMBOX_EXEC_HW=1 cargo test --locked -p d3d12_xs --lib hw_db_count -- --ignored --test-threads=1: 4 passed, 0 failed.

The two commands you asked about, on the same machine:

  • cargo test -p d3d12_xs --lib -- --test-threads=1: 512 passed, 1 failed, 39 ignored.
  • cargo test -p d3d12_xs --lib: 512 passed, 1 failed, 39 ignored.

The one failure in both is xs_exports::console_fixed_tests::fixed_result_dxgix_exports_match_every_console_d3d12_xs, which panics with no console d3d12_xs.dll in D:\xbox-pc-port\games. That's expected on a machine without console dumps: leaf::check_fixed asserts that the dump folder is present. So on 1e77fcc the 22 shared-state failures reported above don't reproduce, with one thread or with the default parallelism. I have no title dump, so this covers only the GPU runs.

**@⁠marquezinii** on GitHub · 2026-11-22 17:43 UTC · [original](https://github.com/omonkeyz/xbox-emulator/issues/157#issuecomment-7083059912) A second NVIDIA data point, on a newer architecture (Blackwell), at current main **1e77fcc**: NVIDIA GeForce RTX 5070, driver 621.24, Windows 11 26H2 (build 26300), MSVC 14.52, Rust 1.99.1. - `cargo test --locked -p d3d12_xs --lib hw_ -- --ignored --test-threads=1`: **38 passed, 0 failed**. - `TOMBOX_EXEC_HW=1 cargo test --locked -p d3d12_xs --lib hw_db_count -- --ignored --test-threads=1`: **4 passed, 0 failed**. The two commands you asked about, on the same machine: - `cargo test -p d3d12_xs --lib -- --test-threads=1`: 512 passed, 1 failed, 39 ignored. - `cargo test -p d3d12_xs --lib`: 512 passed, 1 failed, 39 ignored. The one failure in both is `xs_exports::console_fixed_tests::fixed_result_dxgix_exports_match_every_console_d3d12_xs`, which panics with `no console d3d12_xs.dll in D:\xbox-pc-port\games`. That's expected on a machine without console dumps: `leaf::check_fixed` asserts that the dump folder is present. So on 1e77fcc the 22 shared-state failures reported above don't reproduce, with one thread or with the default parallelism. I have no title dump, so this covers only the GPU runs.
Author
Owner

@⁠omonkeyz on GitHub · 2026-11-22 17:47 UTC · original

Thanks to both of you. MeNoSkills found the cause: four tests created a real device before D3D12EnableExperimentalFeatures had run, which broke every device created after them in the same process. The fix is in #171, which is in review now. marquezinii's RTX 5070 results (hw_ 38/38, hw_db_count 4/4, 512/1 in both test modes on 1e77fcc) will be recorded as a second independent GPU data point. The one remaining failure is the console-dump fixture test, which is expected without dumps. I'll close this issue once #171 is merged.

**@⁠omonkeyz** on GitHub · 2026-11-22 17:47 UTC · [original](https://github.com/omonkeyz/xbox-emulator/issues/157#issuecomment-7083109915) Thanks to both of you. MeNoSkills found the cause: four tests created a real device before `D3D12EnableExperimentalFeatures` had run, which broke every device created after them in the same process. The fix is in #171, which is in review now. marquezinii's RTX 5070 results (`hw_` 38/38, `hw_db_count` 4/4, 512/1 in both test modes on 1e77fcc) will be recorded as a second independent GPU data point. The one remaining failure is the console-dump fixture test, which is expected without dumps. I'll close this issue once #171 is merged.
Author
Owner

@⁠omonkeyz on GitHub · 2026-11-22 17:59 UTC · original

Fixed by #171, merged in 202c763 (commit fa28145). cargo test -p d3d12_xs --lib now gives the same result with and without --test-threads=1. The only remaining failure is the console-dump fixture test, which is expected on machines without dumps. The RTX 4070 Ti and RTX 5070 hardware results are recorded as independent GPU verification. Thanks to everyone who ran these.

**@⁠omonkeyz** on GitHub · 2026-11-22 17:59 UTC · [original](https://github.com/omonkeyz/xbox-emulator/issues/157#issuecomment-7083253613) Fixed by #171, merged in 202c763 (commit fa28145). `cargo test -p d3d12_xs --lib` now gives the same result with and without `--test-threads=1`. The only remaining failure is the console-dump fixture test, which is expected on machines without dumps. The RTX 4070 Ti and RTX 5070 hardware results are recorded as independent GPU verification. Thanks to everyone who ran these.
This discussion has been locked. Commenting is limited to contributors.
No description provided.