Repository navigation
dxgi: CheckInterfaceSupport reports the adapter's real UMD driver version - #4273
Exopus-0x65f7ad0 wants to merge 1 commit into
Conversation
…sion IDXGIAdapter::CheckInterfaceSupport(IDXGIDevice) reported a user-mode driver version of 0. Host DXGI reports the adapter's, which titles read as the driver version. The layer now reads it the way DXGI does, D3DKMTOpenAdapterFromLuid + D3DKMTQueryAdapterInfo( KMTQAITYPE_UMD_DRIVER_VERSION) on the adapter's Vulkan deviceLUID, looked up from gdi32 at run time (0 kept when missing or failing, e.g. under Wine); the host dxgi.dll isn't used. Measured equal to host DXGI on an RTX 5060 Ti (0x0020000000100842, driver 621.14) and on WARP. dxgi_swapchain_test compares it with the host adapter of the same LUID (host dxgi.dll loaded at run time); fails on main with 0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Tested e27efbc on NVIDIA GeForce RTX 3070, driver 617.42 (32.0.16.1742), Windows 11 24H2, MSVC 19.44: pass, and the comparison really ran. The new check only fails when the host lookup succeeds and differs, so I printed both values in a local copy of
AI-assisted (Claude). |
Kam471
left a comment
There was a problem hiding this comment.
Built dxgi_swapchain_test at e27efbc1 and ran it on Windows 11, RTX 5070 Ti: PASS (CreateSwapChain, CreateSwapChainForHwnd, CreateSwapChainForCoreWindow, occlusion status, GetBuffer+GetDesc, clear+readback, Present, ResizeBuffers; 0 validation errors); ctest -R dxgi_swapchain -> 1/1 passed (0.53 s).
CheckInterfaceSupport(IDXGIDevice) now reports a real UMD version instead of zero, and the swapchain checks are unchanged. No blocking issue.
|
Tested e27efbc on NVIDIA GeForce RTX 4090 (driver 32.0.16.2101), Windows 11, MSVC 14.51: pass. I built the branch with CMake and Ninja, RelWithDebInfo. The build has no Vulkan SDK, thus no validation layers. I did not test with Wine. AI-assisted. |
Claim: #4084 (comment) (new D3D item)
Problem
IDXGIAdapter::CheckInterfaceSupport(__uuidof(IDXGIDevice), &umd)(runtime/shims/dxgi_com.cpp) set the user-mode driver version to 0. Host DXGI reports the adapter's real one, and titles read it as "the driver version" (to warn about an old driver, or to pick workarounds). On an RTX 5060 Ti with driver 621.14 the host gives0x0020000000100842(32.0.16.2114).Change
Adapterreads the version once at creation the way DXGI itself does:D3DKMTOpenAdapterFromLuidon the adapter's VulkandeviceLUID,D3DKMTQueryAdapterInfo(KMTQAITYPE_UMD_DRIVER_VERSION),D3DKMTCloseAdapter. The three entry points are looked up from gdi32 at run time; when they're missing (Wine) or the query fails the answer stays 0, as before. The hostdxgi.dllisn't loaded by the shim (cf. #2098).winternl.his included for theNTSTATUSthatd3dkmthk.hneeds underWIN32_LEAN_AND_MEAN.Before writing it, I checked that this route gives exactly host DXGI's answer: for every adapter on the machine,
CheckInterfaceSupportvsD3DKMTQueryAdapterInfoon the same LUID:0x00200000001008420x00200000001008420x000a000065f4265a0x000a000065f4265aTests
dxgi_swapchain_test: the layer's adapter answer is compared with the host adapter of the same LUID (hostdxgi.dllloaded at run time, so the test still doesn't link it, and the check is skipped where there's no host DXGI). Onmainit fails withUMD version 0x0000000000000000, host DXGI 0x0020000000100842; with the change it passes (also withLEONIDA_VK_VALIDATION=1). Fullcmake --build+ctest -C RelWithDebInfo -j6: 136/136 passed, the usual 8 skipped/disabled.Limitations
deviceLUIDValidfalse) keeps 0.AI-assisted (Claude Code). Tested on Windows 11 with an RTX 5060 Ti, driver 621.14.