d3d11: Don't grab wined3d lock for wined3d deferred context functions.

Signed-off-by: Jan Sikorski <jsikorski@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jan Sikorski 2021-10-15 14:26:18 +02:00 committed by Alexandre Julliard
parent 9457c8d172
commit 713d6558db
1 changed files with 0 additions and 7 deletions

View File

@ -2704,8 +2704,6 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_context_FinishCommandList(ID3D11De
if (!(object = heap_alloc_zero(sizeof(*object))))
return E_OUTOFMEMORY;
wined3d_mutex_lock();
if (FAILED(hr = wined3d_deferred_context_record_command_list(context->wined3d_context,
!!restore, &object->wined3d_list)))
{
@ -2714,8 +2712,6 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_context_FinishCommandList(ID3D11De
return hr;
}
wined3d_mutex_unlock();
object->ID3D11CommandList_iface.lpVtbl = &d3d11_command_list_vtbl;
object->refcount = 1;
object->device = &context->device->ID3D11Device2_iface;
@ -3687,15 +3683,12 @@ static HRESULT d3d11_deferred_context_create(struct d3d_device *device,
return E_OUTOFMEMORY;
d3d11_device_context_init(object, device, D3D11_DEVICE_CONTEXT_DEFERRED);
wined3d_mutex_lock();
if (FAILED(hr = wined3d_deferred_context_create(device->wined3d_device, &object->wined3d_context)))
{
WARN("Failed to create wined3d deferred context, hr %#x.\n", hr);
heap_free(object);
wined3d_mutex_unlock();
return hr;
}
wined3d_mutex_unlock();
TRACE("Created deferred context %p.\n", object);
*context = object;