Commit 3d5f8b98 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

d3d10/effect: Reduce duplication when releasing shader objects.

parent 166babb2
......@@ -87,6 +87,7 @@ struct d3d10_effect_shader_variable
ID3D10VertexShader *vs;
ID3D10PixelShader *ps;
ID3D10GeometryShader *gs;
IUnknown *object;
} shader;
unsigned int resource_count;
......
......@@ -2983,18 +2983,10 @@ static void d3d10_effect_shader_variable_destroy(struct d3d10_effect_shader_vari
switch (type)
{
case D3D10_SVT_VERTEXSHADER:
if (s->shader.vs)
ID3D10VertexShader_Release(s->shader.vs);
break;
case D3D10_SVT_PIXELSHADER:
if (s->shader.ps)
ID3D10PixelShader_Release(s->shader.ps);
break;
case D3D10_SVT_GEOMETRYSHADER:
if (s->shader.gs)
ID3D10GeometryShader_Release(s->shader.gs);
if (s->shader.object)
IUnknown_Release(s->shader.object);
break;
default:
......
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