From d539c3e384cb4b9246272e9caf2783629a3a4549 Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Sat, 9 Dec 2017 13:43:14 +0100 Subject: [PATCH] [d3d11] Allow the creation of fake D3D11 WARP and REF devices --- src/d3d11/d3d11_main.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/d3d11/d3d11_main.cpp b/src/d3d11/d3d11_main.cpp index 6ff99e55..77aa77c4 100644 --- a/src/d3d11/d3d11_main.cpp +++ b/src/d3d11/d3d11_main.cpp @@ -30,10 +30,8 @@ extern "C" { if (dxgiAdapter == nullptr) { // We'll treat everything as hardware, even if the // Vulkan device is actually a software device. - if (DriverType != D3D_DRIVER_TYPE_HARDWARE) { - Logger::err("D3D11CreateDevice: Unsupported driver type"); - return DXGI_ERROR_UNSUPPORTED; - } + if (DriverType != D3D_DRIVER_TYPE_HARDWARE) + Logger::warn("D3D11CreateDevice: Unsupported driver type"); // We'll use the first adapter returned by a DXGI factory Com factory = nullptr; @@ -63,7 +61,7 @@ extern "C" { if (FAILED(dxgiAdapter->QueryInterface(__uuidof(IDXGIAdapterPrivate), reinterpret_cast(&dxvkAdapter)))) { Logger::err("D3D11CreateDevice: Adapter is not a DXVK adapter"); - return E_FAIL; + return E_INVALIDARG; } // Feature levels to probe if the @@ -93,7 +91,7 @@ extern "C" { if (flId == FeatureLevels) { Logger::err("D3D11CreateDevice: Requested feature level not supported"); - return DXGI_ERROR_UNSUPPORTED; + return E_INVALIDARG; } // Try to create the device with the given parameters.