Zebediah Figura : d3d9: Handle stateblocks in d3d9_device_SetPixelShaderConstantB().

Alexandre Julliard julliard at winehq.org
Thu Oct 3 16:44:00 CDT 2019


Module: wine
Branch: master
Commit: 22969d43f85c84f47bac3c644e0cd2db876b9e1d
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=22969d43f85c84f47bac3c644e0cd2db876b9e1d

Author: Zebediah Figura <z.figura12 at gmail.com>
Date:   Wed Oct  2 19:39:59 2019 -0500

d3d9: Handle stateblocks in d3d9_device_SetPixelShaderConstantB().

Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/d3d9/device.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c
index daa0b1b502..ee5de2f06f 100644
--- a/dlls/d3d9/device.c
+++ b/dlls/d3d9/device.c
@@ -3885,7 +3885,9 @@ static HRESULT WINAPI d3d9_device_SetPixelShaderConstantB(IDirect3DDevice9Ex *if
     TRACE("iface %p, reg_idx %u, data %p, count %u.\n", iface, reg_idx, data, count);
 
     wined3d_mutex_lock();
-    hr = wined3d_device_set_ps_consts_b(device->wined3d_device, reg_idx, count, data);
+    hr = wined3d_stateblock_set_ps_consts_b(device->update_state, reg_idx, count, data);
+    if (SUCCEEDED(hr) && !device->recording)
+        hr = wined3d_device_set_ps_consts_b(device->wined3d_device, reg_idx, count, data);
     wined3d_mutex_unlock();
 
     return hr;




More information about the wine-cvs mailing list