Skip to content

Tests: report D3D-46 copy setup failures - #1047

Merged
ItsNotRexed merged 1 commit into
ItsNotRexed:mainfrom
whattheflop:test/d3d46-copy-setup-diagnostics
Nov 22, 2026
Merged

ItsNotRexed merged 1 commit into
ItsNotRexed:mainfrom
whattheflop:test/d3d46-copy-setup-diagnostics

Conversation

@whattheflop

Copy link
Copy Markdown
Contributor

Summary

D3D-46 follow-up under the coordination claim.

The stock copy comparison previously exited 1 during native RTX 3080 host setup, as reported in the #1027 verification. In Run::init, print the side (host or Vulkan), the first failed call, and its hexadecimal HRESULT to stderr. Queue, allocator, command list and fence creation keep the same order and short-circuit on the first failure. The change is confined to runtime/test/d3d12_copy_compare.h.

No-game verification

Built and ran the stock d3d12_vulkan_device_test from base 43d470316ec6cbcd64002bc3792998d9f5745dac and head 36b86a345ccbb8574115bc62501d2e4c7f5e4dd5. Windows 11 build 26200, RTX 3080 driver 616.64, MSVC 19.38.33145, Windows SDK 10.0.26100.0, CMake/Ninja RelWithDebInfo, Vulkan SDK and Khronos validation 1.4.363.0. Each run selected the NVIDIA ICD and used an empty process-local implicit-layer path. Loader output confirmed the RTX 3080 and Khronos validation.

D3D12 host selector Base Head
Unset, selected RTX 3080 Exit 0, 69/69 Exit 0, 69/69
3080 Exit 0, 69/69 Exit 0, 69/69
warp Exit 0, 69/69 Exit 0, 69/69

The earlier native-host failure did not recur, so no failing call or HRESULT was observed. Source review confirmed the failure message and call order. Every run still printed the known standalone validation diagnostic VUID-vkCreateDevice-ppEnabledExtensionNames-01387. git diff --check passed and the committed diff contains only the test helper.

AI-assisted (Codex).

@bobcatchris

Copy link
Copy Markdown
Contributor

Static review of 36b86a3 (I could not run the Windows/GPU build here; the local toolchain path is blocked by the sandbox):

  • <cstdio> is already included at line 18, so std::fprintf(stderr, ...) needs no new header.
  • Ptr<T> (lines 28-39) releases partial objects in its destructor, so the && short-circuit after a failed setup call does not leak the earlier queue/allocator/list/fence.
  • static_cast<unsigned>(hr) with %08x prints the 32-bit HRESULT bit pattern correctly on Windows; the is_ours label cleanly distinguishes the Vulkan-side run from the host run. The existing generic caller messages at lines 676 and 707 now get a preceding line naming the exact call and HRESULT, which is what the D3D-46 finding asked for.
  • Only the first failing call per side is reported because later setup calls cannot run after one fails; that is the right behavior here.

The diff is confined to the diagnostic header and introduces no data or new dependencies. From the static check this looks correct; the RTX 3080 reproduction remains the author's GPU evidence.

@quackottu quackottu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested 36b86a3 on NVIDIA GeForce RTX 5070, driver 621.24, Windows 11 Pro (26300), VS 2022 Build Tools, Vulkan SDK 1.4.363.0, with LEONIDA_VK_VALIDATION=1 and LEONIDA_D3D12=vulkan: pass

  • ctest -C RelWithDebInfo: 100% tests passed, 0 tests failed out of 47
  • every test program in the build passes. d3d12_vulkan_device_test and d3d12_fence_timing_test each report 3 validation errors (VUID-vkCreateDevice-ppEnabledExtensionNames-01387), but main 43d4703 shows the same: the standalone instance drops VK_KHR_surface, which #1027 fixes. Not from this PR.
  • d3d12_clear_test differs from WARP exactly as on main (#521).

Implicit Vulkan layers (overlays) were off through an empty VK_IMPLICIT_LAYER_PATH.

@undeadhuman37

Copy link
Copy Markdown
Contributor

Tested 36b86a3 on NVIDIA GeForce RTX 4070 SUPER, driver 621.01, Windows 11 Home 25H2 (26200.9974), VS 2022 Build Tools, Vulkan SDK 1.4.363.1: pass

  • Build: 0 warnings.
  • ctest: 100% passed, 0 failed out of 47 (gameinput disabled, no SDL3).
  • d3d12_vulkan_device_test: exit 0, copies and GetCopyableFootprints matched the host. No copy setup failure was printed, so the new messages didn't trigger here.

AI-assisted. No game files.

@ItsNotRexed
ItsNotRexed merged commit 27ec81f into ItsNotRexed:main Nov 22, 2026
9 of 10 checks passed
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.

5 participants