[PATCH 1/2] wined3d: Get rid of the "update_state" field from struct wined3d_device.
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> --- dlls/wined3d/device.c | 16 ++++++---------- dlls/wined3d/wined3d_private.h | 1 - 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 6831c63d3e..d9d6cf2676 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -2055,13 +2055,13 @@ void CDECL wined3d_device_set_rasterizer_state(struct wined3d_device *device, TRACE("device %p, rasterizer_state %p.\n", device, rasterizer_state); - prev = device->update_state->rasterizer_state; + prev = device->state.rasterizer_state; if (prev == rasterizer_state) return; if (rasterizer_state) wined3d_rasterizer_state_incref(rasterizer_state); - device->update_state->rasterizer_state = rasterizer_state; + device->state.rasterizer_state = rasterizer_state; wined3d_cs_emit_set_rasterizer_state(device->cs, rasterizer_state); if (prev) wined3d_rasterizer_state_decref(prev); @@ -2802,12 +2802,12 @@ void CDECL wined3d_device_set_hull_shader(struct wined3d_device *device, struct TRACE("device %p, shader %p.\n", device, shader); - prev = device->update_state->shader[WINED3D_SHADER_TYPE_HULL]; + prev = device->state.shader[WINED3D_SHADER_TYPE_HULL]; if (shader == prev) return; if (shader) wined3d_shader_incref(shader); - device->update_state->shader[WINED3D_SHADER_TYPE_HULL] = shader; + device->state.shader[WINED3D_SHADER_TYPE_HULL] = shader; wined3d_cs_emit_set_shader(device->cs, WINED3D_SHADER_TYPE_HULL, shader); if (prev) wined3d_shader_decref(prev); @@ -2857,12 +2857,12 @@ void CDECL wined3d_device_set_domain_shader(struct wined3d_device *device, struc TRACE("device %p, shader %p.\n", device, shader); - prev = device->update_state->shader[WINED3D_SHADER_TYPE_DOMAIN]; + prev = device->state.shader[WINED3D_SHADER_TYPE_DOMAIN]; if (shader == prev) return; if (shader) wined3d_shader_incref(shader); - device->update_state->shader[WINED3D_SHADER_TYPE_DOMAIN] = shader; + device->state.shader[WINED3D_SHADER_TYPE_DOMAIN] = shader; wined3d_cs_emit_set_shader(device->cs, WINED3D_SHADER_TYPE_DOMAIN, shader); if (prev) wined3d_shader_decref(prev); @@ -3636,7 +3636,6 @@ HRESULT CDECL wined3d_device_begin_stateblock(struct wined3d_device *device) return hr; device->recording = stateblock; - device->update_state = &stateblock->state; device->update_stateblock_state = &stateblock->stateblock_state; TRACE("Recording stateblock %p.\n", stateblock); @@ -3662,7 +3661,6 @@ HRESULT CDECL wined3d_device_end_stateblock(struct wined3d_device *device, *stateblock = object; device->recording = NULL; - device->update_state = &device->state; device->update_stateblock_state = &device->stateblock_state; TRACE("Returning stateblock %p.\n", *stateblock); @@ -5094,7 +5092,6 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device, memset(&device->state, 0, sizeof(device->state)); state_init(&device->state, &device->fb, &device->adapter->d3d_info, WINED3D_STATE_INIT_DEFAULT); - device->update_state = &device->state; memset(&device->stateblock_state, 0, sizeof(device->stateblock_state)); wined3d_stateblock_state_init(&device->stateblock_state, device, WINED3D_STATE_INIT_DEFAULT); device->update_stateblock_state = &device->stateblock_state; @@ -5371,7 +5368,6 @@ HRESULT device_init(struct wined3d_device *device, struct wined3d *wined3d, } state_init(&device->state, &device->fb, &adapter->d3d_info, WINED3D_STATE_INIT_DEFAULT); - device->update_state = &device->state; wined3d_stateblock_state_init(&device->stateblock_state, device, WINED3D_STATE_INIT_DEFAULT); device->update_stateblock_state = &device->stateblock_state; diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index eaca69b305..fbde36c923 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -3047,7 +3047,6 @@ struct wined3d_device enum wined3d_feature_level feature_level; struct wined3d_state state; - struct wined3d_state *update_state; struct wined3d_stateblock *recording; struct wined3d_stateblock_state stateblock_state; struct wined3d_stateblock_state *update_stateblock_state; -- 2.20.1
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> --- dlls/wined3d/stateblock.c | 2 -- dlls/wined3d/wined3d_private.h | 1 - 2 files changed, 3 deletions(-) diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c index cd57e6cc9a..cd72209391 100644 --- a/dlls/wined3d/stateblock.c +++ b/dlls/wined3d/stateblock.c @@ -604,7 +604,6 @@ ULONG CDECL wined3d_stateblock_decref(struct wined3d_stateblock *stateblock) if (!refcount) { - state_cleanup(&stateblock->state); wined3d_stateblock_state_cleanup(&stateblock->stateblock_state); heap_free(stateblock); } @@ -1557,7 +1556,6 @@ static HRESULT stateblock_init(struct wined3d_stateblock *stateblock, stateblock->ref = 1; stateblock->device = device; - state_init(&stateblock->state, NULL, d3d_info, 0); wined3d_stateblock_state_init(&stateblock->stateblock_state, device, 0); if (type == WINED3D_SBT_RECORDED) diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index fbde36c923..57df9f1eb2 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -3604,7 +3604,6 @@ struct wined3d_stateblock /* Array indicating whether things have been set or changed */ struct wined3d_saved_states changed; - struct wined3d_state state; struct wined3d_stateblock_state stateblock_state; /* Contained state management */ -- 2.20.1
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
participants (2)
-
Henri Verbeet -
Zebediah Figura