Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46298 Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/d3d11/device.c | 10 ++++++++-- dlls/d3d11/tests/d3d11.c | 14 ++++++++------ 2 files changed, 16 insertions(+), 8 deletions(-)
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c index df754de130..7ad3d9b5e9 100644 --- a/dlls/d3d11/device.c +++ b/dlls/d3d11/device.c @@ -3648,9 +3648,15 @@ static UINT STDMETHODCALLTYPE d3d11_device_GetExceptionMode(ID3D11Device2 *iface return 0; }
-static void STDMETHODCALLTYPE d3d11_device_GetImmediateContext1(ID3D11Device2 *iface, ID3D11DeviceContext1 **context) +static void STDMETHODCALLTYPE d3d11_device_GetImmediateContext1(ID3D11Device2 *iface, + ID3D11DeviceContext1 **immediate_context) { - FIXME("iface %p, context %p stub!\n", iface, context); + struct d3d_device *device = impl_from_ID3D11Device2(iface); + + TRACE("iface %p, immediate_context %p.\n", iface, immediate_context); + + *immediate_context = &device->immediate_context.ID3D11DeviceContext1_iface; + ID3D11DeviceContext1_AddRef(*immediate_context); }
static HRESULT STDMETHODCALLTYPE d3d11_device_CreateDeferredContext1(ID3D11Device2 *iface, UINT flags, diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c index 3efba83682..3c870c27e7 100644 --- a/dlls/d3d11/tests/d3d11.c +++ b/dlls/d3d11/tests/d3d11.c @@ -6439,12 +6439,7 @@ static void test_device_context_state(void)
feature_level = ID3D11Device1_GetFeatureLevel(device); ID3D11Device1_GetImmediateContext1(device, &context); - todo_wine ok(!!context, "Failed to get immediate context.\n"); - if (!context) - { - ID3D11Device1_Release(device); - return; - } + ok(!!context, "Failed to get immediate context.\n");
sampler_desc.Filter = D3D11_FILTER_MIN_MAG_MIP_LINEAR; sampler_desc.AddressU = D3D11_TEXTURE_ADDRESS_WRAP; @@ -6471,7 +6466,14 @@ static void test_device_context_state(void) feature_level = min(feature_level, D3D_FEATURE_LEVEL_10_1); hr = ID3D11Device1_CreateDeviceContextState(device, 0, &feature_level, 1, D3D11_SDK_VERSION, &IID_ID3D10Device, NULL, &context_state); +todo_wine ok(SUCCEEDED(hr), "Failed to create device context state, hr %#x.\n", hr); + if (FAILED(hr)) + { + ID3D11SamplerState_Release(sampler); + ID3D11Device1_Release(device); + return; + } refcount = get_refcount(context_state); ok(refcount == 1, "Got refcount %u, expected 1.\n", refcount);
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=46477
Your paranoid android.
=== debian9 (32 bit report) ===
d3d11: Unhandled exception: page fault on execute access to 0x00000000 in 32-bit code (0x00000000).
=== debian9 (32 bit Japanese:Japan report) ===
d3d11: Unhandled exception: page fault on execute access to 0x00000000 in 32-bit code (0x00000000).
=== debian9 (32 bit Chinese:China report) ===
d3d11: d3d11.c:5346: Test failed: Got unexpected hr 0x8876086a for query type 4.
=== debian9 (64 bit WoW report) ===
d3d11: d3d11.c:5593: Test failed: Got unexpected hr 0x8876086a.