From: Stefan Riesenberger stefan.riesenberger@gmail.com
Signed-off-by: Stefan Riesenberger stefan.riesenberger@gmail.com Signed-off-by: Henri Verbeet hverbeet@codeweavers.com --- dlls/d3d11/d3d11_main.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/dlls/d3d11/d3d11_main.c b/dlls/d3d11/d3d11_main.c index 9c89820f6f5..b0a32aceda7 100644 --- a/dlls/d3d11/d3d11_main.c +++ b/dlls/d3d11/d3d11_main.c @@ -136,7 +136,7 @@ HRESULT WINAPI D3D11CoreCreateDevice(IDXGIFactory *factory, IDXGIAdapter *adapte return S_OK; }
-HRESULT WINAPI D3D11CreateDevice(IDXGIAdapter *adapter, D3D_DRIVER_TYPE driver_type, HMODULE swrast, UINT flags, +static HRESULT d3d11_create_device(IDXGIAdapter *adapter, D3D_DRIVER_TYPE driver_type, HMODULE swrast, UINT flags, const D3D_FEATURE_LEVEL *feature_levels, UINT levels, UINT sdk_version, ID3D11Device **device_out, D3D_FEATURE_LEVEL *obtained_feature_level, ID3D11DeviceContext **immediate_context) { @@ -278,6 +278,14 @@ HRESULT WINAPI D3D11CreateDevice(IDXGIAdapter *adapter, D3D_DRIVER_TYPE driver_t return (device_out || immediate_context) ? S_OK : S_FALSE; }
+HRESULT WINAPI D3D11CreateDevice(IDXGIAdapter *adapter, D3D_DRIVER_TYPE driver_type, HMODULE swrast, UINT flags, + const D3D_FEATURE_LEVEL *feature_levels, UINT levels, UINT sdk_version, ID3D11Device **device_out, + D3D_FEATURE_LEVEL *obtained_feature_level, ID3D11DeviceContext **immediate_context) +{ + return d3d11_create_device(adapter, driver_type, swrast, flags, feature_levels, + levels, sdk_version, device_out, obtained_feature_level, immediate_context); +} + HRESULT WINAPI D3D11CreateDeviceAndSwapChain(IDXGIAdapter *adapter, D3D_DRIVER_TYPE driver_type, HMODULE swrast, UINT flags, const D3D_FEATURE_LEVEL *feature_levels, UINT levels, UINT sdk_version, const DXGI_SWAP_CHAIN_DESC *swapchain_desc, IDXGISwapChain **swapchain, @@ -299,8 +307,10 @@ HRESULT WINAPI D3D11CreateDeviceAndSwapChain(IDXGIAdapter *adapter, D3D_DRIVER_T if (device_out) *device_out = NULL;
- if (FAILED(hr = D3D11CreateDevice(adapter, driver_type, swrast, flags, feature_levels, levels, sdk_version, - &device, obtained_feature_level, immediate_context))) + /* Avoid forwarding to D3D11CreateDevice(), since it breaks applications + * hooking these entry-points. */ + if (FAILED(hr = d3d11_create_device(adapter, driver_type, swrast, flags, feature_levels, + levels, sdk_version, &device, obtained_feature_level, immediate_context))) { WARN("Failed to create a device, returning %#x.\n", hr); return hr;
Hi,
While running your changed tests on Windows, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=48289
Your paranoid android.
=== debian9 (32 bit report) ===
d3d11: Unhandled exception: page fault on read access to 0x3f800000 in 32-bit code (0x7ed11f0d).
=== debian9 (32 bit Chinese:China report) ===
d3d11: d3d11.c:5346: Test failed: Got unexpected hr 0x8876086a for query type 4.
=== debian9 (32 bit WoW report) ===
d3d11: Unhandled exception: page fault on read access to 0x3f800000 in 32-bit code (0x7ed11f0d).