mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-10-12 03:24:00 +00:00
Log the GPU driver version in the D3D11VA renderer
This commit is contained in:
@@ -256,6 +256,7 @@ bool D3D11VARenderer::createDeviceByAdapterIndex(int adapterIndex, bool* adapter
|
|||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
ComPtr<ID3D11Device> device;
|
ComPtr<ID3D11Device> device;
|
||||||
ComPtr<ID3D11DeviceContext> deviceContext;
|
ComPtr<ID3D11DeviceContext> deviceContext;
|
||||||
|
LARGE_INTEGER umdVersion;
|
||||||
|
|
||||||
SDL_assert(!m_RenderDevice);
|
SDL_assert(!m_RenderDevice);
|
||||||
SDL_assert(!m_RenderDeviceContext);
|
SDL_assert(!m_RenderDeviceContext);
|
||||||
@@ -287,12 +288,25 @@ bool D3D11VARenderer::createDeviceByAdapterIndex(int adapterIndex, bool* adapter
|
|||||||
goto Exit;
|
goto Exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Query the GPU driver version
|
||||||
|
hr = adapter->CheckInterfaceSupport(__uuidof(IDXGIDevice), &umdVersion);
|
||||||
|
if (FAILED(hr)) {
|
||||||
|
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION,
|
||||||
|
"IDXGIAdapter::CheckInterfaceSupport() failed: %x",
|
||||||
|
hr);
|
||||||
|
goto Exit;
|
||||||
|
}
|
||||||
|
|
||||||
SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION,
|
SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION,
|
||||||
"Detected GPU %d: %S (%x:%x)",
|
"Detected GPU %d: %S (%x:%x) (driver: %u.%u.%u.%u)",
|
||||||
adapterIndex,
|
adapterIndex,
|
||||||
adapterDesc.Description,
|
adapterDesc.Description,
|
||||||
adapterDesc.VendorId,
|
adapterDesc.VendorId,
|
||||||
adapterDesc.DeviceId);
|
adapterDesc.DeviceId,
|
||||||
|
HIWORD(umdVersion.HighPart),
|
||||||
|
LOWORD(umdVersion.HighPart),
|
||||||
|
HIWORD(umdVersion.LowPart),
|
||||||
|
LOWORD(umdVersion.LowPart));
|
||||||
|
|
||||||
hr = D3D11CreateDevice(adapter.Get(),
|
hr = D3D11CreateDevice(adapter.Get(),
|
||||||
D3D_DRIVER_TYPE_UNKNOWN,
|
D3D_DRIVER_TYPE_UNKNOWN,
|
||||||
|
|||||||
Reference in New Issue
Block a user