Commit 02195f3c authored by Jan Sikorski's avatar Jan Sikorski Committed by Alexandre Julliard

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

Except wined3d_texture_incref(). Signed-off-by: 's avatarJan Sikorski <jsikorski@codeweavers.com> Signed-off-by: 's avatarHenri Verbeet <hverbeet@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 4a83ccfb
......@@ -72,9 +72,7 @@ static ULONG STDMETHODCALLTYPE d3d11_query_AddRef(ID3D11Query *iface)
if (refcount == 1)
{
ID3D11Device2_AddRef(query->device);
wined3d_mutex_lock();
wined3d_query_incref(query->wined3d_query);
wined3d_mutex_unlock();
}
return refcount;
......
......@@ -69,9 +69,7 @@ static ULONG STDMETHODCALLTYPE d3d11_buffer_AddRef(ID3D11Buffer *iface)
if (refcount == 1)
{
ID3D11Device2_AddRef(buffer->device);
wined3d_mutex_lock();
wined3d_buffer_incref(buffer->wined3d_buffer);
wined3d_mutex_unlock();
}
return refcount;
......
......@@ -138,9 +138,7 @@ static ULONG STDMETHODCALLTYPE d3d11_input_layout_AddRef(ID3D11InputLayout *ifac
if (refcount == 1)
{
ID3D11Device2_AddRef(layout->device);
wined3d_mutex_lock();
wined3d_vertex_declaration_incref(layout->wined3d_decl);
wined3d_mutex_unlock();
}
return refcount;
......
......@@ -69,9 +69,7 @@ static ULONG STDMETHODCALLTYPE d3d11_vertex_shader_AddRef(ID3D11VertexShader *if
if (refcount == 1)
{
ID3D11Device2_AddRef(shader->device);
wined3d_mutex_lock();
wined3d_shader_incref(shader->wined3d_shader);
wined3d_mutex_unlock();
}
return refcount;
......@@ -365,9 +363,7 @@ static ULONG STDMETHODCALLTYPE d3d11_hull_shader_AddRef(ID3D11HullShader *iface)
if (refcount == 1)
{
ID3D11Device2_AddRef(shader->device);
wined3d_mutex_lock();
wined3d_shader_incref(shader->wined3d_shader);
wined3d_mutex_unlock();
}
return refcount;
......@@ -558,9 +554,7 @@ static ULONG STDMETHODCALLTYPE d3d11_domain_shader_AddRef(ID3D11DomainShader *if
if (refcount == 1)
{
ID3D11Device2_AddRef(shader->device);
wined3d_mutex_lock();
wined3d_shader_incref(shader->wined3d_shader);
wined3d_mutex_unlock();
}
return refcount;
......@@ -761,9 +755,7 @@ static ULONG STDMETHODCALLTYPE d3d11_geometry_shader_AddRef(ID3D11GeometryShader
if (refcount == 1)
{
ID3D11Device2_AddRef(shader->device);
wined3d_mutex_lock();
wined3d_shader_incref(shader->wined3d_shader);
wined3d_mutex_unlock();
}
return refcount;
......@@ -1265,9 +1257,7 @@ static ULONG STDMETHODCALLTYPE d3d11_pixel_shader_AddRef(ID3D11PixelShader *ifac
if (refcount == 1)
{
ID3D11Device2_AddRef(shader->device);
wined3d_mutex_lock();
wined3d_shader_incref(shader->wined3d_shader);
wined3d_mutex_unlock();
}
return refcount;
......@@ -1560,9 +1550,7 @@ static ULONG STDMETHODCALLTYPE d3d11_compute_shader_AddRef(ID3D11ComputeShader *
if (refcount == 1)
{
ID3D11Device2_AddRef(shader->device);
wined3d_mutex_lock();
wined3d_shader_incref(shader->wined3d_shader);
wined3d_mutex_unlock();
}
return refcount;
......
......@@ -64,9 +64,7 @@ static ULONG STDMETHODCALLTYPE d3d11_blend_state_AddRef(ID3D11BlendState *iface)
if (refcount == 1)
{
ID3D11Device2_AddRef(state->device);
wined3d_mutex_lock();
wined3d_blend_state_incref(state->wined3d_state);
wined3d_mutex_unlock();
}
return refcount;
......@@ -496,9 +494,7 @@ static ULONG STDMETHODCALLTYPE d3d11_depthstencil_state_AddRef(ID3D11DepthStenci
if (refcount == 1)
{
ID3D11Device2_AddRef(state->device);
wined3d_mutex_lock();
wined3d_depth_stencil_state_incref(state->wined3d_state);
wined3d_mutex_unlock();
}
return refcount;
......@@ -896,9 +892,7 @@ static ULONG STDMETHODCALLTYPE d3d11_rasterizer_state_AddRef(ID3D11RasterizerSta
if (refcount == 1)
{
ID3D11Device2_AddRef(state->device);
wined3d_mutex_lock();
wined3d_rasterizer_state_incref(state->wined3d_state);
wined3d_mutex_unlock();
}
return refcount;
......@@ -1284,9 +1278,7 @@ static ULONG STDMETHODCALLTYPE d3d11_sampler_state_AddRef(ID3D11SamplerState *if
if (refcount == 1)
{
ID3D11Device2_AddRef(state->device);
wined3d_mutex_lock();
wined3d_sampler_incref(state->wined3d_sampler);
wined3d_mutex_unlock();
}
return refcount;
......
......@@ -963,9 +963,7 @@ static ULONG STDMETHODCALLTYPE d3d11_depthstencil_view_AddRef(ID3D11DepthStencil
if (refcount == 1)
{
ID3D11Device2_AddRef(view->device);
wined3d_mutex_lock();
wined3d_rendertarget_view_incref(view->wined3d_view);
wined3d_mutex_unlock();
}
return refcount;
......@@ -1407,9 +1405,7 @@ static ULONG STDMETHODCALLTYPE d3d11_rendertarget_view_AddRef(ID3D11RenderTarget
if (refcount == 1)
{
ID3D11Device2_AddRef(view->device);
wined3d_mutex_lock();
wined3d_rendertarget_view_incref(view->wined3d_view);
wined3d_mutex_unlock();
}
return refcount;
......@@ -1855,9 +1851,7 @@ static ULONG STDMETHODCALLTYPE d3d11_shader_resource_view_AddRef(ID3D11ShaderRes
if (refcount == 1)
{
ID3D11Device2_AddRef(view->device);
wined3d_mutex_lock();
wined3d_shader_resource_view_incref(view->wined3d_view);
wined3d_mutex_unlock();
}
return refcount;
......@@ -2340,9 +2334,7 @@ static ULONG STDMETHODCALLTYPE d3d11_unordered_access_view_AddRef(ID3D11Unordere
if (refcount == 1)
{
ID3D11Device2_AddRef(view->device);
wined3d_mutex_lock();
wined3d_unordered_access_view_incref(view->wined3d_view);
wined3d_mutex_unlock();
}
return refcount;
......
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