Skip to content

dxgi: CheckInterfaceSupport answers ID3D10Device and ID3D10Device1 as the host does (new RT item) - #7889

Open
AirKyzzZ wants to merge 1 commit into
ItsNotRexed:mainfrom
AirKyzzZ:fix/dxgi-check-interface-d3d10
Open

AirKyzzZ wants to merge 1 commit into
ItsNotRexed:mainfrom
AirKyzzZ:fix/dxgi-check-interface-d3d10

Conversation

@AirKyzzZ

Copy link
Copy Markdown
Contributor

Claimed in the coordination issue as: new RT item (claim)

What and why

The layer's IDXGIAdapter::CheckInterfaceSupport gave the UMD version only for __uuidof(IDXGIDevice) (#4273) and answered DXGI_ERROR_UNSUPPORTED for everything else. Microsoft documents the method as the check for Direct3D 10.x interfaces, and ID3D10Device is a common IID for reading the driver version. Measured on the host dxgi.dll on every adapter here (both RTX 2060 entries, Microsoft Basic Render Driver and EnumWarpAdapter): IDXGIDevice, ID3D10Device and ID3D10Device1 are S_OK with the same UMD version, also with a null version pointer, while IDXGIDevice1 to IDXGIDevice4, ID3D10Multithread, ID3D11Device, ID3D11Device5, ID3D12Device, IDXGIAdapter and IUnknown are DXGI_ERROR_UNSUPPORTED with the version left untouched. The adapter now answers the two D3D10 device IIDs the way it answers IDXGIDevice.

Tested

Windows 10 22H2 (19045), RTX 2060 / NVIDIA 566.14, Ryzen 5 2600X, clang-cl 23.1.6 + lld-link, Windows SDK 10.0.26100, Ninja, on b3244472b, over SSH:

  • dxgi_device_test: 3 backend(s) passed. The new checks run on the host WARP adapter, the host RTX 2060 adapter and the layer's adapter on the Vulkan device, so the host answers are checked again on every run. With dxgi_com.cpp from main both host legs pass and the Vulkan leg fails at CheckInterfaceSupport(d3d10, &version) == S_OK (line 115).
  • xbox_present, dxgi_swapchain_count: pass. dxgi_swapchain skips over SSH (no interactive window station).

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

@ItsNotRexed: an exe/recomp PR, as you asked.

Checklist

  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed. (no translator change)

… the host does

Signed-off-by: Maxime Mansiet <AirKyzzZ@users.noreply.github.com>
@ECHOZwei

Copy link
Copy Markdown

Tested b3244472b521e1e34951a9b6f106a0f8571ed254 on Windows 11 (MSVC 14.51 / Visual Studio Community 2026, RelWithDebInfo, Vulkan SDK 1.4.363.0, LEONIDA_VK_VALIDATION=1) on two GPUs (synthetic/host-parity tests only; no game files): pass

  • Built dxgi_device_test, dxgi_swapchain_test, dxgi_swapchain_count_test, and xbox_present_test cleanly (0 new warnings).
  • NVIDIA GeForce RTX 4080 SUPER (driver 621.01, validation on):
    • ctest --test-dir runtime/build -C RelWithDebInfo -R ^(dxgi_device|dxgi_swapchain|dxgi_swapchain_count|xbox_present)$ --output-on-failure: 4/4 passed (5.44s; dxgi_device 0.58s, dxgi_swapchain 1.76s), 0 validation errors.
  • AMD Radeon(TM) Graphics iGPU (driver 25.10, LEONIDA_VK_DEVICE=AMD, validation on):
    • Same 4 tests: 4/4 passed (7.18s; dxgi_device 0.58s, dxgi_swapchain 2.40s), 0 validation errors.
  • git diff --check and python -I scripts/check_no_game_data.py runtime/shims/dxgi_com.cpp runtime/test/dxgi_device_test.cpp: clean (exit 0).
  • Code review: clean and minimal; CheckInterfaceSupport matches host Windows 11 DXGI behavior for ID3D10Device/ID3D10Device1 (including null umd_version) and leaves *umd_version untouched on DXGI_ERROR_UNSUPPORTED.

AI-assisted.

@MartinIndra02

Copy link
Copy Markdown

Independent build + test: PASS

AI-assisted (Claude Code). Windows 11 x64, MSVC 19.44.35220, Ninja RelWithDebInfo, NVIDIA GeForce RTX 3080 driver 621.24 / 32.0.16.2124.

Head b3244472b, based on current main (dde82f27e).

Test PR head runtime/shims/dxgi_com.cpp reverted to main
dxgi_device_test.exe exit 0: 3 backend(s) passed (host WARP, host RTX 3080, Vulkan RTX 3080) exit 1

The new CheckInterfaceSupport checks run in check_backend for all three backends. That means the host DXGI adapters on this machine give the same answers the PR adds: S_OK with the IDXGIDevice UMD version for ID3D10Device/ID3D10Device1, both with and without the output pointer, and DXGI_ERROR_UNSUPPORTED with the output left untouched for IDXGIDevice1/ID3D12Device. The Vulkan adapter now matches that. No issues found.

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.

3 participants