Henri Verbeet : wined3d: Unbind shader resource views in state_unbind_resources().
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Dec 1 14:53:05 CST 2014
Module: wine
Branch: master
Commit: 08b06b7d8f7396937c3d278219ce3b6cefa0476a
URL: http://source.winehq.org/git/wine.git/?a=commit;h=08b06b7d8f7396937c3d278219ce3b6cefa0476a
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Mon Dec 1 08:45:42 2014 +0100
wined3d: Unbind shader resource views in state_unbind_resources().
---
dlls/wined3d/stateblock.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c
index 7e8c782..dc146fc 100644
--- a/dlls/wined3d/stateblock.c
+++ b/dlls/wined3d/stateblock.c
@@ -458,6 +458,7 @@ ULONG CDECL wined3d_stateblock_incref(struct wined3d_stateblock *stateblock)
void state_unbind_resources(struct wined3d_state *state)
{
+ struct wined3d_shader_resource_view *srv;
struct wined3d_vertex_declaration *decl;
struct wined3d_sampler *sampler;
struct wined3d_texture *texture;
@@ -529,6 +530,15 @@ void state_unbind_resources(struct wined3d_state *state)
wined3d_sampler_decref(sampler);
}
}
+
+ for (j = 0; j < MAX_SHADER_RESOURCE_VIEWS; ++j)
+ {
+ if ((srv = state->shader_resource_view[i][j]))
+ {
+ state->shader_resource_view[i][j] = NULL;
+ wined3d_shader_resource_view_decref(srv);
+ }
+ }
}
}
More information about the wine-cvs
mailing list