Skip to content

test(d3d12): compare CreateCommandList1 on PC and Xbox device views - #8124

Closed
nurtrino wants to merge 16 commits into
ProjectLeonida:mainfrom
nurtrino:test/command-list1-proxy-comparison
Closed

nurtrino wants to merge 16 commits into
ProjectLeonida:mainfrom
nurtrino:test/command-list1-proxy-comparison

Conversation

@nurtrino

@nurtrino nurtrino commented Nov 23, 2026 •

Copy link
Copy Markdown

D3D-754 follow-up. Coordination claim · Original comparison failure

Depends on: #7490 for the PC and Xbox device views. This branch also includes #7969, which addressed allocation comparisons on the earlier proxy layout.

At 4d8aff6 the test runs each of the 15 CreateCommandList1 cases through three paths. The native SDK supplies the expected HRESULT. The proxy's PC interface and its mapped Xbox slot must each match it. The cases cover list type, node mask, nonzero flags and null output. Both proxy views retain the existing older-Windows exception for list type -1.

The seven mismatches reported on #7969 were specific to the earlier proxy layout. With #7490 at e05b550, the host-side Device4 query returns a PC interface and the SDK call passes. The added Xbox call independently checks the console slot. The allocation tests also use the proxy's Device4 and Device8 interfaces again. Earlier native comparison

Verification

  • At 4d8aff6 the full device CTest passed on both GPUs. Verbose output recorded all 15 PC-view and all 15 Xbox-view HRESULTs matching the native host on each adapter.

  • Ran the full d3d12_vulkan_device executable and its registered CTest in RelWithDebInfo with MSVC 19.44, Windows 11, LEONIDA_VK_VALIDATION=1. For each run LEONIDA_VK_DEVICE and LEONIDA_HOST_ADAPTER selected the same GPU.

  • Radeon 880M, driver 32.0.13046.16, and GeForce RTX 5070 Laptop, driver 621.01. The full test passed on both adapters and ran the native-host comparisons. The test retains its existing per-format capability skips.

  • git diff --check and the changed-file game-data check passed. Synthetic fixtures only. AI-assisted.

tedin7 and others added 9 commits November 23, 2026 17:23
Device slots 43-82 and 104 are console methods (handled, accepted or refused,
every call counted and reported with its caller); ID3D12Device1..8 are
forwarded from 83-103 and 105-112. The queue proxy decides between the two
known console layouts from the first fence call. Facts from xvalkyrie
53af7df77c10, checked against docs/d3d12_vulkan.md section 7.

WIP: tests that use the proxy as a PC device still need moving.
@shdann

shdann commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

Tested 6b8cbb9 on Windows 11 with the NVIDIA GeForce RTX 4090 (32.0.16.2101) and AMD Radeon(TM) Graphics (32.0.21043.5001): pass on both GPUs.

I built the RelWithDebInfo target d3d12_vulkan_device_test. I ran ctest -C RelWithDebInfo -R "^d3d12_vulkan_device$" -V in each build folder. I set LEONIDA_VK_VALIDATION=1. I set both adapter selectors to 4090 or radeon. For AMD I also set VK_LOADER_DRIVERS_DISABLE=*nv*. The device lines confirm both selections.

The parent at 1cd51b3 gives seven CreateCommandList1 mismatches on each GPU. For example, type 99 returns S_OK through the proxy and E_INVALIDARG on the host. The head removes all seven mismatches. The 12 comparison cases keep their original inputs and expectations. I used synthetic inputs only.

AI-assisted.

@nurtrino nurtrino changed the title test(d3d12): compare CreateCommandList1 through the correct device slot test(d3d12): compare CreateCommandList1 on PC and Xbox device views Nov 23, 2026
@milas6669

Copy link
Copy Markdown

Checked head 4d8aff6cc (the earlier check, shdann on an RTX 4090 and AMD, is at 6b8cbb934) merged onto main 867d922f0, clean (18 files, +1781/-365). Native Windows 11 26200, MSVC 19.44 RelWithDebInfo, RTX 3070 (Ampere, 621.24), LEONIDA_VK_VALIDATION=1.

ctest -j3 -R "d3d12|proxy|xs_|dxgi|queue", same filter on both trees:

New data, merge order: the 547-line change to runtime/shims/d3d12_xs_device.cpp collides with four other open PRs that each merge cleanly with main alone: #6964 (slot 26), #7066 (slot 70) and #7290 (slot 12) conflict in d3d12_xs_device.cpp, d3d12_xs_device.h and xs_proxy_mock_test.cpp (or queue_proxy_test.cpp), and #7201 (slots 86, 101, 108) in d3d12_xs_device.cpp and .h. So whichever side lands first, the other group needs a rebase onto the new proxy layout, and four reviewers' checks (including mine on #6964) will be on stale trees.

I did not run a negative control for the new tests here. No game data. AI-assisted (Claude Code).

@comtek21516

Copy link
Copy Markdown

Tested 4d8aff6cc on main at 867d922f0, in one tree with #8673 and #8281 (three clean merges): pass.

For this change. Native: the new xs_console_slots, xs_console_slots_later and xs_console_slots_present_32 pass, and so do device_proxy, device_proxy_trace, queue_proxy, dxgi_device and the six xs_proxy_mock*. Under Wine on the GPU the three new tests pass as well, and the changed GPU tests d3d12_mesh, d3d12_debug_markers and d3d12_fence_timing pass.

One thing it fixes here: d3d12_vulkan_device fails under Wine on this GPU in all five earlier runs today (two of main, three of main with other PRs merged), at line 6574: tiles == 1 (the CreateReservedResource2 case reported after #6935, where the Xbox slot 78 route catches the PC call). In this tree it passes. Of the three PRs in the tree only this one changes d3d12_xs_device.cpp and that test, so I attribute it to this PR, though I did not build it alone to prove that.

Setup. Built with MSVC 14.52 (Visual Studio 18), Windows SDK 10.0.26100, Vulkan SDK 1.4.363.1, Ninja RelWithDebInfo on Windows Server 2025 (no Vulkan driver there), then the same binaries run through scripts/run_wine_tests.py under wine-11.0 (WineHQ stable, xvfb-run) on a Quadro RTX 4000 (Turing), NVIDIA 615.71.09, Ubuntu 22.04.5, where the layer tests report device: Quadro RTX 4000.

passed failed skipped
native Windows, this tree 150 4 124
Wine on the GPU, main 867d922f0 210 12 54
Wine on the GPU, this tree 214 11 54

Against main under Wine, the only differences are #8124's: its three new xs_console_slots* tests pass, and d3d12_vulkan_device goes from failed to passed. Every other test has the status it has on main. The four native failures are gameinput_host, d3d12_sparse_queue_family, vk_bindless_ps_tex and vk_bindless_ps_imgatomic, which fail the same way on main on that machine (#7452). The 11 left under Wine are host comparisons Wine cannot answer and d3d12_xdxr_rt, d3d12_indirect_rt, d3d12_indirect_dispatch_count, all failing on main too.

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

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.

7 participants