Commit bde070fc authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

d3d11: Make SwapDeviceContextState truly no-op when state is NULL.

parent edbddef5
......@@ -2761,6 +2761,9 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_SwapDeviceContextState(ID3
FIXME("iface %p, state %p, prev_state %p semi-stub!\n", iface, state, prev_state);
if (prev_state) *prev_state = NULL;
if (!state) return;
wined3d_mutex_lock();
if (prev_state)
{
......
......@@ -7078,8 +7078,7 @@ static void test_device_context_state(void)
previous_context_state = (ID3DDeviceContextState *)0xdeadbeef;
ID3D11DeviceContext1_SwapDeviceContextState(context, NULL, &previous_context_state);
todo_wine ok(previous_context_state == NULL, "Got unexpected state pointer.\n");
if (previous_context_state) ID3DDeviceContextState_Release(previous_context_state);
ok(previous_context_state == NULL, "Got unexpected state pointer.\n");
previous_context_state = NULL;
ID3D11DeviceContext1_SwapDeviceContextState(context, context_state, &previous_context_state);
ok(previous_context_state != NULL, "Failed to get previous context state\n");
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment