From 8d3668559949a5296221ab7536a2a03e344adb9e Mon Sep 17 00:00:00 2001 From: jpark37 Date: Sat, 5 Oct 2019 15:03:23 -0700 Subject: [PATCH] libobs-d3d11: Add GPU driver version to log DX version string is not the nicest, but no need for IHV library. --- libobs-d3d11/d3d11-subsystem.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/libobs-d3d11/d3d11-subsystem.cpp b/libobs-d3d11/d3d11-subsystem.cpp index 1fd20a98c..b14a4b794 100644 --- a/libobs-d3d11/d3d11-subsystem.cpp +++ b/libobs-d3d11/d3d11-subsystem.cpp @@ -781,6 +781,25 @@ static inline void LogD3DAdapters() blog(LOG_INFO, "\t Shared VRAM: %u", desc.SharedSystemMemory); + /* driver version */ + LARGE_INTEGER umd; + hr = adapter->CheckInterfaceSupport(__uuidof(IDXGIDevice), + &umd); + if (SUCCEEDED(hr)) { + const uint64_t version = umd.QuadPart; + const uint16_t aa = (version >> 48) & 0xffff; + const uint16_t bb = (version >> 32) & 0xffff; + const uint16_t ccccc = (version >> 16) & 0xffff; + const uint16_t ddddd = version & 0xffff; + blog(LOG_INFO, + "\t Driver Version: %" PRIu16 ".%" PRIu16 + ".%" PRIu16 ".%" PRIu16, + aa, bb, ccccc, ddddd); + } else { + blog(LOG_INFO, "\t Driver Version: Unknown (0x%X)", + (unsigned)hr); + } + LogAdapterMonitors(adapter); } }