You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-09-12 18:50:20 -07:00
wined3d-CSMT_Main: Added patch to avoid calling SetEvent when worker thread is fast enough.
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
From 3ad4bff5048dec66d702823df7f9e6ea0f9041d8 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Thu, 18 Aug 2016 20:50:52 +0200
|
||||
Subject: wined3d: Do not signal CS event when we manage to unset
|
||||
waiting_for_event quickly enough.
|
||||
|
||||
---
|
||||
dlls/wined3d/cs.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index 02ca2de..ae540c8 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -3000,7 +3000,7 @@ static void wined3d_cs_wait_event(struct wined3d_cs *cs)
|
||||
* of doing so. Wait for the event to reset it. ResetEvent is not good
|
||||
* because the main thread might be beween the waiting_for_event reset
|
||||
* and SignalEvent call. */
|
||||
- if (!InterlockedCompareExchange(&cs->waiting_for_event, FALSE, FALSE))
|
||||
+ if (!InterlockedCompareExchange(&cs->waiting_for_event, FALSE, TRUE))
|
||||
WaitForSingleObject(cs->event, INFINITE);
|
||||
}
|
||||
else
|
||||
--
|
||||
2.9.0
|
||||
|
||||
@@ -3380,7 +3380,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
+ * of doing so. Wait for the event to reset it. ResetEvent is not good
|
||||
+ * because the main thread might be beween the waiting_for_event reset
|
||||
+ * and SignalEvent call. */
|
||||
+ if (!InterlockedCompareExchange(&cs->waiting_for_event, FALSE, FALSE))
|
||||
+ if (!InterlockedCompareExchange(&cs->waiting_for_event, FALSE, TRUE))
|
||||
+ WaitForSingleObject(cs->event, INFINITE);
|
||||
+ }
|
||||
+ else
|
||||
|
||||
Reference in New Issue
Block a user