d3d11: Implement ID3D11Device1::CreateDeferredContext1().

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=41636
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2021-05-27 11:14:30 -05:00 committed by Alexandre Julliard
parent 60027fcc23
commit 9aab4fa8d7
2 changed files with 11 additions and 6 deletions

View File

@ -4078,9 +4078,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,

View File

@ -32397,9 +32397,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,
@ -32420,7 +32418,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);