wined3d: Also unbind stream outputs and the geometry shader in stateblock_unbind_resources().

This commit is contained in:
Henri Verbeet 2012-11-28 22:11:47 +01:00 committed by Alexandre Julliard
parent 8c94757c2b
commit 5d9d20ee0e
1 changed files with 15 additions and 0 deletions

View File

@ -491,6 +491,15 @@ void stateblock_unbind_resources(struct wined3d_stateblock *stateblock)
}
}
for (i = 0; i < MAX_STREAM_OUT; ++i)
{
if ((buffer = state->stream_output[i].buffer))
{
state->stream_output[i].buffer = NULL;
wined3d_buffer_decref(buffer);
}
}
for (i = 0; i < MAX_STREAMS; ++i)
{
if ((buffer = state->streams[i].buffer))
@ -512,6 +521,12 @@ void stateblock_unbind_resources(struct wined3d_stateblock *stateblock)
wined3d_shader_decref(shader);
}
if ((shader = state->geometry_shader))
{
state->geometry_shader = NULL;
wined3d_shader_decref(shader);
}
if ((shader = state->pixel_shader))
{
state->pixel_shader = NULL;