From 8d84579540f997b4b2e74353ac46e4655f788641 Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Tue, 1 Oct 2019 20:03:49 -0500 Subject: [PATCH] d3d9: Handle stateblocks in d3d9_device_SetPixelShader(). Signed-off-by: Zebediah Figura Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- dlls/d3d9/device.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c index 26b1b982f8d..90882f0f924 100644 --- a/dlls/d3d9/device.c +++ b/dlls/d3d9/device.c @@ -3768,8 +3768,11 @@ static HRESULT WINAPI d3d9_device_SetPixelShader(IDirect3DDevice9Ex *iface, IDir TRACE("iface %p, shader %p.\n", iface, shader); wined3d_mutex_lock(); - wined3d_device_set_pixel_shader(device->wined3d_device, + wined3d_stateblock_set_pixel_shader(device->update_state, shader_obj ? shader_obj->wined3d_shader : NULL); + if (!device->recording) + wined3d_device_set_pixel_shader(device->wined3d_device, + shader_obj ? shader_obj->wined3d_shader : NULL); wined3d_mutex_unlock(); return D3D_OK;