From 4e755d263f65b571e34c851c803b0216ed886af9 Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Mon, 26 Aug 2013 09:23:38 +0200 Subject: [PATCH] wined3d: Make stateblock_unbind_resources() work with a wined3d_state structure instead. --- 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 b0becf871cf..a0db7c716f5 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 e6a867adc3b..3685a2ef670 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 a586f918af7..e0ceb7eefd5 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