Skip to content

d3d12_vulkan_device_test: compare the VIDEO_ENCODE allocator only on a host with a video device (WARP host) - #4700

Closed
0klavair wants to merge 1 commit into
ItsNotRexed:mainfrom
0klavair:test/vulkan-device-warp-video
Closed

0klavair wants to merge 1 commit into
ItsNotRexed:mainfrom
0klavair:test/vulkan-device-warp-video

Conversation

@0klavair

Copy link
Copy Markdown

Claimed in the coordination issue as: #4571 (comment) (from @emirduran707's finding)

What and why

With LEONIDA_HOST_ADAPTER=warp (the way docs/d3d12_vulkan.md gives to run the test), d3d12_vulkan_device_test counts "command allocator: type video encode" as a mismatch (layer S_OK, host E_INVALIDARG) and fails at argument_mismatches. WARP has no video hardware. Measured with a probe:

host QI(ID3D12VideoDevice) VIDEO_ENCODE queue VIDEO_ENCODE allocator
WARP (Windows 11 23H2) E_NOINTERFACE E_INVALIDARG E_INVALIDARG
RTX 5060, NVIDIA 621.01 S_OK S_OK S_OK

The change (test only)

  • host_video(host): the host answers ID3D12VideoDevice.
  • The video-encode allocator case gets it as its comparable check. On a host without a video device it prints not comparable on this host instead of counting. A GPU host keeps comparing it.
  • #include <d3d12video.h> for the interface.

Tested

On NVIDIA GeForce RTX 5060, driver 621.01, Windows 11 23H2 22631.6199, MSVC 19.44, Vulkan SDK 1.4.363:

Independent of #4667 (different lines of the same file; they merge cleanly together).

No game files. AI-assisted.

…a host with a video device

With LEONIDA_HOST_ADAPTER=warp the case "command allocator: type video encode"
was counted as a mismatch (layer S_OK, host E_INVALIDARG) and failed the
test. WARP has no ID3D12VideoDevice (E_NOINTERFACE) and refuses a
VIDEO_ENCODE queue and allocator; a GPU host (RTX 5060, RX 9060 XT) creates
them, as the layer does.

The case now has a host_video comparable check: the host must answer
ID3D12VideoDevice, otherwise it prints "not comparable on this host".

@Kam471 Kam471 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.

Checked the diff at fa3a88012 (Windows 11 host with a video device; the gated row still compares here). It adds host_video via QueryInterface(ID3D12VideoDevice) and gates the "command allocator: type video encode" case on it, so WARP's E_INVALIDARG is not a mismatch. git diff --check clean. No blocking issue.

Duplicate: #4698 (opened 11/23 04:18:05, before this at 04:18:58) gates the same row by creating a VIDEO_ENCODE queue, which is the closer test of what the case needs; the branches conflict in runtime/test/d3d12_vulkan_device_test.cpp. Please compare with #4698 and close one.

@0klavair

Copy link
Copy Markdown
Author

Closing as a duplicate of #4698 (@mrp1no, opened a minute earlier from the same finding, TEST-1019), which gates the same case by creating a VIDEO_ENCODE queue, the closer check of what the case needs. My measurements in the description still hold for it: WARP refuses the queue (E_INVALIDARG), and the RTX 5060 creates it. Sorry for the overlap: the claim was in #4683 after the coordination issue moved, and I only checked #4571. AI-assisted.

@0klavair 0klavair closed this Nov 23, 2026
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.

2 participants