Rebase against e6f8f136fa557d282f44654be509573cb45a831f.

This commit is contained in:
Sebastian Lackner 2017-03-02 17:27:26 +01:00
parent c6708dbbbf
commit 04a8307d45
10 changed files with 323 additions and 736 deletions

View File

@ -1,27 +0,0 @@
From 42dd44a1aa50a947d7184e1eeeb5b1b31ed69125 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Tue, 25 Aug 2015 11:16:07 +0200
Subject: ddraw: Fix arguments to IDirectDraw7::EnumSurfaces in DllMain.
---
dlls/ddraw/main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/ddraw/main.c b/dlls/ddraw/main.c
index 8631827..3dae424 100644
--- a/dlls/ddraw/main.c
+++ b/dlls/ddraw/main.c
@@ -937,8 +937,8 @@ BOOL WINAPI DllMain(HINSTANCE inst, DWORD reason, void *reserved)
desc.dwSize = sizeof(desc);
for(i = 0; i <= 1; i++)
{
- hr = IDirectDraw7_EnumSurfaces(&ddraw->IDirectDraw7_iface, DDENUMSURFACES_ALL,
- &desc, ddraw, DestroyCallback);
+ hr = IDirectDraw7_EnumSurfaces(&ddraw->IDirectDraw7_iface,
+ DDENUMSURFACES_DOESEXIST | DDENUMSURFACES_ALL, &desc, ddraw, DestroyCallback);
if(hr != D3D_OK)
ERR("(%p) EnumSurfaces failed, prepare for trouble\n", ddraw);
}
--
2.5.0

View File

@ -52,7 +52,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "89b75296128e8c2cadc77cb06ecd7faa1f80d012"
echo "e6f8f136fa557d282f44654be509573cb45a831f"
}
# Show version information
@ -3619,15 +3619,13 @@ fi
# | * [#17233] Implement DDENUMSURFACES_CANBECREATED in IDirectDraw7::EnumSurfaces
# |
# | Modified files:
# | * dlls/ddraw/ddraw.c, dlls/ddraw/main.c, dlls/ddraw/tests/d3d.c
# | * dlls/ddraw/ddraw.c, dlls/ddraw/tests/d3d.c
# |
if test "$enable_ddraw_EnumSurfaces" -eq 1; then
patch_apply ddraw-EnumSurfaces/0001-ddraw-tests-Add-more-tests-for-IDirectDraw7-EnumSurf.patch
patch_apply ddraw-EnumSurfaces/0002-ddraw-Fix-arguments-to-IDirectDraw7-EnumSurfaces-in-.patch
patch_apply ddraw-EnumSurfaces/0003-ddraw-Implement-DDENUMSURFACES_CANBECREATED-flag-in-.patch
(
printf '%s\n' '+ { "Michael Müller", "ddraw/tests: Add more tests for IDirectDraw7::EnumSurfaces.", 1 },';
printf '%s\n' '+ { "Michael Müller", "ddraw: Fix arguments to IDirectDraw7::EnumSurfaces in DllMain.", 1 },';
printf '%s\n' '+ { "Michael Müller", "ddraw: Implement DDENUMSURFACES_CANBECREATED flag in ddraw7_EnumSurfaces.", 1 },';
) >> "$patchlist"
fi
@ -8390,7 +8388,6 @@ if test "$enable_wined3d_CSMT_Main" -eq 1; then
printf '%s\n' '+ { "Stefan Dösinger", "wined3d: Send update_sub_resource calls through the command stream.", 1 },';
printf '%s\n' '+ { "Stefan Dösinger", "wined3d: Send getdc and releasedc through the command stream.", 1 },';
printf '%s\n' '+ { "Sebastian Lackner", "wined3d: Send query_poll through the command stream.", 1 },';
printf '%s\n' '+ { "Stefan Dösinger", "wined3d: Create the initial context through the CS.", 1 },';
printf '%s\n' '+ { "Stefan Dösinger", "wined3d: Update the swap interval through the CS in reset.", 1 },';
printf '%s\n' '+ { "Stefan Dösinger", "wined3d: Create initial DCs through the CS.", 1 },';
printf '%s\n' '+ { "Nils Kuhnhenn", "wined3d: Fix context_acquire not being called from the command thread in wined3d_texture_add_dirty_region.", 1 },';

View File

@ -1,4 +1,4 @@
From 9ae4703d968d423613ac1b190f141429c1cc7143 Mon Sep 17 00:00:00 2001
From cc2cafc81cc50bcd93c20b887838dd663c190ef7 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.
@ -6,10 +6,10 @@ Subject: wined3d: Add additional synchronization CS ops.
---
dlls/wined3d/cs.c | 51 ++++++++++++++++++++++++++++++++++++++++--
dlls/wined3d/device.c | 2 ++
dlls/wined3d/swapchain.c | 1 +
dlls/wined3d/swapchain.c | 2 ++
dlls/wined3d/view.c | 6 +++++
dlls/wined3d/wined3d_private.h | 3 +++
5 files changed, 61 insertions(+), 2 deletions(-)
5 files changed, 62 insertions(+), 2 deletions(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index 8afa7313a02..b27a083007b 100644
@ -135,7 +135,7 @@ index e812567b067..be6d784bddf 100644
return E_FAIL;
diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
index 78615456207..a5a7a09f569 100644
index 25deaeb1ae9..bd23999fb1e 100644
--- a/dlls/wined3d/swapchain.c
+++ b/dlls/wined3d/swapchain.c
@@ -66,6 +66,7 @@ static void swapchain_cleanup(struct wined3d_swapchain *swapchain)
@ -146,6 +146,14 @@ index 78615456207..a5a7a09f569 100644
/* Restore the screen resolution if we rendered in fullscreen.
* This will restore the screen resolution to what it was before creating
@@ -965,6 +966,7 @@ static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, struct wined3
}
wined3d_cs_init_object(device->cs, wined3d_swapchain_cs_init, swapchain);
+ wined3d_cs_emit_sync(device->cs);
if (!swapchain->context[0])
{
diff --git a/dlls/wined3d/view.c b/dlls/wined3d/view.c
index 02964e4a96b..21aa8720e65 100644
--- a/dlls/wined3d/view.c
@ -185,10 +193,10 @@ index 02964e4a96b..21aa8720e65 100644
return WINED3D_OK;
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 8b26b2827dd..8e875cec652 100644
index d45e19b0224..d0385a5e90a 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -3182,6 +3182,7 @@ struct wined3d_cs_ops
@@ -3193,6 +3193,7 @@ struct wined3d_cs_ops
{
void *(*require_space)(struct wined3d_cs *cs, size_t size);
void (*submit)(struct wined3d_cs *cs);
@ -196,7 +204,7 @@ index 8b26b2827dd..8e875cec652 100644
void (*push_constants)(struct wined3d_cs *cs, enum wined3d_push_constants p,
unsigned int start_idx, unsigned int count, const void *constants);
};
@@ -3208,6 +3209,7 @@ void wined3d_cs_emit_dispatch(struct wined3d_cs *cs,
@@ -3219,6 +3220,7 @@ void wined3d_cs_emit_dispatch(struct wined3d_cs *cs,
void wined3d_cs_emit_draw(struct wined3d_cs *cs, GLenum primitive_type, int base_vertex_idx,
unsigned int start_idx, unsigned int index_count, unsigned int start_instance,
unsigned int instance_count, BOOL indexed) DECLSPEC_HIDDEN;
@ -204,7 +212,7 @@ index 8b26b2827dd..8e875cec652 100644
void wined3d_cs_emit_preload_resource(struct wined3d_cs *cs, struct wined3d_resource *resource) DECLSPEC_HIDDEN;
void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *swapchain,
const RECT *src_rect, const RECT *dst_rect, HWND dst_window_override, DWORD flags) DECLSPEC_HIDDEN;
@@ -3259,6 +3261,7 @@ void wined3d_cs_emit_set_unordered_access_view(struct wined3d_cs *cs, enum wined
@@ -3270,6 +3272,7 @@ void wined3d_cs_emit_set_unordered_access_view(struct wined3d_cs *cs, enum wined
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,239 +0,0 @@
From 99532d442dd915def1f20d52586e39f67b79c9ec Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Thu, 10 Oct 2013 16:43:19 +0200
Subject: wined3d: Create the initial context through the CS.
Very hacky.
---
dlls/wined3d/cs.c | 31 +++++++++++
dlls/wined3d/swapchain.c | 121 ++++++++++++++++++++++-------------------
dlls/wined3d/wined3d_private.h | 4 ++
3 files changed, 101 insertions(+), 55 deletions(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index eaa9267e5ba..544a6bf89e6 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -73,6 +73,7 @@ enum wined3d_cs_op
WINED3D_CS_OP_UPDATE_SUB_RESOURCE,
WINED3D_CS_OP_GET_DC,
WINED3D_CS_OP_RELEASE_DC,
+ WINED3D_CS_OP_CREATE_SWAPCHAIN_CONTEXT,
};
struct wined3d_cs_sync
@@ -428,6 +429,13 @@ struct wined3d_cs_get_release_dc
HRESULT *hr;
};
+struct wined3d_cs_create_swapchain_context
+{
+ enum wined3d_cs_op opcode;
+ struct wined3d_swapchain *swapchain;
+ HRESULT *hr;
+};
+
static void wined3d_cs_exec_sync(struct wined3d_cs *cs, const void *data)
{
}
@@ -2067,6 +2075,28 @@ HRESULT wined3d_cs_emit_release_dc(struct wined3d_cs *cs, struct wined3d_texture
return hr;
}
+static void wined3d_cs_exec_create_swapchain_context(struct wined3d_cs *cs, const void *data)
+{
+ const struct wined3d_cs_create_swapchain_context *op = data;
+
+ *op->hr = swapchain_create_context_cs(cs->device, op->swapchain);
+}
+
+HRESULT wined3d_cs_emit_create_swapchain_context(struct wined3d_cs *cs, struct wined3d_swapchain *swapchain)
+{
+ struct wined3d_cs_create_swapchain_context *op;
+ HRESULT hr;
+
+ op = cs->ops->require_space(cs, sizeof(*op));
+ op->opcode = WINED3D_CS_OP_CREATE_SWAPCHAIN_CONTEXT;
+ op->swapchain = swapchain;
+ op->hr = &hr;
+
+ cs->ops->submit_and_wait(cs);
+
+ return hr;
+}
+
static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
{
/* WINED3D_CS_OP_SYNC */ wined3d_cs_exec_sync,
@@ -2116,6 +2146,7 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_UPDATE_SUB_RESOURCE */ wined3d_cs_exec_update_sub_resource,
/* WINED3D_CS_OP_GET_DC */ wined3d_cs_exec_get_dc,
/* WINED3D_CS_OP_RELEASE_DC */ wined3d_cs_exec_release_dc,
+ /* WINED3D_CS_OP_CREATE_SWAPCHAIN_CONTEXT */ wined3d_cs_exec_create_swapchain_context,
};
static void *wined3d_cs_st_require_space(struct wined3d_cs *cs, size_t size)
diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
index b3da7f6e20a..8d69820d400 100644
--- a/dlls/wined3d/swapchain.c
+++ b/dlls/wined3d/swapchain.c
@@ -787,6 +787,69 @@ static void wined3d_swapchain_apply_sample_count_override(const struct wined3d_s
*quality = 0;
}
+HRESULT swapchain_create_context_cs(struct wined3d_device *device, struct wined3d_swapchain *swapchain)
+{
+ const struct wined3d_adapter *adapter = device->adapter;
+ const struct wined3d_gl_info *gl_info = &adapter->gl_info;
+ UINT i;
+
+ static const enum wined3d_format_id formats[] =
+ {
+ WINED3DFMT_D24_UNORM_S8_UINT,
+ WINED3DFMT_D32_UNORM,
+ WINED3DFMT_R24_UNORM_X8_TYPELESS,
+ WINED3DFMT_D16_UNORM,
+ WINED3DFMT_S1_UINT_D15_UNORM
+ };
+
+ swapchain->context = HeapAlloc(GetProcessHeap(), 0, sizeof(*swapchain->context));
+ if (!swapchain->context)
+ {
+ ERR("Failed to create the context array.\n");
+ return E_OUTOFMEMORY;
+ }
+
+ /* In WGL both color, depth and stencil are features of a pixel format. In case of D3D they are separate.
+ * You are able to add a depth + stencil surface at a later stage when you need it.
+ * In order to support this properly in WineD3D we need the ability to recreate the opengl context and
+ * drawable when this is required. This is very tricky as we need to reapply ALL opengl states for the new
+ * context, need torecreate shaders, textures and other resources.
+ *
+ * The context manager already takes care of the state problem and for the other tasks code from Reset
+ * can be used. These changes are way to risky during the 1.0 code freeze which is taking place right now.
+ * Likely a lot of other new bugs will be exposed. For that reason request a depth stencil surface all the
+ * time. It can cause a slight performance hit but fixes a lot of regressions. A fixme reminds of that this
+ * issue needs to be fixed. */
+ for (i = 0; i < (sizeof(formats) / sizeof(*formats)); i++)
+ {
+ swapchain->ds_format = wined3d_get_format(gl_info, formats[i], WINED3DUSAGE_DEPTHSTENCIL);
+ swapchain->context[0] = context_create(swapchain, swapchain->front_buffer, swapchain->ds_format);
+ if (swapchain->context[0]) break;
+ TRACE("Depth stencil format %s is not supported, trying next format\n",
+ debug_d3dformat(formats[i]));
+ }
+
+ if (!swapchain->context[0])
+ {
+ WARN("Failed to create context.\n");
+ HeapFree(GetProcessHeap(), 0, swapchain->context);
+ swapchain->context = NULL;
+ return WINED3DERR_NOTAVAILABLE;
+ }
+ swapchain->num_contexts = 1;
+
+ if (wined3d_settings.offscreen_rendering_mode != ORM_FBO
+ && (!swapchain->desc.enable_auto_depth_stencil
+ || swapchain->desc.auto_depth_stencil_format != swapchain->ds_format->id))
+ {
+ FIXME("Add OpenGL context recreation support to context_validate_onscreen_formats\n");
+ }
+ context_release(swapchain->context[0]);
+ swapchain_update_swap_interval(swapchain);
+
+ return WINED3D_OK;
+}
+
static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, struct wined3d_device *device,
struct wined3d_swapchain_desc *desc, void *parent, const struct wined3d_parent_ops *parent_ops)
{
@@ -913,61 +976,9 @@ static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, struct wined3
if (!(device->wined3d->flags & WINED3D_NO3D))
{
- static const enum wined3d_format_id formats[] =
- {
- WINED3DFMT_D24_UNORM_S8_UINT,
- WINED3DFMT_D32_UNORM,
- WINED3DFMT_R24_UNORM_X8_TYPELESS,
- WINED3DFMT_D16_UNORM,
- WINED3DFMT_S1_UINT_D15_UNORM
- };
-
- const struct wined3d_gl_info *gl_info = &adapter->gl_info;
-
- swapchain->context = HeapAlloc(GetProcessHeap(), 0, sizeof(*swapchain->context));
- if (!swapchain->context)
- {
- ERR("Failed to create the context array.\n");
- hr = E_OUTOFMEMORY;
- goto err;
- }
-
- /* In WGL both color, depth and stencil are features of a pixel format. In case of D3D they are separate.
- * You are able to add a depth + stencil surface at a later stage when you need it.
- * In order to support this properly in WineD3D we need the ability to recreate the opengl context and
- * drawable when this is required. This is very tricky as we need to reapply ALL opengl states for the new
- * context, need torecreate shaders, textures and other resources.
- *
- * The context manager already takes care of the state problem and for the other tasks code from Reset
- * can be used. These changes are way to risky during the 1.0 code freeze which is taking place right now.
- * Likely a lot of other new bugs will be exposed. For that reason request a depth stencil surface all the
- * time. It can cause a slight performance hit but fixes a lot of regressions. A fixme reminds of that this
- * issue needs to be fixed. */
- for (i = 0; i < (sizeof(formats) / sizeof(*formats)); i++)
- {
- swapchain->ds_format = wined3d_get_format(gl_info, formats[i], WINED3DUSAGE_DEPTHSTENCIL);
- swapchain->context[0] = context_create(swapchain, swapchain->front_buffer, swapchain->ds_format);
- if (swapchain->context[0]) break;
- TRACE("Depth stencil format %s is not supported, trying next format\n",
- debug_d3dformat(formats[i]));
- }
-
- if (!swapchain->context[0])
- {
- WARN("Failed to create context.\n");
- hr = WINED3DERR_NOTAVAILABLE;
- goto err;
- }
- swapchain->num_contexts = 1;
-
- if (wined3d_settings.offscreen_rendering_mode != ORM_FBO
- && (!desc->enable_auto_depth_stencil
- || swapchain->desc.auto_depth_stencil_format != swapchain->ds_format->id))
- {
- FIXME("Add OpenGL context recreation support to context_validate_onscreen_formats\n");
- }
- context_release(swapchain->context[0]);
- swapchain_update_swap_interval(swapchain);
+ hr = wined3d_cs_emit_create_swapchain_context(device->cs, swapchain);
+ if (FAILED(hr))
+ goto err;
}
if (swapchain->desc.backbuffer_count > 0)
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index ffcc6c400fb..c6c2a5902fa 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -3221,6 +3221,8 @@ void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *
void wined3d_cs_emit_clear_rtv(struct wined3d_cs *cs, struct wined3d_rendertarget_view *view,
const RECT *rect, DWORD flags, const struct wined3d_color *color, float depth, DWORD stencil,
const struct blit_shader *blitter) DECLSPEC_HIDDEN;
+HRESULT wined3d_cs_emit_create_swapchain_context(struct wined3d_cs *cs,
+ struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN;
void wined3d_cs_emit_dispatch(struct wined3d_cs *cs,
unsigned int group_count_x, unsigned int group_count_y, unsigned int group_count_z) DECLSPEC_HIDDEN;
void wined3d_cs_emit_draw(struct wined3d_cs *cs, GLenum primitive_type, int base_vertex_idx,
@@ -3472,6 +3474,8 @@ struct wined3d_swapchain
void wined3d_swapchain_activate(struct wined3d_swapchain *swapchain, BOOL activate) DECLSPEC_HIDDEN;
struct wined3d_context *swapchain_get_context(struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN;
+HRESULT swapchain_create_context_cs(struct wined3d_device *device,
+ struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN;
void swapchain_destroy_contexts(struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN;
HDC swapchain_get_backup_dc(struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN;
void swapchain_update_draw_bindings(struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN;
--
2.11.0

View File

@ -1,4 +1,4 @@
From 87dc42bd2a784e106d9898b5dcf3969e5c508fab Mon Sep 17 00:00:00 2001
From 207bfb3829ccd61de999f5d1797fabee9cb44e4c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefandoesinger@gmx.at>
Date: Sat, 7 May 2016 21:58:06 +0100
Subject: wined3d: Update the swap interval through the CS in reset.
@ -10,18 +10,18 @@ Subject: wined3d: Update the swap interval through the CS in reset.
3 files changed, 28 insertions(+), 1 deletion(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index 4ee459f535a..c7ed94f623c 100644
index eaa9267e5ba..770760f78c7 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -75,6 +75,7 @@ enum wined3d_cs_op
@@ -73,6 +73,7 @@ enum wined3d_cs_op
WINED3D_CS_OP_UPDATE_SUB_RESOURCE,
WINED3D_CS_OP_GET_DC,
WINED3D_CS_OP_RELEASE_DC,
WINED3D_CS_OP_CREATE_SWAPCHAIN_CONTEXT,
+ WINED3D_CS_OP_UPDATE_SWAP_INTERVAL,
};
struct wined3d_cs_sync
@@ -442,6 +443,12 @@ struct wined3d_cs_create_swapchain_context
@@ -428,6 +429,12 @@ struct wined3d_cs_get_release_dc
HRESULT *hr;
};
@ -34,7 +34,7 @@ index 4ee459f535a..c7ed94f623c 100644
static void wined3d_cs_exec_sync(struct wined3d_cs *cs, const void *data)
{
}
@@ -2115,6 +2122,24 @@ HRESULT wined3d_cs_emit_create_swapchain_context(struct wined3d_cs *cs, struct w
@@ -2067,6 +2074,24 @@ HRESULT wined3d_cs_emit_release_dc(struct wined3d_cs *cs, struct wined3d_texture
return hr;
}
@ -59,19 +59,19 @@ index 4ee459f535a..c7ed94f623c 100644
static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
{
/* WINED3D_CS_OP_SYNC */ wined3d_cs_exec_sync,
@@ -2166,6 +2191,7 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
@@ -2116,6 +2141,7 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_UPDATE_SUB_RESOURCE */ wined3d_cs_exec_update_sub_resource,
/* WINED3D_CS_OP_GET_DC */ wined3d_cs_exec_get_dc,
/* WINED3D_CS_OP_RELEASE_DC */ wined3d_cs_exec_release_dc,
/* WINED3D_CS_OP_CREATE_SWAPCHAIN_CONTEXT */ wined3d_cs_exec_create_swapchain_context,
+ /* WINED3D_CS_OP_UPDATE_SWAP_INTERVAL */ wined3d_cs_exec_update_swap_interval,
};
static void *wined3d_cs_st_require_space(struct wined3d_cs *cs, size_t size)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 86b1808463e..3e4a1790946 100644
index 03361548a89..3870ecf3f0d 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -4839,7 +4839,7 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
@@ -4850,7 +4850,7 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
{
if (reset_state)
hr = wined3d_device_create_primary_opengl_context(device);
@ -81,10 +81,10 @@ index 86b1808463e..3e4a1790946 100644
/* All done. There is no need to reload resources or shaders, this will happen automatically on the
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index b3995627850..ce02d81914f 100644
index 667b66f8231..6e215b8f2c4 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -3279,6 +3279,7 @@ void wined3d_cs_emit_unload_resource(struct wined3d_cs *cs, struct wined3d_resou
@@ -3301,6 +3301,7 @@ void wined3d_cs_emit_unload_resource(struct wined3d_cs *cs, struct wined3d_resou
void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_resource *resource,
unsigned int sub_resource_idx, const struct wined3d_box *box, const void *data, unsigned int row_pitch,
unsigned int depth_pitch) DECLSPEC_HIDDEN;

View File

@ -1,4 +1,4 @@
From a25b97bf63e04c95f9f2028f48db60d5fc511433 Mon Sep 17 00:00:00 2001
From d8510f1a77606628c1868332f11f5dd8ec90f82e Mon Sep 17 00:00:00 2001
From: Nils Kuhnhenn <nils@volafile.io>
Date: Fri, 5 Aug 2016 20:28:46 +0200
Subject: wined3d: Fix context_acquire not being called from the command thread
@ -11,18 +11,18 @@ Subject: wined3d: Fix context_acquire not being called from the command thread
3 files changed, 51 insertions(+), 14 deletions(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index c7ed94f623c..5b529d000f4 100644
index 770760f78c7..8b13ca2f792 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -76,6 +76,7 @@ enum wined3d_cs_op
@@ -74,6 +74,7 @@ enum wined3d_cs_op
WINED3D_CS_OP_GET_DC,
WINED3D_CS_OP_RELEASE_DC,
WINED3D_CS_OP_CREATE_SWAPCHAIN_CONTEXT,
WINED3D_CS_OP_UPDATE_SWAP_INTERVAL,
+ WINED3D_CS_OP_TEXTURE_ADD_DIRTY_REGION,
};
struct wined3d_cs_sync
@@ -449,6 +450,13 @@ struct wined3d_cs_update_swap_interval
@@ -435,6 +436,13 @@ struct wined3d_cs_update_swap_interval
struct wined3d_swapchain *swapchain;
};
@ -36,7 +36,7 @@ index c7ed94f623c..5b529d000f4 100644
static void wined3d_cs_exec_sync(struct wined3d_cs *cs, const void *data)
{
}
@@ -2140,6 +2148,45 @@ void wined3d_cs_emit_update_swap_interval(struct wined3d_cs *cs, struct wined3d_
@@ -2092,6 +2100,45 @@ void wined3d_cs_emit_update_swap_interval(struct wined3d_cs *cs, struct wined3d_
cs->ops->submit_and_wait(cs);
}
@ -82,19 +82,19 @@ index c7ed94f623c..5b529d000f4 100644
static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
{
/* WINED3D_CS_OP_SYNC */ wined3d_cs_exec_sync,
@@ -2192,6 +2239,7 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
@@ -2142,6 +2189,7 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_GET_DC */ wined3d_cs_exec_get_dc,
/* WINED3D_CS_OP_RELEASE_DC */ wined3d_cs_exec_release_dc,
/* WINED3D_CS_OP_CREATE_SWAPCHAIN_CONTEXT */ wined3d_cs_exec_create_swapchain_context,
/* WINED3D_CS_OP_UPDATE_SWAP_INTERVAL */ wined3d_cs_exec_update_swap_interval,
+ /* WINED3D_CS_OP_TEXTURE_ADD_DIRTY_REGION */ wined3d_cs_exec_texture_add_dirty_region,
};
static void *wined3d_cs_st_require_space(struct wined3d_cs *cs, size_t size)
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
index 70c4590f74a..de118e4d564 100644
index baecda0b9ed..4c6a8e96611 100644
--- a/dlls/wined3d/texture.c
+++ b/dlls/wined3d/texture.c
@@ -1521,7 +1521,6 @@ struct wined3d_texture_sub_resource *wined3d_texture_get_sub_resource(struct win
@@ -1523,7 +1523,6 @@ struct wined3d_texture_sub_resource *wined3d_texture_get_sub_resource(struct win
HRESULT CDECL wined3d_texture_add_dirty_region(struct wined3d_texture *texture,
UINT layer, const struct wined3d_box *dirty_region)
{
@ -102,7 +102,7 @@ index 70c4590f74a..de118e4d564 100644
unsigned int sub_resource_idx;
TRACE("texture %p, layer %u, dirty_region %s.\n", texture, layer, debug_box(dirty_region));
@@ -1533,19 +1532,7 @@ HRESULT CDECL wined3d_texture_add_dirty_region(struct wined3d_texture *texture,
@@ -1535,19 +1534,7 @@ HRESULT CDECL wined3d_texture_add_dirty_region(struct wined3d_texture *texture,
}
sub_resource_idx = layer * texture->level_count;
@ -124,10 +124,10 @@ index 70c4590f74a..de118e4d564 100644
}
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index ce02d81914f..7cabc276a0b 100644
index 6e215b8f2c4..efa3b879098 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -3274,6 +3274,8 @@ void wined3d_cs_emit_set_unordered_access_view(struct wined3d_cs *cs, enum wined
@@ -3296,6 +3296,8 @@ void wined3d_cs_emit_set_unordered_access_view(struct wined3d_cs *cs, enum wined
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,4 +1,4 @@
From da62e3d0e77ffb6f420b1c460bc52b833955635c Mon Sep 17 00:00:00 2001
From 3bf5f63ec62c705afb14d485df3e2d0bd799d7dd Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Tue, 7 Feb 2017 14:37:07 +0100
Subject: wined3d: Send buffer copy requests through CS.
@ -10,18 +10,18 @@ Subject: wined3d: Send buffer copy requests through CS.
3 files changed, 51 insertions(+), 4 deletions(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index 7e032d8ec05..381b7ca30ac 100644
index be7e041b86c..51ac0c2b000 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -77,6 +77,7 @@ enum wined3d_cs_op
WINED3D_CS_OP_CREATE_SWAPCHAIN_CONTEXT,
@@ -75,6 +75,7 @@ enum wined3d_cs_op
WINED3D_CS_OP_RELEASE_DC,
WINED3D_CS_OP_UPDATE_SWAP_INTERVAL,
WINED3D_CS_OP_TEXTURE_ADD_DIRTY_REGION,
+ WINED3D_CS_OP_BUFFER_COPY,
};
struct wined3d_cs_sync
@@ -457,6 +458,16 @@ struct wined3d_cs_texture_add_dirty_region
@@ -443,6 +444,16 @@ struct wined3d_cs_texture_add_dirty_region
unsigned int sub_resource_idx;
};
@ -38,7 +38,7 @@ index 7e032d8ec05..381b7ca30ac 100644
static void wined3d_cs_exec_sync(struct wined3d_cs *cs, const void *data)
{
}
@@ -2198,6 +2209,38 @@ void wined3d_cs_emit_texture_add_dirty_region(struct wined3d_cs *cs,
@@ -2150,6 +2161,38 @@ void wined3d_cs_emit_texture_add_dirty_region(struct wined3d_cs *cs,
cs->ops->submit(cs);
}
@ -77,8 +77,8 @@ index 7e032d8ec05..381b7ca30ac 100644
static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) =
{
/* WINED3D_CS_OP_SYNC */ wined3d_cs_exec_sync,
@@ -2251,6 +2294,7 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_CREATE_SWAPCHAIN_CONTEXT */ wined3d_cs_exec_create_swapchain_context,
@@ -2201,6 +2244,7 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_RELEASE_DC */ wined3d_cs_exec_release_dc,
/* WINED3D_CS_OP_UPDATE_SWAP_INTERVAL */ wined3d_cs_exec_update_swap_interval,
/* WINED3D_CS_OP_TEXTURE_ADD_DIRTY_REGION */ wined3d_cs_exec_texture_add_dirty_region,
+ /* WINED3D_CS_OP_BUFFER_COPY */ wined3d_cs_exec_buffer_copy,
@ -86,10 +86,10 @@ index 7e032d8ec05..381b7ca30ac 100644
static void *wined3d_cs_st_require_space(struct wined3d_cs *cs, size_t size)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index bf647d5241c..625357e4407 100644
index 749ba9ca19c..a8ca7cbaf56 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -3981,10 +3981,9 @@ void CDECL wined3d_device_copy_resource(struct wined3d_device *device,
@@ -3991,10 +3991,9 @@ void CDECL wined3d_device_copy_resource(struct wined3d_device *device,
if (dst_resource->type == WINED3D_RTYPE_BUFFER)
{
@ -102,7 +102,7 @@ index bf647d5241c..625357e4407 100644
return;
}
@@ -4106,8 +4105,9 @@ HRESULT CDECL wined3d_device_copy_sub_resource_region(struct wined3d_device *dev
@@ -4116,8 +4115,9 @@ HRESULT CDECL wined3d_device_copy_sub_resource_region(struct wined3d_device *dev
return WINED3DERR_INVALIDCALL;
}
@ -114,10 +114,10 @@ index bf647d5241c..625357e4407 100644
if (dst_resource->type != WINED3D_RTYPE_TEXTURE_2D)
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index e4474a7b2c5..2b7b658a162 100644
index d45c45c09dc..708091f573b 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -3214,6 +3214,9 @@ void wined3d_cs_emit_blt(struct wined3d_cs *cs, struct wined3d_surface *dst_surf
@@ -3239,6 +3239,9 @@ void wined3d_cs_emit_blt(struct wined3d_cs *cs, struct wined3d_surface *dst_surf
const RECT *dst_rect, struct wined3d_surface *src_surface,
const RECT *src_rect, DWORD flags, const struct wined3d_blt_fx *fx,
enum wined3d_texture_filter_type filter) DECLSPEC_HIDDEN;

File diff suppressed because it is too large Load Diff