wined3d: Explicitly pass gl_info to state_init_default().

This commit is contained in:
Henri Verbeet 2013-09-26 09:31:55 +02:00 committed by Alexandre Julliard
parent abbc595fc1
commit 4a9da034ab
3 changed files with 5 additions and 6 deletions

View File

@ -4710,7 +4710,7 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
if (FAILED(hr = state_init(&device->state, &device->fb, &device->adapter->d3d_info)))
ERR("Failed to initialize device state, hr %#x.\n", hr);
state_init_default(&device->state, device);
state_init_default(&device->state, &device->adapter->gl_info);
device->update_state = &device->state;
device_init_swapchain_state(device, swapchain);
@ -4982,7 +4982,7 @@ HRESULT device_init(struct wined3d_device *device, struct wined3d *wined3d,
wined3d_decref(device->wined3d);
return hr;
}
state_init_default(&device->state, device);
state_init_default(&device->state, &adapter->gl_info);
device->update_state = &device->state;
return WINED3D_OK;

View File

@ -1171,9 +1171,8 @@ void CDECL wined3d_stateblock_apply(const struct wined3d_stateblock *stateblock)
TRACE("Applied stateblock %p.\n", stateblock);
}
void state_init_default(struct wined3d_state *state, struct wined3d_device *device)
void state_init_default(struct wined3d_state *state, const struct wined3d_gl_info *gl_info)
{
const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
union
{
struct wined3d_line_pattern lp;
@ -1192,7 +1191,7 @@ void state_init_default(struct wined3d_state *state, struct wined3d_device *devi
0.0f, 0.0f, 0.0f, 1.0f,
}}};
TRACE("state %p, device %p.\n", state, device);
TRACE("state %p, gl_info %p.\n", state, gl_info);
/* Set some of the defaults for lights, transforms etc */
state->transforms[WINED3D_TS_PROJECTION] = identity;

View File

@ -2449,7 +2449,7 @@ void stateblock_init_contained_states(struct wined3d_stateblock *stateblock) DEC
void state_cleanup(struct wined3d_state *state) DECLSPEC_HIDDEN;
HRESULT state_init(struct wined3d_state *state, struct wined3d_fb_state *fb,
const struct wined3d_d3d_info *d3d_info) DECLSPEC_HIDDEN;
void state_init_default(struct wined3d_state *state, struct wined3d_device *device) DECLSPEC_HIDDEN;
void state_init_default(struct wined3d_state *state, const struct wined3d_gl_info *gl_info) DECLSPEC_HIDDEN;
void state_unbind_resources(struct wined3d_state *state) DECLSPEC_HIDDEN;
/* Direct3D terminology with little modifications. We do not have an issued state