[WINED3D] Avoid spinning in wined3d_cs_run. CORE-14534
authorThomas Faber <thomas.faber@reactos.org>
Sun, 19 Aug 2018 11:27:04 +0000 (13:27 +0200)
committerThomas Faber <thomas.faber@reactos.org>
Sun, 19 Aug 2018 11:46:02 +0000 (13:46 +0200)
Spinning here is supposed to improve performance by avoiding scheduling
overhead, but because ReactOS's Win32 subsystem does not deal with this well,
it causes the system to freeze on ROS.
As a workaround, we disable spinning and jump directly to the wait.

It should become obvious when this starts actually causing performance issues
again and it's time to undo.

dll/directx/wine/wined3d/wined3d_private.h

index 7b3731c..3444b52 100644 (file)
@@ -3544,7 +3544,11 @@ enum wined3d_push_constants
 
 #define WINED3D_CS_QUERY_POLL_INTERVAL  10u
 #define WINED3D_CS_QUEUE_SIZE           0x100000u
+#ifdef __REACTOS__
+#define WINED3D_CS_SPIN_COUNT           1u
+#else
 #define WINED3D_CS_SPIN_COUNT           10000000u
+#endif
 
 struct wined3d_cs_queue
 {