2

In DirectX9 I can call IDirect3D9::GetAdapterIdentifier method to get D3DADAPTER_IDENTIFIER9 with adapter driver version DriverVersion.

Is there anything similar in DirectX12 for getting a driver version?

volodya7292
  • 454
  • 8
  • 20

3 Answers3

3

You can get each DXGI adapter driver version from the registry,

key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DirectX

(with matching DeviceId from DXGI_ADAPTER_DESC)

For example, I get :

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DirectX{53ED9FF6-8883-11E8-B1FF-C0C7A6E97177}

DeviceId = 0x402

Description = Intel(R) HD Graphics

DriverVersion = 0x140013000f12e3

then :

LARGE_INTEGER nDriverVersion;
nDriverVersion.QuadPart = 0x140013000f12e3; 
WORD nProduct = HIWORD(nDriverVersion.HighPart);
WORD nVersion = LOWORD(nDriverVersion.HighPart);
WORD nSubVersion = HIWORD(nDriverVersion.LowPart);
WORD nBuild = LOWORD(nDriverVersion.LowPart);

=> 20.19.15 Build 4835, which is a valid version (Intel HD Graphics Driver 20.19.15.4835 64-bit)

Castorix
  • 1,465
  • 1
  • 9
  • 11
  • 1
    This looked promising at first, but unfortunately I've seen some systems keep entries from older driver versions around. Maybe you could use the "LastSeen" field to determine the currently used one, but I'm not sure about it. – didito May 15 '20 at 21:09
  • 1
    Seems like you have to compare the LUID of the active/current adapter. See https://github.com/GameTechDev/gpudetect/blob/master/GPUDetect.cpp#L448 – didito May 15 '20 at 23:51
0

I just stumbled over this question and found a slightly different way I thought I'd share for anyone stumbling through in the future.

https://learn.microsoft.com/en-us/windows/win32/api/dxgi/nf-dxgi-idxgiadapter-checkinterfacesupport

IDXGIAdapter::CheckInterfaceSupport will return the UMD driver version as a long integer and you can then decode it in the same way as the post from Castorix.

Roger Perkins
  • 678
  • 5
  • 7
-1

Use DXGI's IDXGIAdapter::GetDesc method.

This is the same as for Direct3D 10 and 11, which use DXGI too.

Note that there are several versions of the DXGI_ADAPTER_DESC structure, the latest in DXGI 1.6.

Acorn
  • 24,970
  • 5
  • 40
  • 69
  • 2
    But the latest structure `DXGI_ADAPTER_DESC3` does not contain a driver version, such as `DriverVersion` in `D3DADAPTER_IDENTIFIER9`. – volodya7292 Jul 08 '19 at 15:34
  • @PaulMattson Ah, I see what you mean. Maybe you can use the `LUID` adapter field to match it with a particular driver. – Acorn Jul 08 '19 at 16:16