Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=41636 Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/d3d11/device.c | 12 ++++++++++-- dlls/d3d11/tests/d3d11.c | 5 +---- 2 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c index 459c49145cd..39144df3dc4 100644 --- a/dlls/d3d11/device.c +++ b/dlls/d3d11/device.c @@ -4077,9 +4077,17 @@ static void STDMETHODCALLTYPE d3d11_device_GetImmediateContext1(ID3D11Device2 *i static HRESULT STDMETHODCALLTYPE d3d11_device_CreateDeferredContext1(ID3D11Device2 *iface, UINT flags, ID3D11DeviceContext1 **context) { - FIXME("iface %p, flags %#x, context %p stub!\n", iface, flags, context); + struct d3d_device *device = impl_from_ID3D11Device2(iface); + struct d3d11_device_context *object; + HRESULT hr;
- return E_NOTIMPL; + TRACE("iface %p, flags %#x, context %p.\n", iface, flags, context); + + if (FAILED(hr = d3d11_deferred_context_create(device, flags, &object))) + return hr; + + *context = &object->ID3D11DeviceContext1_iface; + return S_OK; }
static HRESULT STDMETHODCALLTYPE d3d11_device_CreateBlendState1(ID3D11Device2 *iface, diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c index f415cbaad45..d799bed25f4 100644 --- a/dlls/d3d11/tests/d3d11.c +++ b/dlls/d3d11/tests/d3d11.c @@ -32410,9 +32410,7 @@ static void test_deferred_context_swap_state(void) ID3D11DeviceContext1_PSSetConstantBuffers(immediate, 0, 1, &green_buffer);
hr = ID3D11Device1_CreateDeferredContext1(device, 0, &deferred); - todo_wine ok(hr == S_OK, "Failed to create deferred context, hr %#x.\n", hr); - if (hr != S_OK) - goto out; + ok(hr == S_OK, "Failed to create deferred context, hr %#x.\n", hr);
feature_level = ID3D11Device1_GetFeatureLevel(device); hr = ID3D11Device1_CreateDeviceContextState(device, 0, &feature_level, 1, D3D11_SDK_VERSION, @@ -32433,7 +32431,6 @@ static void test_deferred_context_swap_state(void) ID3DDeviceContextState_Release(state); ID3D11DeviceContext1_Release(deferred);
-out: ID3D11Buffer_Release(green_buffer); ID3D11DeviceContext1_Release(immediate); ID3D11Device1_Release(device);