[PATCH 2/5] wined3d: Make stateblock_unbind_resources() work with a wined3d_state structure instead.

Henri Verbeet hverbeet at codeweavers.com
Mon Aug 26 02:23:38 CDT 2013


---
 dlls/wined3d/device.c          | 4 ++--
 dlls/wined3d/stateblock.c      | 5 ++---
 dlls/wined3d/wined3d_private.h | 3 ++-
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index b0becf8..a0db7c7 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -1285,7 +1285,7 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
     if (device->logo_surface)
         wined3d_surface_decref(device->logo_surface);
 
-    stateblock_unbind_resources(device->stateBlock);
+    state_unbind_resources(&device->stateBlock->state);
 
     /* Unload resources */
     LIST_FOR_EACH_ENTRY_SAFE(resource, cursor, &device->resources, struct wined3d_resource, resource_list_entry)
@@ -4917,7 +4917,7 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
     }
 
     if (reset_state)
-        stateblock_unbind_resources(device->stateBlock);
+        state_unbind_resources(&device->stateBlock->state);
 
     if (device->fb.render_targets)
     {
diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c
index e6a867a..3685a2e 100644
--- a/dlls/wined3d/stateblock.c
+++ b/dlls/wined3d/stateblock.c
@@ -467,9 +467,8 @@ ULONG CDECL wined3d_stateblock_incref(struct wined3d_stateblock *stateblock)
     return refcount;
 }
 
-void stateblock_unbind_resources(struct wined3d_stateblock *stateblock)
+void state_unbind_resources(struct wined3d_state *state)
 {
-    struct wined3d_state *state = &stateblock->state;
     struct wined3d_vertex_declaration *decl;
     struct wined3d_sampler *sampler;
     struct wined3d_texture *texture;
@@ -599,7 +598,7 @@ ULONG CDECL wined3d_stateblock_decref(struct wined3d_stateblock *stateblock)
     {
         int counter;
 
-        stateblock_unbind_resources(stateblock);
+        state_unbind_resources(&stateblock->state);
 
         for (counter = 0; counter < LIGHTMAP_SIZE; ++counter)
         {
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index a586f91..e0ceb7e 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2446,7 +2446,8 @@ struct wined3d_stateblock
 
 void stateblock_init_contained_states(struct wined3d_stateblock *stateblock) DECLSPEC_HIDDEN;
 void stateblock_init_default_state(struct wined3d_stateblock *stateblock) DECLSPEC_HIDDEN;
-void stateblock_unbind_resources(struct wined3d_stateblock *stateblock) DECLSPEC_HIDDEN;
+
+void state_unbind_resources(struct wined3d_state *state) DECLSPEC_HIDDEN;
 
 /* Direct3D terminology with little modifications. We do not have an issued state
  * because only the driver knows about it, but we have a created state because d3d
-- 
1.8.1.5




More information about the wine-patches mailing list