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

[d3d10] Add option to enable or disable D3D10 support

This commit is contained in:
Philip Rebohle 2018-09-24 15:26:33 +02:00
parent 04ed4273ba
commit bd4338be42
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99
4 changed files with 23 additions and 5 deletions

View File

@ -30,8 +30,17 @@ extern "C" {
ID3D10Device** ppDevice) {
Com<ID3D11Device> d3d11Device;
HRESULT hr = D3D11CoreCreateDevice(pFactory,
pAdapter, Flags, &FeatureLevel, 1, &d3d11Device);
if (ppDevice != nullptr)
*ppDevice = nullptr;
HRESULT hr = pAdapter->CheckInterfaceSupport(
__uuidof(ID3D10Device), nullptr);
if (FAILED(hr))
return hr;
hr = D3D11CoreCreateDevice(pFactory, pAdapter,
Flags, &FeatureLevel, 1, &d3d11Device);
if (FAILED(hr))
return hr;

View File

@ -57,12 +57,16 @@ namespace dxvk {
HRESULT STDMETHODCALLTYPE DxgiAdapter::CheckInterfaceSupport(
REFGUID InterfaceName,
LARGE_INTEGER* pUMDVersion) {
const DxgiOptions* options = m_factory->GetOptions();
if (pUMDVersion != nullptr)
*pUMDVersion = LARGE_INTEGER();
if (InterfaceName == __uuidof(ID3D10Device)
|| InterfaceName == __uuidof(ID3D10Device1))
return S_OK;
if (options->d3d10Enable) {
if (InterfaceName == __uuidof(ID3D10Device)
|| InterfaceName == __uuidof(ID3D10Device1))
return S_OK;
}
Logger::err("DXGI: CheckInterfaceSupport: Unsupported interface");
Logger::err(str::format(InterfaceName));

View File

@ -41,6 +41,8 @@ namespace dxvk {
this->numBackBuffers = config.getOption<int32_t>("dxgi.numBackBuffers", 0);
this->syncInterval = config.getOption<int32_t>("dxgi.syncInterval", -1);
this->d3d10Enable = config.getOption<bool>("d3d10.enable", true);
}
}

View File

@ -45,6 +45,9 @@ namespace dxvk {
/// Sync interval. Overrides the value
/// passed to IDXGISwapChain::Present.
int32_t syncInterval;
/// Enables D3D10 support
bool d3d10Enable;
};
}