mirror of
https://github.com/EduApps-CDG/OpenDX
synced 2024-12-30 09:45:37 +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:
parent
ab51aac6d7
commit
2f4e4abcac
@ -102,20 +102,28 @@ namespace dxvk {
|
|||||||
HRESULT STDMETHODCALLTYPE DxgiAdapter::CheckInterfaceSupport(
|
HRESULT STDMETHODCALLTYPE DxgiAdapter::CheckInterfaceSupport(
|
||||||
REFGUID InterfaceName,
|
REFGUID InterfaceName,
|
||||||
LARGE_INTEGER* pUMDVersion) {
|
LARGE_INTEGER* pUMDVersion) {
|
||||||
const DxgiOptions* options = m_factory->GetOptions();
|
HRESULT hr = DXGI_ERROR_UNSUPPORTED;
|
||||||
|
|
||||||
if (pUMDVersion != nullptr)
|
if (InterfaceName == __uuidof(IDXGIDevice))
|
||||||
*pUMDVersion = LARGE_INTEGER();
|
hr = S_OK;
|
||||||
|
|
||||||
if (options->d3d10Enable) {
|
if (m_factory->GetOptions()->d3d10Enable) {
|
||||||
if (InterfaceName == __uuidof(ID3D10Device)
|
if (InterfaceName == __uuidof(ID3D10Device)
|
||||||
|| InterfaceName == __uuidof(ID3D10Device1))
|
|| InterfaceName == __uuidof(ID3D10Device1))
|
||||||
return S_OK;
|
hr = S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
Logger::err("DXGI: CheckInterfaceSupport: Unsupported interface");
|
// We can't really reconstruct the version numbers
|
||||||
Logger::err(str::format(InterfaceName));
|
// returned by Windows drivers from Vulkan data
|
||||||
return DXGI_ERROR_UNSUPPORTED;
|
if (pUMDVersion)
|
||||||
|
pUMDVersion->QuadPart = SUCCEEDED(hr) ? ~0ull : 0ull;
|
||||||
|
|
||||||
|
if (FAILED(hr)) {
|
||||||
|
Logger::err("DXGI: CheckInterfaceSupport: Unsupported interface");
|
||||||
|
Logger::err(str::format(InterfaceName));
|
||||||
|
}
|
||||||
|
|
||||||
|
return hr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user