From: Zebediah Figura Subject: [PATCH 5/5] d3d8: Handle stateblocks in d3d8_device_SetTextureStageState(). Message-Id: <20191019172400.9355-5-z.figura12@gmail.com> Date: Sat, 19 Oct 2019 12:24:00 -0500 In-Reply-To: <20191019172400.9355-1-z.figura12@gmail.com> References: <20191019172400.9355-1-z.figura12@gmail.com> Signed-off-by: Zebediah Figura --- dlls/d3d8/device.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c index cc1409d5c1..53e92707ca 100644 --- a/dlls/d3d8/device.c +++ b/dlls/d3d8/device.c @@ -2226,9 +2226,17 @@ static HRESULT WINAPI d3d8_device_SetTextureStageState(IDirect3DDevice8 *iface, wined3d_mutex_lock(); if (l->sampler_state) - wined3d_device_set_sampler_state(device->wined3d_device, stage, l->u.sampler_state, value); + { + wined3d_stateblock_set_sampler_state(device->update_state, stage, l->u.sampler_state, value); + if (!device->recording) + wined3d_device_set_sampler_state(device->wined3d_device, stage, l->u.sampler_state, value); + } else - wined3d_device_set_texture_stage_state(device->wined3d_device, stage, l->u.texture_state, value); + { + wined3d_stateblock_set_texture_stage_state(device->update_state, stage, l->u.texture_state, value); + if (!device->recording) + wined3d_device_set_texture_stage_state(device->wined3d_device, stage, l->u.texture_state, value); + } wined3d_mutex_unlock(); return D3D_OK; -- 2.20.1