[PATCH 3/6] d3d8: Retrieve the pixel shader from the primary stateblock.

Zebediah Figura z.figura12 at gmail.com
Thu Feb 20 20:21:32 CST 2020


Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
---
 dlls/d3d8/device.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c
index c2112445d8..cf44fa2baa 100644
--- a/dlls/d3d8/device.c
+++ b/dlls/d3d8/device.c
@@ -3240,7 +3240,7 @@ static HRESULT WINAPI d3d8_device_GetPixelShader(IDirect3DDevice8 *iface, DWORD
         return D3DERR_INVALIDCALL;
 
     wined3d_mutex_lock();
-    if ((object = wined3d_device_get_pixel_shader(device->wined3d_device)))
+    if ((object = wined3d_stateblock_get_state(device->state)->ps))
     {
         struct d3d8_pixel_shader *d3d8_shader;
         d3d8_shader = wined3d_shader_get_parent(object);
@@ -3273,7 +3273,7 @@ static HRESULT WINAPI d3d8_device_DeletePixelShader(IDirect3DDevice8 *iface, DWO
         return D3DERR_INVALIDCALL;
     }
 
-    if (wined3d_device_get_pixel_shader(device->wined3d_device) == shader_impl->wined3d_shader)
+    if (wined3d_stateblock_get_state(device->state)->ps == shader_impl->wined3d_shader)
         IDirect3DDevice8_SetPixelShader(iface, 0);
 
     wined3d_mutex_unlock();
-- 
2.25.0




More information about the wine-devel mailing list