Henri Verbeet : wined3d: Make stateblock_init_default_state() work with a wined3d_state structure instead.
Module: wine Branch: master Commit: fc5f9d4709d6fbcc86f4828554800d3fb721b32c URL: http://source.winehq.org/git/wine.git/?a=commit;h=fc5f9d4709d6fbcc86f4828554... Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Tue Aug 27 08:44:58 2013 +0200 wined3d: Make stateblock_init_default_state() work with a wined3d_state structure instead. --- dlls/wined3d/device.c | 4 ++-- dlls/wined3d/stateblock.c | 6 ++---- dlls/wined3d/wined3d_private.h | 2 +- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 18dcae4..8a2557b 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -1169,7 +1169,7 @@ HRESULT CDECL wined3d_device_init_3d(struct wined3d_device *device, /* Set up some starting GL setup */ /* Setup all the devices defaults */ - stateblock_init_default_state(device->stateBlock); + state_init_default(&device->stateBlock->state, device); context = context_acquire(device, swapchain->front_buffer); @@ -5216,7 +5216,7 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device, TRACE("Created stateblock %p.\n", device->stateBlock); device->update_state = &device->stateBlock->state; - stateblock_init_default_state(device->stateBlock); + state_init_default(&device->stateBlock->state, device); } else { diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c index 1621ba7..c7b68ea 100644 --- a/dlls/wined3d/stateblock.c +++ b/dlls/wined3d/stateblock.c @@ -1168,11 +1168,9 @@ void CDECL wined3d_stateblock_apply(const struct wined3d_stateblock *stateblock) TRACE("Applied stateblock %p.\n", stateblock); } -void stateblock_init_default_state(struct wined3d_stateblock *stateblock) +void state_init_default(struct wined3d_state *state, struct wined3d_device *device) { - struct wined3d_device *device = stateblock->device; const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; - struct wined3d_state *state = &stateblock->state; union { struct wined3d_line_pattern lp; @@ -1193,7 +1191,7 @@ void stateblock_init_default_state(struct wined3d_stateblock *stateblock) 0.0f, 0.0f, 0.0f, 1.0f, }}}; - TRACE("stateblock %p.\n", stateblock); + TRACE("state %p, device %p.\n", state, device); /* Set some of the defaults for lights, transforms etc */ state->transforms[WINED3D_TS_PROJECTION] = identity; diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 2e113ef..89a4be7 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -2453,8 +2453,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 state_init_default(struct wined3d_state *state, struct wined3d_device *device) DECLSPEC_HIDDEN; void state_unbind_resources(struct wined3d_state *state) DECLSPEC_HIDDEN; /* Direct3D terminology with little modifications. We do not have an issued state
participants (1)
-
Alexandre Julliard