wined3d-CSMT_Main: Merge two patches.

This commit is contained in:
Sebastian Lackner 2017-05-08 13:07:44 +02:00
parent f8e955a95a
commit a36a97233a
3 changed files with 24 additions and 47 deletions

View File

@ -8813,7 +8813,6 @@ if test "$enable_wined3d_CSMT_Main" -eq 1; then
printf '%s\n' '+ { "Sebastian Lackner", "wined3d: Add additional synchronization CS ops.", 1 },';
printf '%s\n' '+ { "Stefan Dösinger", "wined3d: Send blits through the command stream.", 1 },';
printf '%s\n' '+ { "Stefan Dösinger", "wined3d: Wrap GL BOs in a structure.", 1 },';
printf '%s\n' '+ { "Stefan Dösinger", "wined3d: Hackily introduce a multithreaded command stream.", 1 },';
printf '%s\n' '+ { "Sebastian Lackner", "wined3d: Introduce a separate priority queue.", 1 },';
printf '%s\n' '+ { "Sebastian Lackner", "wined3d: Use priority queue for maps/unmaps.", 1 },';
printf '%s\n' '+ { "Stefan Dösinger", "wined3d: Don'\''t call glFinish before swapping.", 1 },';

View File

@ -1,18 +1,19 @@
From caad9fff0e12134e72b964f7a9bcd2924e25709c Mon Sep 17 00:00:00 2001
From b1a406bab0b46ba9b97081b1a7689d33d6147435 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sun, 19 Feb 2017 00:57:12 +0100
Subject: wined3d: Add additional synchronization CS ops.
---
dlls/wined3d/cs.c | 8 ++++----
dlls/wined3d/view.c | 6 ++++++
2 files changed, 10 insertions(+), 4 deletions(-)
dlls/wined3d/cs.c | 9 +++++----
dlls/wined3d/view.c | 6 ++++++
dlls/wined3d/wined3d_main.c | 2 +-
3 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index 7331f31dd3f..5daff0c96fd 100644
index 7331f31dd3..5c444b29bc 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -2554,10 +2554,6 @@ fail:
@@ -2554,17 +2554,18 @@ fail:
void wined3d_cs_destroy(struct wined3d_cs *cs)
{
@ -23,7 +24,9 @@ index 7331f31dd3f..5daff0c96fd 100644
if (cs->thread)
{
wined3d_cs_emit_stop(cs);
@@ -2566,5 +2562,9 @@ void wined3d_cs_destroy(struct wined3d_cs *cs)
+ WaitForSingleObject(cs->thread, INFINITE);
CloseHandle(cs->thread);
if (!CloseHandle(cs->event))
ERR("Closing event failed.\n");
}
@ -34,7 +37,7 @@ index 7331f31dd3f..5daff0c96fd 100644
HeapFree(GetProcessHeap(), 0, cs);
}
diff --git a/dlls/wined3d/view.c b/dlls/wined3d/view.c
index 0a458803a72..0184b21cdb9 100644
index 0a458803a7..0184b21cdb 100644
--- a/dlls/wined3d/view.c
+++ b/dlls/wined3d/view.c
@@ -716,6 +716,8 @@ static void wined3d_shader_resource_view_cs_init(void *object)
@ -71,6 +74,19 @@ index 0a458803a72..0184b21cdb9 100644
wined3d_cs_init_object(resource->device->cs, wined3d_unordered_access_view_cs_init, view);
return WINED3D_OK;
diff --git a/dlls/wined3d/wined3d_main.c b/dlls/wined3d/wined3d_main.c
index 1dab57a545..ecebc3eed9 100644
--- a/dlls/wined3d/wined3d_main.c
+++ b/dlls/wined3d/wined3d_main.c
@@ -72,7 +72,7 @@ static CRITICAL_SECTION wined3d_wndproc_cs = {&wined3d_wndproc_cs_debug, -1, 0,
* where appropriate. */
struct wined3d_settings wined3d_settings =
{
- FALSE, /* No multithreaded CS by default. */
+ TRUE, /* Multithreaded CS by default. */
MAKEDWORD_VERSION(1, 0), /* Default to legacy OpenGL */
TRUE, /* Use of GLSL enabled by default */
ORM_FBO, /* Use FBOs to do offscreen rendering */
--
2.12.2

View File

@ -1,38 +0,0 @@
From 72ac21edeb63654c59cff6da426dfc6eb9451953 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Tue, 1 Oct 2013 14:31:56 +0200
Subject: wined3d: Hackily introduce a multithreaded command stream
---
dlls/wined3d/cs.c | 1 +
dlls/wined3d/wined3d_main.c | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index f7d8f86d5c..659cfdf7c3 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -2564,6 +2564,7 @@ void wined3d_cs_destroy(struct wined3d_cs *cs)
if (cs->thread)
{
wined3d_cs_emit_stop(cs);
+ WaitForSingleObject(cs->thread, INFINITE);
CloseHandle(cs->thread);
if (!CloseHandle(cs->event))
ERR("Closing event failed.\n");
diff --git a/dlls/wined3d/wined3d_main.c b/dlls/wined3d/wined3d_main.c
index 9bbed2da77..b730471307 100644
--- a/dlls/wined3d/wined3d_main.c
+++ b/dlls/wined3d/wined3d_main.c
@@ -72,7 +72,7 @@ static CRITICAL_SECTION wined3d_wndproc_cs = {&wined3d_wndproc_cs_debug, -1, 0,
* where appropriate. */
struct wined3d_settings wined3d_settings =
{
- FALSE, /* No multithreaded CS by default. */
+ TRUE, /* Multithreaded CS by default. */
MAKEDWORD_VERSION(1, 0), /* Default to legacy OpenGL */
TRUE, /* Use of GLSL enabled by default */
ORM_FBO, /* Use FBOs to do offscreen rendering */
--
2.12.2