1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-11-29 19:24:10 +01:00

[dxgi] Fix CheckInterfaceSupport for IDXGIDevice

On Windows, this succeeds and reports the D3D9 driver version to the
application.
This commit is contained in:
Philip Rebohle 2019-10-01 15:06:50 +02:00
parent ab51aac6d7
commit 2f4e4abcac
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99

View File

@ -102,20 +102,28 @@ namespace dxvk {
HRESULT STDMETHODCALLTYPE DxgiAdapter::CheckInterfaceSupport(
REFGUID InterfaceName,
LARGE_INTEGER* pUMDVersion) {
const DxgiOptions* options = m_factory->GetOptions();
HRESULT hr = DXGI_ERROR_UNSUPPORTED;
if (pUMDVersion != nullptr)
*pUMDVersion = LARGE_INTEGER();
if (options->d3d10Enable) {
if (InterfaceName == __uuidof(IDXGIDevice))
hr = S_OK;
if (m_factory->GetOptions()->d3d10Enable) {
if (InterfaceName == __uuidof(ID3D10Device)
|| InterfaceName == __uuidof(ID3D10Device1))
return S_OK;
hr = S_OK;
}
Logger::err("DXGI: CheckInterfaceSupport: Unsupported interface");
Logger::err(str::format(InterfaceName));
return DXGI_ERROR_UNSUPPORTED;
// We can't really reconstruct the version numbers
// returned by Windows drivers from Vulkan data
if (pUMDVersion)
pUMDVersion->QuadPart = SUCCEEDED(hr) ? ~0ull : 0ull;
if (FAILED(hr)) {
Logger::err("DXGI: CheckInterfaceSupport: Unsupported interface");
Logger::err(str::format(InterfaceName));
}
return hr;
}