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/d3d10/d3d10_main.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/dlls/d3d10/d3d10_main.c b/dlls/d3d10/d3d10_main.c index 4d3ed1244ed..bc90ff1df7b 100644 --- a/dlls/d3d10/d3d10_main.c +++ b/dlls/d3d10/d3d10_main.c @@ -27,7 +27,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(d3d10);
-HRESULT WINAPI D3D10CreateDevice(IDXGIAdapter *adapter, D3D10_DRIVER_TYPE driver_type, +static HRESULT d3d10_create_device(IDXGIAdapter *adapter, D3D10_DRIVER_TYPE driver_type, HMODULE swrast, UINT flags, UINT sdk_version, ID3D10Device **device) { IDXGIFactory *factory; @@ -139,6 +139,12 @@ HRESULT WINAPI D3D10CreateDevice(IDXGIAdapter *adapter, D3D10_DRIVER_TYPE driver return hr; }
+HRESULT WINAPI D3D10CreateDevice(IDXGIAdapter *adapter, D3D10_DRIVER_TYPE driver_type, + HMODULE swrast, UINT flags, UINT sdk_version, ID3D10Device **device) +{ + return d3d10_create_device(adapter, driver_type, swrast, flags, sdk_version, device); +} + HRESULT WINAPI D3D10CreateDeviceAndSwapChain(IDXGIAdapter *adapter, D3D10_DRIVER_TYPE driver_type, HMODULE swrast, UINT flags, UINT sdk_version, DXGI_SWAP_CHAIN_DESC *swapchain_desc, IDXGISwapChain **swapchain, ID3D10Device **device) @@ -152,8 +158,9 @@ HRESULT WINAPI D3D10CreateDeviceAndSwapChain(IDXGIAdapter *adapter, D3D10_DRIVER adapter, debug_d3d10_driver_type(driver_type), swrast, flags, sdk_version, swapchain_desc, swapchain, device);
- hr = D3D10CreateDevice(adapter, driver_type, swrast, flags, sdk_version, device); - if (FAILED(hr)) + /* Avoid forwarding to D3D10CreateDevice(), since it breaks applications + * hooking these entry-points. */ + if (FAILED(hr = d3d10_create_device(adapter, driver_type, swrast, flags, sdk_version, device))) { WARN("Failed to create a device, returning %#x\n", hr); *device = NULL;
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=48291
Your paranoid android.
=== debian9 (32 bit report) ===
d3d11: d3d11.c:5595: Test failed: Got unexpected data size 0. Unhandled exception: assertion failed in 32-bit code (0xf773ac89).
Report errors: d3d11:d3d11 crashed (80000101)
=== debian9 (32 bit Chinese:China report) ===
d3d11: d3d11.c:5346: Test failed: Got unexpected hr 0x8876086a for query type 4. Unhandled exception: page fault on read access to 0x00000001 in 32-bit code (0x7eb5cf0d).
=== debian9 (32 bit WoW report) ===
d3d11: Unhandled exception: page fault on read access to 0x3f800000 in 32-bit code (0x7ed04f0d).
=== debian9 (64 bit WoW report) ===
d3d11: d3d11.c:17791: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0x00000000, 0xffffffff, 0x00000000, 0x00000000} at (0, 0), sub-resource 0.