Native Windows (MSVC) unit test failures on main: views_die_with_their_resource access violation, WARP compute pipeline rejected #357

Open
opened 2026-12-03 19:34:15 +00:00 by github-bot · 5 comments
Owner

@⁠Kal0s-design on GitHub · 2026-12-03 19:32 UTC · original

While checking a few PRs I ran the unit tests of victory-shader and victory-gpu natively on Windows 11 (x86_64-pc-windows-msvc built with MSVC, not Wine, toolchain 1.98.1) at main 00aa4d3. Hardware D3D12 is one NVIDIA desktop card, plus WARP. Some tests fail there on main with no PR applied. I don't know how much native Windows matters for you since the project targets Wine, so this is mostly a heads-up in case these hide real bugs.

victory-gpu, cargo test -p victory-gpu --lib -- --test-threads=4

descriptor::tests::views_die_with_their_resource kills the whole test binary with exit code 0xc0000005 (STATUS_ACCESS_VIOLATION), even with --test-threads=1, so the rest of the suite only runs with --skip descriptor::tests::views_die_with_their_resource. With that skip it's 338 passed, 5 failed, 23 ignored.

  • indirect::tests::host_list_reuses_and_grows_scratch_across_submissions panics at indirect.rs:2833, "a clamp leaves the scratch readable as arguments", left D3D12_RESOURCE_STATES(0), right D3D12_RESOURCE_STATES(512)
  • indirect::tests::host_list_window_executions_need_no_barrier_of_their_own same assertion at indirect.rs:3255, 0 vs 512
  • pipeline::host::tests::a_mesh_pipeline_loads_from_the_library panics at pipeline/host.rs:1421, "the mesh pipeline was compiled again instead of loaded from the library"
  • pipeline::host::tests::depth_bounds_pipeline_loads_and_filters_draws panics at pipeline/host.rs:1561, "the depth-bounds pipeline was compiled again instead of loaded from the library"
  • watch::tests::the_rest_of_the_one_asking_has_a_number_of_its_own panics at watch.rs:3608 with "watched". This one is flaky, it failed in 4 of 5 full-suite runs but passed 10 of 10 when run alone, so it looks like it shares state with another watch test.

The two pipeline library ones may just be how the NVIDIA driver handles pipeline libraries (it can decline to load a stored PSO and the test treats a recompile as failure). I haven't dug into that.

victory-shader, cargo test -p victory-shader --lib -- --test-threads=4

414 passed, 1 failed, 4 ignored. The failing one is emit::size_tests::a_reused_descriptor_register_read_only_behind_its_flag, which panics at emit/waterfall_tests.rs:128 with "warp: compute_pipeline failed: The parameter is incorrect." It's the same alone and in the full run, so WARP rejects that compute pipeline outright.

Related, in PR #344 the new a_wave32_pixel_lane_number_stays_below_32 also fails on WARP because WARP runs 4-lane waves. I left a note there.

Happy to run anything specific on this setup if it helps.

AI-assisted: yes

**@⁠Kal0s-design** on GitHub · 2026-12-03 19:32 UTC · [original](https://github.com/lobomfz/VIctory-xmem/issues/357) While checking a few PRs I ran the unit tests of victory-shader and victory-gpu natively on Windows 11 (x86_64-pc-windows-msvc built with MSVC, not Wine, toolchain 1.98.1) at main 00aa4d3. Hardware D3D12 is one NVIDIA desktop card, plus WARP. Some tests fail there on main with no PR applied. I don't know how much native Windows matters for you since the project targets Wine, so this is mostly a heads-up in case these hide real bugs. victory-gpu, `cargo test -p victory-gpu --lib -- --test-threads=4` `descriptor::tests::views_die_with_their_resource` kills the whole test binary with exit code 0xc0000005 (STATUS_ACCESS_VIOLATION), even with `--test-threads=1`, so the rest of the suite only runs with `--skip descriptor::tests::views_die_with_their_resource`. With that skip it's 338 passed, 5 failed, 23 ignored. - `indirect::tests::host_list_reuses_and_grows_scratch_across_submissions` panics at indirect.rs:2833, "a clamp leaves the scratch readable as arguments", left `D3D12_RESOURCE_STATES(0)`, right `D3D12_RESOURCE_STATES(512)` - `indirect::tests::host_list_window_executions_need_no_barrier_of_their_own` same assertion at indirect.rs:3255, 0 vs 512 - `pipeline::host::tests::a_mesh_pipeline_loads_from_the_library` panics at pipeline/host.rs:1421, "the mesh pipeline was compiled again instead of loaded from the library" - `pipeline::host::tests::depth_bounds_pipeline_loads_and_filters_draws` panics at pipeline/host.rs:1561, "the depth-bounds pipeline was compiled again instead of loaded from the library" - `watch::tests::the_rest_of_the_one_asking_has_a_number_of_its_own` panics at watch.rs:3608 with "watched". This one is flaky, it failed in 4 of 5 full-suite runs but passed 10 of 10 when run alone, so it looks like it shares state with another watch test. The two pipeline library ones may just be how the NVIDIA driver handles pipeline libraries (it can decline to load a stored PSO and the test treats a recompile as failure). I haven't dug into that. victory-shader, `cargo test -p victory-shader --lib -- --test-threads=4` 414 passed, 1 failed, 4 ignored. The failing one is `emit::size_tests::a_reused_descriptor_register_read_only_behind_its_flag`, which panics at emit/waterfall_tests.rs:128 with "warp: compute_pipeline failed: The parameter is incorrect." It's the same alone and in the full run, so WARP rejects that compute pipeline outright. Related, in PR #344 the new `a_wave32_pixel_lane_number_stays_below_32` also fails on WARP because WARP runs 4-lane waves. I left a note there. Happy to run anything specific on this setup if it helps. AI-assisted: yes
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-03 19:34:15 +00:00
Author
Owner

@⁠Kal0s-design on GitHub · 2026-12-03 19:39 UTC · original

A bit more on the flaky watch one, watch::tests::the_rest_of_the_one_asking_has_a_number_of_its_own. It passes alone every time, but run in the same process right after bits_go_at_every_view (--test-threads=1) it fails 3 out of 3, and a few other view tests trigger it the same way. With a temporary print I saw a stale VIEWS bit left on an address that VirtualAlloc then hands out again to the next test, so refused_as_view is true and writes() returns None even though GetWriteWatch itself answered. So it looks like test isolation rather than a watch bug, at least on native Windows where the allocator reuses that address. Wine may not reuse it the same way.

AI-assisted: yes

**@⁠Kal0s-design** on GitHub · 2026-12-03 19:39 UTC · [original](https://github.com/lobomfz/VIctory-xmem/issues/357#issuecomment-7390023183) A bit more on the flaky watch one, `watch::tests::the_rest_of_the_one_asking_has_a_number_of_its_own`. It passes alone every time, but run in the same process right after `bits_go_at_every_view` (`--test-threads=1`) it fails 3 out of 3, and a few other view tests trigger it the same way. With a temporary print I saw a stale `VIEWS` bit left on an address that `VirtualAlloc` then hands out again to the next test, so `refused_as_view` is true and `writes()` returns None even though `GetWriteWatch` itself answered. So it looks like test isolation rather than a watch bug, at least on native Windows where the allocator reuses that address. Wine may not reuse it the same way. AI-assisted: yes
Author
Owner

@⁠Kal0s-design on GitHub · 2026-12-03 20:40 UTC · original

One more set, this time in victory-hle. At 00aa4d3 cargo test -p victory-hle --lib gives 157 passed, 3 failed, 1 ignored on native Windows. Same result alone, together and with --test-threads=1, three runs each, so it's deterministic and not an ordering problem.

  • gameinput::tests::keys_feed_the_keyboard_and_the_stand_in_pad panics at gameinput.rs:2489, the stand-in pad comes back all zero instead of buttons: 4, left_y: 1.0, right_x: 1.0, right_trigger: 1.0
  • gameinput::tests::a_host_pad_feeds_the_one_pad_which_never_goes panics at gameinput.rs:2555, left_x is 0.0 instead of 1.0
  • gameinput::tests::pc_kbm_maps_pc_style_keys_and_smooths_mouse_look panics at gameinput.rs:2747, buttons 0 instead of 8192 (RIGHT_STICK)

I think the cause is the native input default and not anything Windows specific in the input stack. mouse::native_input() (gameinput/mouse.rs:40) is on unless VICTORY_NATIVE_INPUT=0, and with it on the #[cfg(windows)] branch of State::poll (gameinput.rs:932 onwards) builds the stand-in pad from mouse::read_native() and keyboard_events::held_axes(). The fake source's keys and mouse pad are never used for it. In a test there's no capture window and nothing held, so the stand-in is all zero, which is exactly what the three asserts see. The keyboard reading itself is fine, the count and key checks before line 2489 pass.

With VICTORY_NATIVE_INPUT=0 the whole lib suite passes here, 160 passed, 0 failed, 1 ignored.

Since cfg(windows) is about the target and not the host, I'd expect the same three to fail when the msvc build runs under Wine unless that variable is set. I haven't run it under Wine myself, but the description of #179 mentions running the fake-source tests with VICTORY_NATIVE_INPUT=0 VICTORY_PC_CONTROLS=0 VICTORY_KBM_PC=0 for this same reason. So it looks like the tests fell behind the default rather than a bug in the input code. Maybe the hub could take the native-input choice as a parameter so these tests can turn it off without touching the environment, but that's your call.

AI-assisted: yes

**@⁠Kal0s-design** on GitHub · 2026-12-03 20:40 UTC · [original](https://github.com/lobomfz/VIctory-xmem/issues/357#issuecomment-7391620144) One more set, this time in victory-hle. At 00aa4d3 `cargo test -p victory-hle --lib` gives 157 passed, 3 failed, 1 ignored on native Windows. Same result alone, together and with `--test-threads=1`, three runs each, so it's deterministic and not an ordering problem. - `gameinput::tests::keys_feed_the_keyboard_and_the_stand_in_pad` panics at gameinput.rs:2489, the stand-in pad comes back all zero instead of `buttons: 4, left_y: 1.0, right_x: 1.0, right_trigger: 1.0` - `gameinput::tests::a_host_pad_feeds_the_one_pad_which_never_goes` panics at gameinput.rs:2555, `left_x` is 0.0 instead of 1.0 - `gameinput::tests::pc_kbm_maps_pc_style_keys_and_smooths_mouse_look` panics at gameinput.rs:2747, buttons 0 instead of 8192 (RIGHT_STICK) I think the cause is the native input default and not anything Windows specific in the input stack. `mouse::native_input()` (gameinput/mouse.rs:40) is on unless `VICTORY_NATIVE_INPUT=0`, and with it on the `#[cfg(windows)]` branch of `State::poll` (gameinput.rs:932 onwards) builds the stand-in pad from `mouse::read_native()` and `keyboard_events::held_axes()`. The fake source's keys and mouse pad are never used for it. In a test there's no capture window and nothing held, so the stand-in is all zero, which is exactly what the three asserts see. The keyboard reading itself is fine, the count and key checks before line 2489 pass. With `VICTORY_NATIVE_INPUT=0` the whole lib suite passes here, 160 passed, 0 failed, 1 ignored. Since `cfg(windows)` is about the target and not the host, I'd expect the same three to fail when the msvc build runs under Wine unless that variable is set. I haven't run it under Wine myself, but the description of #179 mentions running the fake-source tests with `VICTORY_NATIVE_INPUT=0 VICTORY_PC_CONTROLS=0 VICTORY_KBM_PC=0` for this same reason. So it looks like the tests fell behind the default rather than a bug in the input code. Maybe the hub could take the native-input choice as a parameter so these tests can turn it off without touching the environment, but that's your call. AI-assisted: yes
Author
Owner

@⁠Kal0s-design on GitHub · 2026-12-04 02:35 UTC · original

Found the cause of the victory-shader failure listed above. With VICTORY_D3D12_DEBUG=1 the error from emit::size_tests::a_reused_descriptor_register_read_only_behind_its_flag reads "ID3D12Device::CreateComputeShader: Shader wants wave lane count of 32 but maximum wave lane count for device is 4". So it's the same thing as the #344 note, WARP runs 4-lane waves and the test's compute shader asks for wave 32. Not a translator bug, the test just can't run on WARP as written.

AI-assisted: yes

**@⁠Kal0s-design** on GitHub · 2026-12-04 02:35 UTC · [original](https://github.com/lobomfz/VIctory-xmem/issues/357#issuecomment-7399114367) Found the cause of the victory-shader failure listed above. With `VICTORY_D3D12_DEBUG=1` the error from `emit::size_tests::a_reused_descriptor_register_read_only_behind_its_flag` reads "ID3D12Device::CreateComputeShader: Shader wants wave lane count of 32 but maximum wave lane count for device is 4". So it's the same thing as the #344 note, WARP runs 4-lane waves and the test's compute shader asks for wave 32. Not a translator bug, the test just can't run on WARP as written. AI-assisted: yes
Author
Owner

@⁠tommiehansen on GitHub · 2026-12-05 13:32 UTC · original · edited 2026-12-05 13:41 UTC

Thanks for the detailed testing! #558, #559 and #566 address the resource crash, flaky watch tests and indirect buffer tests. I've now reproduced all three GameInput failures on Windows and #592 passes 13/13 tests with both input settings. All four PRs are still open, not merged. The remaining failures need separate verification.

**@⁠tommiehansen** on GitHub · 2026-12-05 13:32 UTC · [original](https://github.com/lobomfz/VIctory-xmem/issues/357#issuecomment-7438824420) · edited 2026-12-05 13:41 UTC Thanks for the detailed testing! #558, #559 and #566 address the resource crash, flaky watch tests and indirect buffer tests. I've now reproduced all three GameInput failures on Windows and #592 passes 13/13 tests with both input settings. All four PRs are still open, not merged. The remaining failures need separate verification.
Author
Owner

@⁠tommiehansen on GitHub · 2026-12-05 17:39 UTC · original

Quick update: #592 has now been merged into main. The three GameInput tests passed on Windows after the fix.

**@⁠tommiehansen** on GitHub · 2026-12-05 17:39 UTC · [original](https://github.com/lobomfz/VIctory-xmem/issues/357#issuecomment-7442368803) Quick update: #592 has now been merged into main. The three GameInput tests passed on Windows after the fix.
This discussion has been locked. Commenting is limited to contributors.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/lobomfz--VIctory-xmem#357
No description provided.