Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/d3d9/device.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c index 9d05771c5d1..dcdd2a55468 100644 --- a/dlls/d3d9/device.c +++ b/dlls/d3d9/device.c @@ -3414,12 +3414,15 @@ static HRESULT WINAPI d3d9_device_SetVertexShader(IDirect3DDevice9Ex *iface, IDi { struct d3d9_device *device = impl_from_IDirect3DDevice9Ex(iface); struct d3d9_vertexshader *shader_obj = unsafe_impl_from_IDirect3DVertexShader9(shader); + struct wined3d_shader *wined3d_shader = shader_obj ? shader_obj->wined3d_shader : NULL;
TRACE("iface %p, shader %p.\n", iface, shader);
wined3d_mutex_lock(); - wined3d_device_set_vertex_shader(device->wined3d_device, - shader_obj ? shader_obj->wined3d_shader : NULL); + if (device->recording) + wined3d_stateblock_set_vertex_shader(device->recording, wined3d_shader); + else + wined3d_device_set_vertex_shader(device->wined3d_device, wined3d_shader); wined3d_mutex_unlock();
return D3D_OK;