mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-11-21 16:46:54 -08:00
wined3d-CSMT_Main: Initialize critical sections with spincount.
This commit is contained in:
parent
1cc5d04346
commit
d924318742
@ -8481,6 +8481,7 @@ if test "$enable_wined3d_CSMT_Main" -eq 1; then
|
||||
printf '%s\n' '+ { "Michael Müller", "wined3d: Use a separate lock for each CS list.", 1 },';
|
||||
printf '%s\n' '+ { "Sebastian Lackner", "wined3d: Don'\''t crash in context_release when device was not fully created.", 1 },';
|
||||
printf '%s\n' '+ { "Sebastian Lackner", "wined3d: Use priority queue for update_sub_resource.", 1 },';
|
||||
printf '%s\n' '+ { "Michael Müller", "wined3d: Use spin lock for cs list critical sections.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
|
@ -0,0 +1,25 @@
|
||||
From c220cd6b2f2568bc1055f73f6d74ed6d4fd40988 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Sun, 12 Feb 2017 15:40:54 +0100
|
||||
Subject: wined3d: Use spin lock for cs list critical sections.
|
||||
|
||||
---
|
||||
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 2aae8ca6a55..d78df546e59 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -600,7 +600,7 @@ static struct wined3d_cs_block *wined3d_cs_dequeue_block(struct wined3d_cs *cs)
|
||||
|
||||
static void wined3d_cs_list_init(struct wined3d_cs_list *list)
|
||||
{
|
||||
- InitializeCriticalSection(&list->lock);
|
||||
+ InitializeCriticalSectionAndSpinCount(&list->lock, WINED3D_CS_SPIN_COUNT);
|
||||
list->lock.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": wined3d_cs_list_lock");
|
||||
|
||||
list_init(&list->blocks);
|
||||
--
|
||||
2.11.0
|
||||
|
@ -537,7 +537,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
+
|
||||
+static void wined3d_cs_list_init(struct wined3d_cs_list *list)
|
||||
+{
|
||||
+ InitializeCriticalSection(&list->lock);
|
||||
+ InitializeCriticalSectionAndSpinCount(&list->lock, WINED3D_CS_SPIN_COUNT);
|
||||
+ list->lock.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": wined3d_cs_list_lock");
|
||||
+
|
||||
+ list_init(&list->blocks);
|
||||
|
Loading…
x
Reference in New Issue
Block a user