From d028e44d73dc1c5fe1553675a15e4845d6696511 Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Mon, 11 Nov 2019 19:55:59 -0600 Subject: [PATCH] d3d9: Handle stateblocks in d3d9_device_SetStreamSource(). Signed-off-by: Zebediah Figura Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- dlls/d3d9/device.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c index 52a62edecb1..a0653d2a421 100644 --- a/dlls/d3d9/device.c +++ b/dlls/d3d9/device.c @@ -3630,13 +3630,17 @@ static HRESULT WINAPI d3d9_device_SetStreamSource(IDirect3DDevice9Ex *iface, else wined3d_buffer = buffer_impl->wined3d_buffer; - hr = wined3d_device_set_stream_source(device->wined3d_device, stream_idx, wined3d_buffer, offset, stride); + hr = wined3d_stateblock_set_stream_source(device->update_state, stream_idx, wined3d_buffer, offset, stride); if (SUCCEEDED(hr) && !device->recording) { - if (buffer_impl && buffer_impl->draw_buffer) - device->sysmem_vb |= (1u << stream_idx); - else - device->sysmem_vb &= ~(1u << stream_idx); + hr = wined3d_device_set_stream_source(device->wined3d_device, stream_idx, wined3d_buffer, offset, stride); + if (SUCCEEDED(hr)) + { + if (buffer_impl && buffer_impl->draw_buffer) + device->sysmem_vb |= (1u << stream_idx); + else + device->sysmem_vb &= ~(1u << stream_idx); + } } wined3d_mutex_unlock();