[PATCH v2 5/7] d3d9: Handle stateblocks in d3d9_device_SetTexture().

Zebediah Figura z.figura12 at gmail.com
Thu Oct 24 13:43:08 CDT 2019


Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
---
 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 d96e7b7095..cd870c90a6 100644
--- a/dlls/d3d9/device.c
+++ b/dlls/d3d9/device.c
@@ -2489,13 +2489,16 @@ static HRESULT WINAPI d3d9_device_SetTexture(IDirect3DDevice9Ex *iface, DWORD st
     texture_impl = unsafe_impl_from_IDirect3DBaseTexture9(texture);
 
     wined3d_mutex_lock();
-    wined3d_device_set_texture(device->wined3d_device, stage,
+    wined3d_stateblock_set_texture(device->update_state, stage,
             texture_impl ? texture_impl->wined3d_texture : NULL);
     if (!device->recording)
     {
         unsigned int i = stage < 16 || (stage >= D3DVERTEXTEXTURESAMPLER0 && stage <= D3DVERTEXTEXTURESAMPLER3)
                 ? stage < 16 ? stage : stage - D3DVERTEXTEXTURESAMPLER0 + 16 : ~0u;
 
+        wined3d_device_set_texture(device->wined3d_device, stage,
+                texture_impl ? texture_impl->wined3d_texture : NULL);
+
         if (i < D3D9_MAX_TEXTURE_UNITS)
         {
             if (texture_impl && texture_impl->usage & D3DUSAGE_AUTOGENMIPMAP)
-- 
2.20.1




More information about the wine-devel mailing list