d3d11: Make SwapDeviceContextState truly no-op when state is NULL.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
edbddef57e
commit
bde070fcf4
|
@ -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");
|
||||
|
|
Loading…
Reference in New Issue