d3d11: Don't grab wined3d lock for reference decrementing functions.

Except wined3d_texture_decref().

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:02 +02:00 committed by Alexandre Julliard
parent 8316618912
commit a519188f63
7 changed files with 0 additions and 65 deletions

View file

@ -88,11 +88,7 @@ static ULONG STDMETHODCALLTYPE d3d11_query_Release(ID3D11Query *iface)
if (!refcount)
{
ID3D11Device2 *device = query->device;
wined3d_mutex_lock();
wined3d_query_decref(query->wined3d_query);
wined3d_mutex_unlock();
ID3D11Device2_Release(device);
}

View file

@ -86,9 +86,7 @@ static ULONG STDMETHODCALLTYPE d3d11_buffer_Release(ID3D11Buffer *iface)
{
ID3D11Device2 *device = buffer->device;
wined3d_mutex_lock();
wined3d_buffer_decref(buffer->wined3d_buffer);
wined3d_mutex_unlock();
/* Release the device last, it may cause the wined3d device to be
* destroyed. */
ID3D11Device2_Release(device);

View file

@ -375,9 +375,7 @@ static ULONG STDMETHODCALLTYPE d3d11_command_list_Release(ID3D11CommandList *ifa
if (!refcount)
{
wined3d_mutex_lock();
wined3d_command_list_decref(list->wined3d_list);
wined3d_mutex_unlock();
wined3d_private_store_cleanup(&list->private_store);
ID3D11Device2_Release(list->device);
heap_free(list);
@ -4541,9 +4539,7 @@ static ULONG STDMETHODCALLTYPE d3d_device_inner_Release(IUnknown *iface)
d3d11_device_context_cleanup(&device->immediate_context);
if (device->wined3d_device)
{
wined3d_mutex_lock();
wined3d_device_decref(device->wined3d_device);
wined3d_mutex_unlock();
}
wine_rb_destroy(&device->sampler_states, NULL, NULL);
wine_rb_destroy(&device->rasterizer_states, NULL, NULL);

View file

@ -154,11 +154,7 @@ static ULONG STDMETHODCALLTYPE d3d11_input_layout_Release(ID3D11InputLayout *ifa
if (!refcount)
{
ID3D11Device2 *device = layout->device;
wined3d_mutex_lock();
wined3d_vertex_declaration_decref(layout->wined3d_decl);
wined3d_mutex_unlock();
ID3D11Device2_Release(device);
}

View file

@ -86,9 +86,7 @@ static ULONG STDMETHODCALLTYPE d3d11_vertex_shader_Release(ID3D11VertexShader *i
{
ID3D11Device2 *device = shader->device;
wined3d_mutex_lock();
wined3d_shader_decref(shader->wined3d_shader);
wined3d_mutex_unlock();
/* Release the device last, it may cause the wined3d device to be
* destroyed. */
ID3D11Device2_Release(device);
@ -379,11 +377,7 @@ static ULONG STDMETHODCALLTYPE d3d11_hull_shader_Release(ID3D11HullShader *iface
if (!refcount)
{
ID3D11Device2 *device = shader->device;
wined3d_mutex_lock();
wined3d_shader_decref(shader->wined3d_shader);
wined3d_mutex_unlock();
/* Release the device last, it may cause the wined3d device to be
* destroyed. */
ID3D11Device2_Release(device);
@ -570,11 +564,7 @@ static ULONG STDMETHODCALLTYPE d3d11_domain_shader_Release(ID3D11DomainShader *i
if (!refcount)
{
ID3D11Device2 *device = shader->device;
wined3d_mutex_lock();
wined3d_shader_decref(shader->wined3d_shader);
wined3d_mutex_unlock();
/* Release the device last, it may cause the wined3d device to be
* destroyed. */
ID3D11Device2_Release(device);
@ -771,11 +761,7 @@ static ULONG STDMETHODCALLTYPE d3d11_geometry_shader_Release(ID3D11GeometryShade
if (!refcount)
{
ID3D11Device2 *device = shader->device;
wined3d_mutex_lock();
wined3d_shader_decref(shader->wined3d_shader);
wined3d_mutex_unlock();
/* Release the device last, it may cause the wined3d device to be
* destroyed. */
ID3D11Device2_Release(device);
@ -1273,10 +1259,7 @@ static ULONG STDMETHODCALLTYPE d3d11_pixel_shader_Release(ID3D11PixelShader *ifa
if (!refcount)
{
ID3D11Device2 *device = shader->device;
wined3d_mutex_lock();
wined3d_shader_decref(shader->wined3d_shader);
wined3d_mutex_unlock();
/* Release the device last, it may cause the wined3d device to be
* destroyed. */
ID3D11Device2_Release(device);
@ -1566,11 +1549,7 @@ static ULONG STDMETHODCALLTYPE d3d11_compute_shader_Release(ID3D11ComputeShader
if (!refcount)
{
ID3D11Device2 *device = shader->device;
wined3d_mutex_lock();
wined3d_shader_decref(shader->wined3d_shader);
wined3d_mutex_unlock();
/* Release the device last, it may cause the wined3d device to be
* destroyed. */
ID3D11Device2_Release(device);

View file

@ -80,11 +80,7 @@ static ULONG STDMETHODCALLTYPE d3d11_blend_state_Release(ID3D11BlendState *iface
if (!refcount)
{
ID3D11Device2 *device = state->device;
wined3d_mutex_lock();
wined3d_blend_state_decref(state->wined3d_state);
wined3d_mutex_unlock();
ID3D11Device2_Release(device);
}
@ -511,9 +507,7 @@ static ULONG STDMETHODCALLTYPE d3d11_depthstencil_state_Release(ID3D11DepthStenc
{
ID3D11Device2 *device = state->device;
wined3d_mutex_lock();
wined3d_depth_stencil_state_decref(state->wined3d_state);
wined3d_mutex_unlock();
ID3D11Device2_Release(device);
}
@ -908,11 +902,7 @@ static ULONG STDMETHODCALLTYPE d3d11_rasterizer_state_Release(ID3D11RasterizerSt
if (!refcount)
{
ID3D11Device2 *device = state->device;
wined3d_mutex_lock();
wined3d_rasterizer_state_decref(state->wined3d_state);
wined3d_mutex_unlock();
ID3D11Device2_Release(device);
}
@ -1294,11 +1284,7 @@ static ULONG STDMETHODCALLTYPE d3d11_sampler_state_Release(ID3D11SamplerState *i
if (!refcount)
{
ID3D11Device2 *device = state->device;
wined3d_mutex_lock();
wined3d_sampler_decref(state->wined3d_sampler);
wined3d_mutex_unlock();
ID3D11Device2_Release(device);
}

View file

@ -979,11 +979,7 @@ static ULONG STDMETHODCALLTYPE d3d11_depthstencil_view_Release(ID3D11DepthStenci
if (!refcount)
{
ID3D11Device2 *device = view->device;
wined3d_mutex_lock();
wined3d_rendertarget_view_decref(view->wined3d_view);
wined3d_mutex_unlock();
ID3D11Device2_Release(device);
}
@ -1421,11 +1417,7 @@ static ULONG STDMETHODCALLTYPE d3d11_rendertarget_view_Release(ID3D11RenderTarge
if (!refcount)
{
ID3D11Device2 *device = view->device;
wined3d_mutex_lock();
wined3d_rendertarget_view_decref(view->wined3d_view);
wined3d_mutex_unlock();
ID3D11Device2_Release(device);
}
@ -1867,11 +1859,7 @@ static ULONG STDMETHODCALLTYPE d3d11_shader_resource_view_Release(ID3D11ShaderRe
if (!refcount)
{
ID3D11Device2 *device = view->device;
wined3d_mutex_lock();
wined3d_shader_resource_view_decref(view->wined3d_view);
wined3d_mutex_unlock();
ID3D11Device2_Release(device);
}
@ -2350,11 +2338,7 @@ static ULONG STDMETHODCALLTYPE d3d11_unordered_access_view_Release(ID3D11Unorder
if (!refcount)
{
ID3D11Device2 *device = view->device;
wined3d_mutex_lock();
wined3d_unordered_access_view_decref(view->wined3d_view);
wined3d_mutex_unlock();
ID3D11Device2_Release(device);
}