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

Alexandre Julliard julliard at winehq.org
Tue Oct 1 15:50:32 CDT 2019


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

Author: Zebediah Figura <z.figura12 at gmail.com>
Date:   Mon Sep 30 20:28:33 2019 -0500

d3d9: Handle stateblocks in d3d9_device_SetVertexDeclaration().

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 | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c
index 6917ad577c..7d24703795 100644
--- a/dlls/d3d9/device.c
+++ b/dlls/d3d9/device.c
@@ -3232,8 +3232,11 @@ static HRESULT WINAPI d3d9_device_SetVertexDeclaration(IDirect3DDevice9Ex *iface
     TRACE("iface %p, declaration %p.\n", iface, declaration);
 
     wined3d_mutex_lock();
-    wined3d_device_set_vertex_declaration(device->wined3d_device,
+    wined3d_stateblock_set_vertex_declaration(device->update_state,
             decl_impl ? decl_impl->wined3d_declaration : NULL);
+    if (!device->recording)
+        wined3d_device_set_vertex_declaration(device->wined3d_device,
+                decl_impl ? decl_impl->wined3d_declaration : NULL);
     device->has_vertex_declaration = !!decl_impl;
     wined3d_mutex_unlock();
 




More information about the wine-cvs mailing list