diff --git a/patches/mpr-WNetGetUniversalNameW/0001-mpr-Return-correct-error-code-for-non-network-paths-.patch b/patches/mpr-WNetGetUniversalNameW/0001-mpr-Return-correct-error-code-for-non-network-paths-.patch index d85b5dd5..f8b5dfc3 100644 --- a/patches/mpr-WNetGetUniversalNameW/0001-mpr-Return-correct-error-code-for-non-network-paths-.patch +++ b/patches/mpr-WNetGetUniversalNameW/0001-mpr-Return-correct-error-code-for-non-network-paths-.patch @@ -1,4 +1,4 @@ -From 98a994918027aac485362b84a843096e0f5c3284 Mon Sep 17 00:00:00 2001 +From 09b4c584ce6017ae0887edf18d989807c40bec4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Sun, 18 Oct 2015 03:27:41 +0200 Subject: mpr: Return correct error code for non network paths and @@ -9,12 +9,12 @@ Content-Transfer-Encoding: 8bit Signed-off-by: Michael Müller --- - dlls/mpr/tests/mpr.c | 10 ++++------ - dlls/mpr/wnet.c | 2 +- - 2 files changed, 5 insertions(+), 7 deletions(-) + dlls/mpr/tests/mpr.c | 9 +++------ + dlls/mpr/wnet.c | 2 +- + 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/dlls/mpr/tests/mpr.c b/dlls/mpr/tests/mpr.c -index ee1ff3a..ee9e220 100644 +index 364ac2cc601..19097b8a286 100644 --- a/dlls/mpr/tests/mpr.c +++ b/dlls/mpr/tests/mpr.c @@ -101,25 +101,23 @@ static void test_WNetGetRemoteName(void) @@ -45,27 +45,26 @@ index ee1ff3a..ee9e220 100644 ret = WNetGetUniversalNameA(driveA, REMOTE_NAME_INFO_LEVEL, buffer, NULL); todo_wine ok(ret == WN_BAD_POINTER, "WNetGetUniversalNameA failed: %08x\n", ret); -@@ -127,13 +125,13 @@ static void test_WNetGetRemoteName(void) +@@ -127,13 +125,12 @@ static void test_WNetGetRemoteName(void) ret = WNetGetUniversalNameA(driveA, REMOTE_NAME_INFO_LEVEL, NULL, &info_size); -- todo_wine{ - if(((GetVersion() & 0x8000ffff) == 0x00000004) || /* NT40 */ - (drive_type == DRIVE_REMOTE)) +- todo_wine { + if(drive_type == DRIVE_REMOTE) + todo_wine ok(ret == WN_BAD_POINTER, "WNetGetUniversalNameA failed: %08x\n", ret); else ok(ret == WN_NOT_CONNECTED || ret == WN_BAD_VALUE, -- "(%s) WNetGetUniversalNameA gave wrong error: %u\n", driveA, ret); } -+ "(%s) WNetGetUniversalNameA gave wrong error: %u\n", driveA, ret); + "(%s) WNetGetUniversalNameA gave wrong error: %u\n", driveA, ret); +- } fail_size = sizeof(driveA) / sizeof(char) - 1; ret = WNetGetUniversalNameA(driveA, REMOTE_NAME_INFO_LEVEL, diff --git a/dlls/mpr/wnet.c b/dlls/mpr/wnet.c -index 0d4209c..5973089 100644 +index cbbc1bdfb04..1514d014e8b 100644 --- a/dlls/mpr/wnet.c +++ b/dlls/mpr/wnet.c -@@ -2111,7 +2111,7 @@ DWORD WINAPI WNetGetUniversalNameA ( LPCSTR lpLocalPath, DWORD dwInfoLevel, +@@ -2345,7 +2345,7 @@ DWORD WINAPI WNetGetUniversalNameA ( LPCSTR lpLocalPath, DWORD dwInfoLevel, break; } case REMOTE_NAME_INFO_LEVEL: @@ -75,5 +74,5 @@ index 0d4209c..5973089 100644 default: -- -2.8.0 +2.13.1 diff --git a/patches/oleaut32-LoadTypeLibEx/0001-oleaut32-Add-an-arguments-check-to-LoadTypeLibEx.patch b/patches/oleaut32-LoadTypeLibEx/0001-oleaut32-Add-an-arguments-check-to-LoadTypeLibEx.patch deleted file mode 100644 index 69f74c3f..00000000 --- a/patches/oleaut32-LoadTypeLibEx/0001-oleaut32-Add-an-arguments-check-to-LoadTypeLibEx.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 7f6dd6cba12884b026a3aafce30173341d2f610b Mon Sep 17 00:00:00 2001 -From: Dmitry Timoshkov -Date: Mon, 7 Nov 2016 19:50:54 +0800 -Subject: oleaut32: Add an arguments check to LoadTypeLibEx. - ---- - dlls/oleaut32/typelib.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c -index e9f1507..b0ae6b6 100644 ---- a/dlls/oleaut32/typelib.c -+++ b/dlls/oleaut32/typelib.c -@@ -482,6 +482,9 @@ HRESULT WINAPI LoadTypeLibEx( - - TRACE("(%s,%d,%p)\n",debugstr_w(szFile), regkind, pptLib); - -+ if (!szFile || !pptLib) -+ return E_INVALIDARG; -+ - *pptLib = NULL; - - res = TLB_ReadTypeLib(szFile, szPath, MAX_PATH + 1, (ITypeLib2**)pptLib); --- -2.9.0 - diff --git a/patches/oleaut32-LoadTypeLibEx/definition b/patches/oleaut32-LoadTypeLibEx/definition deleted file mode 100644 index 80b3af64..00000000 --- a/patches/oleaut32-LoadTypeLibEx/definition +++ /dev/null @@ -1 +0,0 @@ -Fixes: [38328] Add arguments check to LoadTypeLibEx diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 4ff33e46..0e9aa6a0 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -52,7 +52,7 @@ usage() # Get the upstream commit sha upstream_commit() { - echo "e4c9a2ec81b8029876d588e09587db40ab65ee69" + echo "e0e4f9bbcda1243b9317dbfbeeff84a18b4e855c" } # Show version information @@ -292,7 +292,6 @@ patch_enable_all () enable_oleaut32_CreateTypeLib="$1" enable_oleaut32_DispCallFunc="$1" enable_oleaut32_ITypeInfo_fnInvoke="$1" - enable_oleaut32_LoadTypeLibEx="$1" enable_oleaut32_Load_Save_EMF="$1" enable_oleaut32_OLEPictureImpl_SaveAsFile="$1" enable_oleaut32_OleLoadPicture="$1" @@ -1113,9 +1112,6 @@ patch_enable () oleaut32-ITypeInfo_fnInvoke) enable_oleaut32_ITypeInfo_fnInvoke="$2" ;; - oleaut32-LoadTypeLibEx) - enable_oleaut32_LoadTypeLibEx="$2" - ;; oleaut32-Load_Save_EMF) enable_oleaut32_Load_Save_EMF="$2" ;; @@ -6537,21 +6533,6 @@ if test "$enable_oleaut32_ITypeInfo_fnInvoke" -eq 1; then ) >> "$patchlist" fi -# Patchset oleaut32-LoadTypeLibEx -# | -# | This patchset fixes the following Wine bugs: -# | * [#38328] Add arguments check to LoadTypeLibEx -# | -# | Modified files: -# | * dlls/oleaut32/typelib.c -# | -if test "$enable_oleaut32_LoadTypeLibEx" -eq 1; then - patch_apply oleaut32-LoadTypeLibEx/0001-oleaut32-Add-an-arguments-check-to-LoadTypeLibEx.patch - ( - printf '%s\n' '+ { "Dmitry Timoshkov", "oleaut32: Add an arguments check to LoadTypeLibEx.", 1 },'; - ) >> "$patchlist" -fi - # Patchset oleaut32-Load_Save_EMF # | # | This patchset fixes the following Wine bugs: @@ -8968,7 +8949,6 @@ if test "$enable_wined3d_CSMT_Main" -eq 1; then 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: Don'\''t call glFinish before swapping.", 1 },'; - printf '%s\n' '+ { "Sebastian Lackner", "wined3d: Use priority queue for update_sub_resource.", 1 },'; printf '%s\n' '+ { "Sebastian Lackner", "wined3d: Reset context before destruction.", 1 },'; printf '%s\n' '+ { "Michael Müller", "wined3d: Improve wined3d_cs_emit_update_sub_resource.", 1 },'; printf '%s\n' '+ { "Michael Müller", "wined3d: Discard buffer during upload when replacing complete content.", 1 },'; diff --git a/patches/wined3d-CSMT_Main/0039-wined3d-Use-priority-queue-for-update_sub_resource.patch b/patches/wined3d-CSMT_Main/0039-wined3d-Use-priority-queue-for-update_sub_resource.patch deleted file mode 100644 index e79845cf..00000000 --- a/patches/wined3d-CSMT_Main/0039-wined3d-Use-priority-queue-for-update_sub_resource.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 606dbb843b9fc141ba8c904798d542696d82af32 Mon Sep 17 00:00:00 2001 -From: Sebastian Lackner -Date: Sun, 12 Feb 2017 00:08:28 +0100 -Subject: wined3d: Use priority queue for update_sub_resource. - ---- - dlls/wined3d/cs.c | 6 +++--- - dlls/wined3d/device.c | 2 ++ - 2 files changed, 5 insertions(+), 3 deletions(-) - -diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c -index 6bd6f3ed056..b20008d55e7 100644 ---- a/dlls/wined3d/cs.c -+++ b/dlls/wined3d/cs.c -@@ -2139,7 +2139,7 @@ void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_r - { - struct wined3d_cs_update_sub_resource *op; - -- op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT); -+ op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_MAP); - op->opcode = WINED3D_CS_OP_UPDATE_SUB_RESOURCE; - op->resource = resource; - op->sub_resource_idx = sub_resource_idx; -@@ -2150,10 +2150,10 @@ void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_r - - wined3d_resource_acquire(resource); - -- cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT); -+ cs->ops->submit(cs, WINED3D_CS_QUEUE_MAP); - /* The data pointer may go away, so we need to wait until it is read. - * Copying the data may be faster if it's small. */ -- cs->ops->finish(cs, WINED3D_CS_QUEUE_DEFAULT); -+ cs->ops->finish(cs, WINED3D_CS_QUEUE_MAP); - } - - static void wined3d_cs_exec_add_dirty_texture_region(struct wined3d_cs *cs, const void *data) -diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c -index d3b9a1b55b1..24bc2ba54b2 100644 ---- a/dlls/wined3d/device.c -+++ b/dlls/wined3d/device.c -@@ -4297,6 +4297,8 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str - TRACE("device %p, resource %p, sub_resource_idx %u, box %s, data %p, row_pitch %u, depth_pitch %u.\n", - device, resource, sub_resource_idx, debug_box(box), data, row_pitch, depth_pitch); - -+ wined3d_resource_wait_idle(resource); -+ - if (resource->type == WINED3D_RTYPE_BUFFER) - { - if (sub_resource_idx > 0) --- -2.12.2 - diff --git a/patches/wined3d-CSMT_Main/0045-wined3d-Improve-wined3d_cs_emit_update_sub_resource.patch b/patches/wined3d-CSMT_Main/0045-wined3d-Improve-wined3d_cs_emit_update_sub_resource.patch index 0bc9202b..d6d43baf 100644 --- a/patches/wined3d-CSMT_Main/0045-wined3d-Improve-wined3d_cs_emit_update_sub_resource.patch +++ b/patches/wined3d-CSMT_Main/0045-wined3d-Improve-wined3d_cs_emit_update_sub_resource.patch @@ -1,4 +1,4 @@ -From 0960e201efd83f9ca6d8d2cf3d93760e3b7b84a2 Mon Sep 17 00:00:00 2001 +From 28bce0d64734c37b48c470b5fb16cf383d8e25be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Mon, 20 Feb 2017 00:27:25 +0100 Subject: wined3d: Improve wined3d_cs_emit_update_sub_resource. @@ -146,23 +146,23 @@ index b8bad5bc91b..5e365a37d93 100644 wined3d_cs_mt_submit, wined3d_cs_mt_finish, diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c -index 11a348b7a55..208a10c92f9 100644 +index b165543cc5c..208a10c92f9 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c -@@ -4222,8 +4222,6 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str - TRACE("device %p, resource %p, sub_resource_idx %u, box %s, data %p, row_pitch %u, depth_pitch %u.\n", - device, resource, sub_resource_idx, debug_box(box), data, row_pitch, depth_pitch); +@@ -4270,8 +4270,6 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str + return; + } - wined3d_resource_wait_idle(resource); - - if (resource->type == WINED3D_RTYPE_BUFFER) - { - if (sub_resource_idx > 0) + wined3d_cs_emit_update_sub_resource(device->cs, resource, sub_resource_idx, box, data, row_pitch, depth_pitch); + } + diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h -index a80e88424f5..1c9f290f847 100644 +index 8675eda180d..038699fe91d 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h -@@ -3390,6 +3390,7 @@ struct wined3d_cs_queue +@@ -3391,6 +3391,7 @@ struct wined3d_cs_queue struct wined3d_cs_ops { @@ -171,5 +171,5 @@ index a80e88424f5..1c9f290f847 100644 void (*submit)(struct wined3d_cs *cs, enum wined3d_cs_queue_id queue_id); void (*finish)(struct wined3d_cs *cs, enum wined3d_cs_queue_id queue_id); -- -2.13.0 +2.13.1 diff --git a/patches/wined3d-CSMT_Main/9999-IfDefined.patch b/patches/wined3d-CSMT_Main/9999-IfDefined.patch index f33fc69d..03da879f 100644 --- a/patches/wined3d-CSMT_Main/9999-IfDefined.patch +++ b/patches/wined3d-CSMT_Main/9999-IfDefined.patch @@ -47,14 +47,11 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c }; struct wined3d_cs_add_dirty_texture_region -@@ -2138,22 +2141,80 @@ void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_r +@@ -2138,6 +2141,53 @@ void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_r unsigned int slice_pitch) { struct wined3d_cs_update_sub_resource *op; -+#if !defined(STAGING_CSMT) - - op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT); -+#else /* STAGING_CSMT */ ++#if defined(STAGING_CSMT) + size_t data_size, size; + + if (resource->type != WINED3D_RTYPE_BUFFER && resource->format_flags & WINED3DFMT_FLAG_BLOCKS) @@ -84,51 +81,38 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c + goto no_async; + + op = cs->ops->require_space(cs, size, WINED3D_CS_QUEUE_DEFAULT); -+#endif /* STAGING_CSMT */ - op->opcode = WINED3D_CS_OP_UPDATE_SUB_RESOURCE; - op->resource = resource; - op->sub_resource_idx = sub_resource_idx; - op->box = *box; - op->data.row_pitch = row_pitch; - op->data.slice_pitch = slice_pitch; -+#if !defined(STAGING_CSMT) - op->data.data = data; -+#else /* STAGING_CSMT */ -+ op->data.data = op->copy_data; -+ memcpy(op->copy_data, data, data_size); -+#endif /* STAGING_CSMT */ - - wined3d_resource_acquire(resource); - - cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT); -+#if !defined(STAGING_CSMT) - /* The data pointer may go away, so we need to wait until it is read. - * Copying the data may be faster if it's small. */ - cs->ops->finish(cs, WINED3D_CS_QUEUE_DEFAULT); -+#else /* STAGING_CSMT */ -+ return; -+ -+no_async: -+ wined3d_resource_wait_idle(resource); -+ -+ op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_MAP); + op->opcode = WINED3D_CS_OP_UPDATE_SUB_RESOURCE; + op->resource = resource; + op->sub_resource_idx = sub_resource_idx; + op->box = *box; + op->data.row_pitch = row_pitch; + op->data.slice_pitch = slice_pitch; -+ op->data.data = data; ++ op->data.data = op->copy_data; ++ memcpy(op->copy_data, data, data_size); + + wined3d_resource_acquire(resource); + -+ cs->ops->submit(cs, WINED3D_CS_QUEUE_MAP); -+ cs->ops->finish(cs, WINED3D_CS_QUEUE_MAP); ++ cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT); ++ return; ++ ++no_async: ++ wined3d_resource_wait_idle(resource); +#endif /* STAGING_CSMT */ + + op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_MAP); + op->opcode = WINED3D_CS_OP_UPDATE_SUB_RESOURCE; +@@ -2151,8 +2201,10 @@ void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_r + wined3d_resource_acquire(resource); + + cs->ops->submit(cs, WINED3D_CS_QUEUE_MAP); ++#if !defined(STAGING_CSMT) + /* The data pointer may go away, so we need to wait until it is read. + * Copying the data may be faster if it's small. */ ++#endif /* STAGING_CSMT */ + cs->ops->finish(cs, WINED3D_CS_QUEUE_MAP); } - static void wined3d_cs_exec_add_dirty_texture_region(struct wined3d_cs *cs, const void *data) -@@ -2279,6 +2340,13 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void +@@ -2279,6 +2331,13 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void /* WINED3D_CS_OP_CLEAR_UNORDERED_ACCESS_VIEW */ wined3d_cs_exec_clear_unordered_access_view, }; @@ -142,7 +126,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c static void *wined3d_cs_st_require_space(struct wined3d_cs *cs, size_t size, enum wined3d_cs_queue_id queue_id) { if (size > (cs->data_size - cs->end)) -@@ -2332,6 +2400,9 @@ static void wined3d_cs_st_finish(struct wined3d_cs *cs, enum wined3d_cs_queue_id +@@ -2332,6 +2391,9 @@ static void wined3d_cs_st_finish(struct wined3d_cs *cs, enum wined3d_cs_queue_id static const struct wined3d_cs_ops wined3d_cs_st_ops = { @@ -152,7 +136,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c wined3d_cs_st_require_space, wined3d_cs_st_submit, wined3d_cs_st_finish, -@@ -2364,6 +2435,21 @@ static void wined3d_cs_mt_submit(struct wined3d_cs *cs, enum wined3d_cs_queue_id +@@ -2364,6 +2426,21 @@ static void wined3d_cs_mt_submit(struct wined3d_cs *cs, enum wined3d_cs_queue_id wined3d_cs_queue_submit(&cs->queue[queue_id], cs); } @@ -174,7 +158,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c static void *wined3d_cs_queue_require_space(struct wined3d_cs_queue *queue, size_t size, struct wined3d_cs *cs) { size_t queue_size = ARRAY_SIZE(queue->data); -@@ -2425,6 +2511,16 @@ static void *wined3d_cs_queue_require_space(struct wined3d_cs_queue *queue, size +@@ -2425,6 +2502,16 @@ static void *wined3d_cs_queue_require_space(struct wined3d_cs_queue *queue, size return packet->data; } @@ -191,7 +175,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c static void *wined3d_cs_mt_require_space(struct wined3d_cs *cs, size_t size, enum wined3d_cs_queue_id queue_id) { if (cs->thread_id == GetCurrentThreadId()) -@@ -2444,6 +2540,9 @@ static void wined3d_cs_mt_finish(struct wined3d_cs *cs, enum wined3d_cs_queue_id +@@ -2444,6 +2531,9 @@ static void wined3d_cs_mt_finish(struct wined3d_cs *cs, enum wined3d_cs_queue_id static const struct wined3d_cs_ops wined3d_cs_mt_ops = { @@ -242,7 +226,18 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c } if (!src_box) -@@ -5216,3 +5233,58 @@ LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL +@@ -4268,8 +4285,10 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str + return; + } + ++#if !defined(STAGING_CSMT) + wined3d_resource_wait_idle(resource); + ++#endif /* STAGING_CSMT */ + wined3d_cs_emit_update_sub_resource(device->cs, resource, sub_resource_idx, box, data, row_pitch, depth_pitch); + } + +@@ -5218,3 +5237,58 @@ LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL else return CallWindowProcA(proc, window, message, wparam, lparam); }