wined3d: Explicitly pass gl_info to state_init_default().
This commit is contained in:
parent
abbc595fc1
commit
4a9da034ab
|
@ -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)))
|
if (FAILED(hr = state_init(&device->state, &device->fb, &device->adapter->d3d_info)))
|
||||||
ERR("Failed to initialize device state, hr %#x.\n", hr);
|
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->update_state = &device->state;
|
||||||
|
|
||||||
device_init_swapchain_state(device, swapchain);
|
device_init_swapchain_state(device, swapchain);
|
||||||
|
@ -4982,7 +4982,7 @@ HRESULT device_init(struct wined3d_device *device, struct wined3d *wined3d,
|
||||||
wined3d_decref(device->wined3d);
|
wined3d_decref(device->wined3d);
|
||||||
return hr;
|
return hr;
|
||||||
}
|
}
|
||||||
state_init_default(&device->state, device);
|
state_init_default(&device->state, &adapter->gl_info);
|
||||||
device->update_state = &device->state;
|
device->update_state = &device->state;
|
||||||
|
|
||||||
return WINED3D_OK;
|
return WINED3D_OK;
|
||||||
|
|
|
@ -1171,9 +1171,8 @@ void CDECL wined3d_stateblock_apply(const struct wined3d_stateblock *stateblock)
|
||||||
TRACE("Applied stateblock %p.\n", 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
|
union
|
||||||
{
|
{
|
||||||
struct wined3d_line_pattern lp;
|
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,
|
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 */
|
/* Set some of the defaults for lights, transforms etc */
|
||||||
state->transforms[WINED3D_TS_PROJECTION] = identity;
|
state->transforms[WINED3D_TS_PROJECTION] = identity;
|
||||||
|
|
|
@ -2449,7 +2449,7 @@ void stateblock_init_contained_states(struct wined3d_stateblock *stateblock) DEC
|
||||||
void state_cleanup(struct wined3d_state *state) DECLSPEC_HIDDEN;
|
void state_cleanup(struct wined3d_state *state) DECLSPEC_HIDDEN;
|
||||||
HRESULT state_init(struct wined3d_state *state, struct wined3d_fb_state *fb,
|
HRESULT state_init(struct wined3d_state *state, struct wined3d_fb_state *fb,
|
||||||
const struct wined3d_d3d_info *d3d_info) DECLSPEC_HIDDEN;
|
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;
|
void state_unbind_resources(struct wined3d_state *state) DECLSPEC_HIDDEN;
|
||||||
|
|
||||||
/* Direct3D terminology with little modifications. We do not have an issued state
|
/* Direct3D terminology with little modifications. We do not have an issued state
|
||||||
|
|
Loading…
Reference in New Issue