Rebase against 0c83f4d5bec8b01e1e6dcbb0a9a9932b6c24570b.

This commit is contained in:
Sebastian Lackner 2016-06-23 07:26:56 +02:00
parent c6a96f3e32
commit a8976086e5
7 changed files with 139 additions and 136 deletions

View File

@ -51,7 +51,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "7fe9858988eabf377ab5e2c64d92f973574b1ae8"
echo "0c83f4d5bec8b01e1e6dcbb0a9a9932b6c24570b"
}
# Show version information

View File

@ -1,4 +1,4 @@
From 1ba3d1dcdb9ee4a1d33a333fdac6cd9f4e86443c Mon Sep 17 00:00:00 2001
From 37e72e356c337dad588e39ddb603a4f17d9d2ddc 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
@ -771,18 +771,18 @@ index a83459c..3bcbf19 100644
HeapFree(GetProcessHeap(), 0, cs);
}
diff --git a/dlls/wined3d/wined3d_main.c b/dlls/wined3d/wined3d_main.c
index 434d32e..beeb9fa 100644
index 1dd6a8b..f573dcb 100644
--- a/dlls/wined3d/wined3d_main.c
+++ b/dlls/wined3d/wined3d_main.c
@@ -90,6 +90,7 @@ struct wined3d_settings wined3d_settings =
~0U, /* No GS shader model limit by default. */
@@ -91,6 +91,7 @@ struct wined3d_settings wined3d_settings =
~0U, /* No PS shader model limit by default. */
~0u, /* No CS shader model limit by default. */
FALSE, /* 3D support enabled by default. */
+ FALSE, /* No multithreaded CS by default. */
};
struct wined3d * CDECL wined3d_create(DWORD flags)
@@ -331,6 +332,14 @@ static BOOL wined3d_dll_init(HINSTANCE hInstDLL)
@@ -334,6 +335,14 @@ static BOOL wined3d_dll_init(HINSTANCE hInstDLL)
TRACE("Disabling 3D support.\n");
wined3d_settings.no_3d = TRUE;
}
@ -798,18 +798,18 @@ index 434d32e..beeb9fa 100644
if (appkey) RegCloseKey( appkey );
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 7bb86d6..d37f30e 100644
index edb4399..29f218e 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -309,6 +309,7 @@ struct wined3d_settings
unsigned int max_sm_gs;
@@ -310,6 +310,7 @@ struct wined3d_settings
unsigned int max_sm_ps;
unsigned int max_sm_cs;
BOOL no_3d;
+ BOOL cs_multithreaded;
};
extern struct wined3d_settings wined3d_settings DECLSPEC_HIDDEN;
@@ -2907,6 +2908,18 @@ HRESULT state_init(struct wined3d_state *state, const struct wined3d_gl_info *gl
@@ -2921,6 +2922,18 @@ HRESULT state_init(struct wined3d_state *state, const struct wined3d_gl_info *gl
const struct wined3d_d3d_info *d3d_info, DWORD flags) DECLSPEC_HIDDEN;
void state_unbind_resources(struct wined3d_state *state) DECLSPEC_HIDDEN;
@ -828,7 +828,7 @@ index 7bb86d6..d37f30e 100644
struct wined3d_cs_ops
{
void *(*require_space)(struct wined3d_cs *cs, size_t size);
@@ -2918,9 +2931,14 @@ struct wined3d_cs
@@ -2932,9 +2945,14 @@ struct wined3d_cs
const struct wined3d_cs_ops *ops;
struct wined3d_device *device;
struct wined3d_state state;

View File

@ -1,16 +1,16 @@
From 7d7e3691cdb6482d0873883abc6a611e30f57edb Mon Sep 17 00:00:00 2001
From cd89d4b13a8465eca49e4999b43d85d86706c580 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Tue, 20 Aug 2013 15:12:26 +0200
Subject: wined3d: Send float constant updates through the command stream
---
dlls/wined3d/cs.c | 74 +++++++++++++++++++++++++++++++++++++++---
dlls/wined3d/cs.c | 75 +++++++++++++++++++++++++++++++++++++++---
dlls/wined3d/device.c | 6 ++--
dlls/wined3d/wined3d_private.h | 2 ++
3 files changed, 76 insertions(+), 6 deletions(-)
3 files changed, 77 insertions(+), 6 deletions(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index b128af1..1c1987a 100644
index b128af1..538ca87 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -65,6 +65,8 @@ enum wined3d_cs_op
@ -61,7 +61,7 @@ index b128af1..1c1987a 100644
/* FIXME: This is not ideal. CS is still running synchronously, so this is ok.
* It will go away soon anyway. */
@@ -1051,6 +1057,64 @@ void wined3d_cs_emit_set_shader(struct wined3d_cs *cs, enum wined3d_shader_type
@@ -1051,6 +1057,65 @@ void wined3d_cs_emit_set_shader(struct wined3d_cs *cs, enum wined3d_shader_type
cs->ops->submit(cs);
}
@ -110,7 +110,8 @@ index b128af1..1c1987a 100644
+ case WINED3D_SHADER_TYPE_GEOMETRY:
+ case WINED3D_SHADER_TYPE_HULL:
+ case WINED3D_SHADER_TYPE_DOMAIN:
+ FIXME("Invalid for geometry shaders\n");
+ case WINED3D_SHADER_TYPE_COMPUTE:
+ FIXME("Invalid for geometry/compute shaders\n");
+ return;
+
+ case WINED3D_SHADER_TYPE_COUNT:
@ -126,7 +127,7 @@ index b128af1..1c1987a 100644
static UINT wined3d_cs_exec_set_render_state(struct wined3d_cs *cs, const void *data)
{
const struct wined3d_cs_set_render_state *op = data;
@@ -1349,6 +1413,8 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
@@ -1349,6 +1414,8 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_RESET_STATE */ wined3d_cs_exec_reset_state,
/* WINED3D_CS_OP_DESTROY_OBJECT */ wined3d_cs_exec_destroy_object,
/* WINED3D_CS_OP_STATEBLOCK */ wined3d_cs_exec_transfer_stateblock,
@ -160,10 +161,10 @@ index 33b7fc3..4b2ea91 100644
return WINED3D_OK;
}
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index f27dc4e..07ca86c 100644
index 3fc5b66..8f5c563 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2996,6 +2996,8 @@ void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform
@@ -3010,6 +3010,8 @@ void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform
void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs,
struct wined3d_vertex_declaration *declaration) DECLSPEC_HIDDEN;
void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_viewport *viewport) DECLSPEC_HIDDEN;

View File

@ -1,16 +1,16 @@
From e7526c85b4cb8c71e64234c9a3fa932f80261aa4 Mon Sep 17 00:00:00 2001
From a76d4c29517eed17544b8dcfb9e8194bec6d60e3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Tue, 9 Apr 2013 21:50:30 +0200
Subject: wined3d: Send bool constant updates through the command stream
---
dlls/wined3d/cs.c | 72 +++++++++++++++++++++++++++++++++++++++---
dlls/wined3d/cs.c | 73 +++++++++++++++++++++++++++++++++++++++---
dlls/wined3d/device.c | 8 +++--
dlls/wined3d/wined3d_private.h | 3 ++
3 files changed, 76 insertions(+), 7 deletions(-)
3 files changed, 77 insertions(+), 7 deletions(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index d240c33..ff98e30 100644
index 48c101e..ffec875 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -66,7 +66,9 @@ enum wined3d_cs_op
@ -60,7 +60,7 @@ index d240c33..ff98e30 100644
memcpy(op->state.ps_consts_i, state->ps_consts_i, sizeof(op->state.ps_consts_i));
/* FIXME: This is not ideal. CS is still running synchronously, so this is ok.
@@ -1164,6 +1170,62 @@ void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render
@@ -1165,6 +1171,63 @@ void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render
op->value = value;
cs->ops->submit(cs);
@ -109,7 +109,8 @@ index d240c33..ff98e30 100644
+ case WINED3D_SHADER_TYPE_GEOMETRY:
+ case WINED3D_SHADER_TYPE_DOMAIN:
+ case WINED3D_SHADER_TYPE_HULL:
+ FIXME("Invalid for geometry shaders\n");
+ case WINED3D_SHADER_TYPE_COMPUTE:
+ FIXME("Invalid for geometry/compute shaders\n");
+ return;
+
+ case WINED3D_SHADER_TYPE_COUNT:
@ -123,7 +124,7 @@ index d240c33..ff98e30 100644
}
static UINT wined3d_cs_exec_set_texture_state(struct wined3d_cs *cs, const void *data)
@@ -1514,7 +1576,9 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
@@ -1515,7 +1578,9 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_DESTROY_OBJECT */ wined3d_cs_exec_destroy_object,
/* WINED3D_CS_OP_STATEBLOCK */ wined3d_cs_exec_transfer_stateblock,
/* WINED3D_CS_OP_SET_VS_CONSTS_F */ wined3d_cs_exec_set_vs_consts_f,
@ -167,10 +168,10 @@ index 0b8534a..1b2e7e3 100644
return WINED3D_OK;
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 016c5c6..eb91406 100644
index 8ad91bc..3e09851 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2416,6 +2416,7 @@ LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL
@@ -2430,6 +2430,7 @@ LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL
void device_resource_add(struct wined3d_device *device, struct wined3d_resource *resource) DECLSPEC_HIDDEN;
void device_resource_released(struct wined3d_device *device, struct wined3d_resource *resource) DECLSPEC_HIDDEN;
void device_invalidate_state(const struct wined3d_device *device, DWORD state) DECLSPEC_HIDDEN;
@ -178,7 +179,7 @@ index 016c5c6..eb91406 100644
static inline BOOL isStateDirty(const struct wined3d_context *context, DWORD state)
{
@@ -2996,6 +2997,8 @@ void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs,
@@ -3010,6 +3011,8 @@ void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs,
void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_viewport *viewport) DECLSPEC_HIDDEN;
void wined3d_cs_emit_set_consts_f(struct wined3d_cs *cs, unsigned int start_idx,
unsigned int count, const struct wined3d_vec4 *constants, enum wined3d_shader_type type) DECLSPEC_HIDDEN;

View File

@ -1,19 +1,19 @@
From 707777525757c44e81b04ef97cf88015a2a7fa7d Mon Sep 17 00:00:00 2001
From 53a64b6c48b846b82a5ca1c48465572bcc059c4a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Wed, 10 Apr 2013 14:20:47 +0200
Subject: wined3d: Send int constant updates through the command stream
---
dlls/wined3d/cs.c | 74 ++++++++++++++++++++++++++++++++++++++----
dlls/wined3d/cs.c | 75 ++++++++++++++++++++++++++++++++++++++----
dlls/wined3d/device.c | 6 ++--
dlls/wined3d/wined3d_private.h | 2 ++
3 files changed, 74 insertions(+), 8 deletions(-)
3 files changed, 75 insertions(+), 8 deletions(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index 4c9e11e..03bed96 100644
index ffec875..de5767e 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -66,8 +66,10 @@ enum wined3d_cs_op
@@ -67,8 +67,10 @@ enum wined3d_cs_op
WINED3D_CS_OP_STATEBLOCK,
WINED3D_CS_OP_SET_VS_CONSTS_F,
WINED3D_CS_OP_SET_VS_CONSTS_B,
@ -24,7 +24,7 @@ index 4c9e11e..03bed96 100644
WINED3D_CS_OP_GLFINISH,
WINED3D_CS_OP_SET_BASE_VERTEX_INDEX,
WINED3D_CS_OP_SET_PRIMITIVE_TYPE,
@@ -303,6 +305,14 @@ struct wined3d_cs_set_consts_b
@@ -313,6 +315,14 @@ struct wined3d_cs_set_consts_b
BOOL constants[1];
};
@ -39,7 +39,7 @@ index 4c9e11e..03bed96 100644
struct wined3d_cs_finish
{
enum wined3d_cs_op opcode;
@@ -971,9 +981,6 @@ static UINT wined3d_cs_exec_transfer_stateblock(struct wined3d_cs *cs, const voi
@@ -992,9 +1002,6 @@ static UINT wined3d_cs_exec_transfer_stateblock(struct wined3d_cs *cs, const voi
/* Don't memcpy the entire struct, we'll remove single items as we add dedicated
* ops for setting states */
@ -49,7 +49,7 @@ index 4c9e11e..03bed96 100644
memcpy(cs->state.lights, op->state.lights, sizeof(cs->state.lights));
@@ -989,9 +996,6 @@ void wined3d_cs_emit_transfer_stateblock(struct wined3d_cs *cs, const struct win
@@ -1010,9 +1017,6 @@ void wined3d_cs_emit_transfer_stateblock(struct wined3d_cs *cs, const struct win
/* Don't memcpy the entire struct, we'll remove single items as we add dedicated
* ops for setting states */
@ -59,7 +59,7 @@ index 4c9e11e..03bed96 100644
/* FIXME: This is not ideal. CS is still running synchronously, so this is ok.
* It will go away soon anyway. */
@@ -1207,6 +1211,62 @@ void wined3d_cs_emit_set_consts_b(struct wined3d_cs *cs, unsigned int start_idx,
@@ -1230,6 +1234,63 @@ void wined3d_cs_emit_set_consts_b(struct wined3d_cs *cs, unsigned int start_idx,
cs->ops->submit(cs);
}
@ -106,7 +106,8 @@ index 4c9e11e..03bed96 100644
+ case WINED3D_SHADER_TYPE_GEOMETRY:
+ case WINED3D_SHADER_TYPE_DOMAIN:
+ case WINED3D_SHADER_TYPE_HULL:
+ ERR("Invalid for geometry shaders\n");
+ case WINED3D_SHADER_TYPE_COMPUTE:
+ FIXME("Invalid for geometry/compute shaders\n");
+ return;
+
+ case WINED3D_SHADER_TYPE_COUNT:
@ -122,7 +123,7 @@ index 4c9e11e..03bed96 100644
static UINT wined3d_cs_exec_set_texture_state(struct wined3d_cs *cs, const void *data)
{
const struct wined3d_cs_set_texture_state *op = data;
@@ -1534,8 +1594,10 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
@@ -1579,8 +1640,10 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_STATEBLOCK */ wined3d_cs_exec_transfer_stateblock,
/* WINED3D_CS_OP_SET_VS_CONSTS_F */ wined3d_cs_exec_set_vs_consts_f,
/* WINED3D_CS_OP_SET_VS_CONSTS_B */ wined3d_cs_exec_set_vs_consts_b,
@ -134,10 +135,10 @@ index 4c9e11e..03bed96 100644
/* WINED3D_CS_OP_SET_BASE_VERTEX_INDEX */ wined3d_cs_exec_set_base_vertex_index,
/* WINED3D_CS_OP_SET_PRIMITIVE_TYPE */ wined3d_cs_exec_set_primitive_type,
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index dfb4ceb..c9828b1 100644
index 1b2e7e3..766e393 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -2440,7 +2440,8 @@ HRESULT CDECL wined3d_device_set_vs_consts_i(struct wined3d_device *device,
@@ -2457,7 +2457,8 @@ HRESULT CDECL wined3d_device_set_vs_consts_i(struct wined3d_device *device,
}
else
{
@ -147,7 +148,7 @@ index dfb4ceb..c9828b1 100644
}
return WINED3D_OK;
@@ -2675,7 +2676,8 @@ HRESULT CDECL wined3d_device_set_ps_consts_i(struct wined3d_device *device,
@@ -2692,7 +2693,8 @@ HRESULT CDECL wined3d_device_set_ps_consts_i(struct wined3d_device *device,
}
else
{
@ -158,10 +159,10 @@ index dfb4ceb..c9828b1 100644
return WINED3D_OK;
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 4fd446e..2a31939 100644
index 3e09851..b783c7e 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2952,6 +2952,8 @@ void wined3d_cs_emit_set_consts_f(struct wined3d_cs *cs, unsigned int start_idx,
@@ -3013,6 +3013,8 @@ void wined3d_cs_emit_set_consts_f(struct wined3d_cs *cs, unsigned int start_idx,
unsigned int count, const struct wined3d_vec4 *constants, enum wined3d_shader_type type) DECLSPEC_HIDDEN;
void wined3d_cs_emit_set_consts_b(struct wined3d_cs *cs, unsigned int start_idx,
unsigned int count, const BOOL *constants, enum wined3d_shader_type type) DECLSPEC_HIDDEN;

View File

@ -1,4 +1,4 @@
From 15743cdf9ab5a5587fd431349f0c91e65072f52b Mon Sep 17 00:00:00 2001
From 72c0664f2c271e1c34ad08b9916307dd9345efb7 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sun, 14 Dec 2014 20:15:44 +0100
Subject: wined3d: Enable CSMT by default, print a winediag message informing
@ -9,19 +9,19 @@ Subject: wined3d: Enable CSMT by default, print a winediag message informing
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/dlls/wined3d/wined3d_main.c b/dlls/wined3d/wined3d_main.c
index 3fac0cf..c1156bd 100644
index ec6a63d..3c7e6f1 100644
--- a/dlls/wined3d/wined3d_main.c
+++ b/dlls/wined3d/wined3d_main.c
@@ -90,7 +90,7 @@ struct wined3d_settings wined3d_settings =
~0U, /* No GS shader model limit by default. */
@@ -91,7 +91,7 @@ struct wined3d_settings wined3d_settings =
~0U, /* No PS shader model limit by default. */
~0u, /* No CS shader model limit by default. */
FALSE, /* 3D support enabled by default. */
- FALSE, /* No multithreaded CS by default. */
+ TRUE, /* Multithreaded CS by default. */
};
struct wined3d * CDECL wined3d_create(DWORD flags)
@@ -333,13 +333,16 @@ static BOOL wined3d_dll_init(HINSTANCE hInstDLL)
@@ -336,13 +336,16 @@ static BOOL wined3d_dll_init(HINSTANCE hInstDLL)
wined3d_settings.no_3d = TRUE;
}
if (!get_config_key(hkey, appkey, "CSMT", buffer, size)

File diff suppressed because it is too large Load Diff