Skip to content

bvh_builder, fsr_dispatch: no PC D3D12 device is a skip (77), not a failure - #8022

Open
XmYx wants to merge 1 commit into
ItsNotRexed:mainfrom
XmYx:tests-skip-no-pc-device
Open

XmYx wants to merge 1 commit into
ItsNotRexed:mainfrom
XmYx:tests-skip-no-pc-device

Conversation

@XmYx

@XmYx XmYx commented Nov 23, 2026

Copy link
Copy Markdown

Claim: #7913 (from my finding)
Depends on: nothing. Overlaps #5812 (same two files, a different case: the Windows 10 resource refusal); the hunks don't touch.

bvh_builder_test and fsr_dispatch_test map a package DLL and then check(pc != nullptr, "PC D3D12 device created"). When the host has no PC D3D12 device that check FAILs and the test exits 1. That happens on Wine without a working vkd3d, in a VM, or on a headless host. The other D3D12 tests print SKIP and return 77 in that case (allocator_proxy_test, d3d12_bundle_test, d3d12_clear_formats_test). Without LEONIDA_GAME_DIR both tests skip before reaching the check, so only contributors with the package see this.

Change (+13 lines, test code only):

  • On the default, non-Vulkan path, a null create_pc_device(...) prints one SKIP line and returns 77. The skip only fires when no earlier check has failed, so a real failure still exits 1.
  • The skip messages name the Vulkan alternatives: LEONIDA_BVH_DEVICE=vulkan and LEONIDA_FSR_DEVICE=vulkan.
  • Unchanged: the Vulkan paths, where a null device still fails because the layer's device is what's under test. Also unchanged: bvh's WARP choice and LEONIDA_BVH_HARDWARE=1, and the Windows 10 block fsr_dispatch, bvh_builder: report a skip, not a failure or a pass, on Windows 10 hosts #5812 edits.
  • SKIP_RETURN_CODE 77 is already set for both tests (runtime/CMakeLists.txt:962, :979).

Tested. Linux, Wine 10.0 (Ubuntu build, built-in d3d12, which can't create a device here), clang-cl 21 + xwin cross build of main dde82f2, with LEONIDA_GAME_DIR set to my own verified 1.0.2.1 package DLLs. Counts only:

run main this PR
bvh_builder_test exit 1: 7 PASS, 1 FAIL exit 77: 7 PASS, 1 SKIP
fsr_dispatch_test exit 1: 14 PASS, 1 FAIL exit 77: 14 PASS, 1 SKIP
fsr_dispatch_test, LEONIDA_FSR_DEVICE=vulkan exit 0: 19 PASS exit 0: 19 PASS
either, LEONIDA_GAME_DIR unset exit 77 (no package) exit 77 (no package)

Not run on native Windows, where a PC device exists and the new branch is never taken. scripts/check_no_game_data.py is clean on both files.

AI-assisted (Claude Code, Sonnet subagent, reviewed and re-run).

🤖 Generated with Claude Code

…ailure

When create_pc_device returns null on the default (non-Vulkan) path, the host
has no usable D3D12 device (Wine without working vkd3d, a VM, a headless box).
Print one SKIP line and return 77 like the other D3D12 tests, so ctest reports
a skip. The Vulkan paths are unchanged: a null device there still fails.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@rideinstead

Copy link
Copy Markdown

TEST validation — Approve

Validated on CPU (no GPU, no game files). Test code only — no new test binaries.

What changed: Modifies runtime/test/bvh_builder_test.cpp (+7) and runtime/test/fsr_dispatch_test.cpp (+6) to return CTest skip code 77 instead of exit 1 when no PC D3D12 device exists. Vulkan paths unchanged — a null device there still fails.

Verification: Author tested on Linux Wine 10.0 (built-in d3d12, can't create a device) with clang-cl 21 + xwin cross build:

  • bvh_builder_test: main exit 1 → PR exit 77
  • fsr_dispatch_test: main exit 1 → PR exit 77
  • scripts/check_no_game_data.py clean on both files

Consistency: Follows existing skip patterns (allocator_proxy_test, d3d12_bundle_test, d3d12_clear_formats_test). CTE's SKIP_RETURN_CODE 77 already configured at runtime/CMakeLists.txt:962, :979.

Consistency: Follows existing skip patterns (allocator_proxy_test, d3d12_bundle_test, d3d12_clear_formats_test). CTE's SKIP_RETURN_CODE 77 already configured at runtime/CMakeLists.txt:962, :979.

Overlap: Touches fsr_dispatch_test.cpp and bvh_builder_test.cpp, which #5812 also edits for a separate Windows 10 check — hunks don't overlap.

Recommendation: Approve / merge. Clean, minimal, fully CPU-validatable via Wine/headless.

@justrealyme

Copy link
Copy Markdown

Tested eb934c6 on NVIDIA GeForce RTX 5070 Ti, driver 617.42, Windows 11 build 26300, VS 2022 Build Tools (MSVC 19.44), Windows SDK 10.0.26100, Vulkan SDK 1.4.363.0, RelWithDebInfo: pass.

Built bvh_builder_test and fsr_dispatch_test and ran ctest -R "^(bvh_builder|fsr_dispatch)$" without LEONIDA_GAME_DIR: both report Skipped (exit 77), ctest 100% passed, as intended. Note that #8160 makes an overlapping change to the same two tests; it gives the same result here.

Synthetic inputs only, no game files. AI-assisted (Claude Code).

@myokex

myokex commented Nov 23, 2026

Copy link
Copy Markdown

Tested eb934c622 merged onto main a91049014 (clean merge) on Windows 11 Pro 10.0.26300, AMD Radeon RX 7800 XT (driver 32.0.32029.2010), MSVC 19.44 (VS 2022, RelWithDebInfo), Vulkan SDK 1.4.363.0, -DLEONIDA_REQUIRE_VULKAN=ON: pass, no new failures, with one limit.

  • Full ctest -C RelWithDebInfo -j8: 6 of 262 fail, all also failing on main. Nothing new.
  • Main a91049014 alone on this machine fails 7 of 262: d3d12_depth_resolve, d3d12_indirect_dispatch_count, d3d12_pipeline_library_host, d3d12_texture_tiles, d3d12_vulkan_device (known on this card, fix PRs exist), vk_queue_query_sync and crt_timed_wait (both flaky here).
  • Limit: on this machine bvh_builder and fsr_dispatch are already Skipped on main too, so the new !pc && !g_failures → 77 path was not exercised here. The change is a code read: it returns 77 only when no device was created and nothing failed before, which matches the other SKIP_RETURN_CODE 77 tests.

I read the whole diff first: nothing outside the stated scope (no clipboard, process, network or registry code). No game files used.

AI-assisted (Claude Code).

@Kerwinss

Copy link
Copy Markdown

Tested eb934c6 on Windows 11 Pro 10.0.26300, MSVC 14.51 (VS Build Tools 2026), Windows SDK 10.0.26100, NVIDIA GeForce RTX 4060 / 621.24, Khronos Vulkan headers via -DLEONIDA_VULKAN_HEADERS_FETCH=ON (no glslangValidator): pass, no regression.

Merged onto main dde82f2 (clean), full runtime build, ctest -C RelWithDebInfo -j6: 235/237. The two failures are the ones main has on this GPU: d3d12_depth_resolve (#7985) and d3d12_vulkan_device:6574 (claimed by iTzAlvar). Without LEONIDA_GAME_DIR, fsr_dispatch and bvh_builder still skip on "no package" before reaching create_pc_device, so the new no-device branch isn't exercised on this machine.

Note for the merge: #8160 adds the same "no PC D3D12 device → 77" skip to the same two tests, plus LEONIDA_HOST_ADAPTER. The two will conflict, so only one of them should land.

AI-assisted (Claude Code). No game files.

@Ekabusto

Copy link
Copy Markdown

Tested eb934c622 on Windows 11 10.0.26300, AMD Radeon RX 9070 XT (a PC D3D12 device is present), MSVC 19.44:
builds and runs, but the changed path isn't reached here.

AI-assisted: yes (Claude ran the build and tests; results checked by me).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants