From 48c78157aeba450642cac1df6b736b52598ed0ea Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Thu, 8 Oct 2015 00:28:48 +0200 Subject: [PATCH] Rebase against 20ff3352eb19292d47eaa8f3aecc61523ac1f1d9. --- README.md | 2 +- debian/changelog | 2 + patches/patchinstall.sh | 32 +--- ...wbemprox-Set-bios-name-in-Win32_BIOS.patch | 52 ----- patches/wbemprox-Bios_Name/definition | 1 - ...e-helper-functions-for-mapping-volum.patch | 16 +- ...ume-PBO-infrastructure-into-the-reso.patch | 26 +-- ...ove-most-of-volume_map-to-resource.c.patch | 19 +- .../wined3d-CSMT_Main/9999-IfDefined.patch | 181 ++++++++---------- ...001-ws2_32-Add-stub-for-TransmitFile.patch | 46 ----- ...a-basic-synchronous-TransmitFile.-r.patch} | 0 ...t-for-TransmitFile-headers-and-foot.patch} | 0 ...r-invalid-parameters-in-TransmitFile.patch | 168 ---------------- ...ronous-support-for-TransmitFile.-re.patch} | 0 ...t-for-TF_DISCONNECT-to-TransmitFile.patch} | 0 ...t-for-TF_REUSE_SOCKET-to-TransmitFi.patch} | 0 16 files changed, 122 insertions(+), 423 deletions(-) delete mode 100644 patches/wbemprox-Bios_Name/0001-wbemprox-Set-bios-name-in-Win32_BIOS.patch delete mode 100644 patches/wbemprox-Bios_Name/definition delete mode 100644 patches/ws2_32-TransmitFile/0001-ws2_32-Add-stub-for-TransmitFile.patch rename patches/ws2_32-TransmitFile/{0003-ws2_32-Implement-a-basic-synchronous-TransmitFile.-r.patch => 0001-ws2_32-Implement-a-basic-synchronous-TransmitFile.-r.patch} (100%) rename patches/ws2_32-TransmitFile/{0004-ws2_32-Add-support-for-TransmitFile-headers-and-foot.patch => 0002-ws2_32-Add-support-for-TransmitFile-headers-and-foot.patch} (100%) delete mode 100644 patches/ws2_32-TransmitFile/0002-ws2_32-Check-for-invalid-parameters-in-TransmitFile.patch rename patches/ws2_32-TransmitFile/{0005-ws2_32-Add-asynchronous-support-for-TransmitFile.-re.patch => 0003-ws2_32-Add-asynchronous-support-for-TransmitFile.-re.patch} (100%) rename patches/ws2_32-TransmitFile/{0006-ws2_32-Add-support-for-TF_DISCONNECT-to-TransmitFile.patch => 0004-ws2_32-Add-support-for-TF_DISCONNECT-to-TransmitFile.patch} (100%) rename patches/ws2_32-TransmitFile/{0007-ws2_32-Add-support-for-TF_REUSE_SOCKET-to-TransmitFi.patch => 0005-ws2_32-Add-support-for-TF_REUSE_SOCKET-to-TransmitFi.patch} (100%) diff --git a/README.md b/README.md index d058ec96..2b6f9376 100644 --- a/README.md +++ b/README.md @@ -244,7 +244,7 @@ for more details.* * ~~RegOpenKeyExA, RegCloseKey and RegQueryValueExA should be hotpatchable~~ * Report correct ObjectName for NamedPipe wineserver objects * Return STATUS_INVALID_DEVICE_REQUEST when trying to call NtReadFile on directory -* Return a dummy BIOS name in Win32_BIOS record +* ~~Return a dummy BIOS name in Win32_BIOS record~~ * Return a valid mesh in D3DXCreateTeapot ([Wine Bug #36884](https://bugs.winehq.org/show_bug.cgi?id=36884)) * Return an error when trying to open a terminated process ([Wine Bug #37087](https://bugs.winehq.org/show_bug.cgi?id=37087)) * Return correct IMediaSeeking stream positions in quartz diff --git a/debian/changelog b/debian/changelog index 0a6722c8..8558952e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -20,6 +20,8 @@ wine-staging (1.7.53) UNRELEASED; urgency=low (fixed upstream). * Removed patch to add support for /passive command line option to msiexec (fixed upstream). + * Removed patch to return a dummy BIOS name in Win32_BIOS (accepted upstream). + * Partially removed patches for ws2_32 TransmitFile (accepted upstream). -- Sebastian Lackner Sun, 04 Oct 2015 23:56:05 +0200 wine-staging (1.7.52) unstable; urgency=low diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index f8000066..d48cda6d 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -52,7 +52,7 @@ usage() # Get the upstream commit sha upstream_commit() { - echo "1d1487105d4d3a9133f0846d32363a0432812d0c" + echo "20ff3352eb19292d47eaa8f3aecc61523ac1f1d9" } # Show version information @@ -280,7 +280,6 @@ patch_enable_all () enable_uxtheme_GTK_Theming="$1" enable_version_VerQueryValue="$1" enable_wbemdisp_ISWbemSecurity="$1" - enable_wbemprox_Bios_Name="$1" enable_wiaservc_IEnumWIA_DEV_INFO="$1" enable_wine_inf_Performance="$1" enable_wine_inf_ProfileList_UserSID="$1" @@ -936,9 +935,6 @@ patch_enable () wbemdisp-ISWbemSecurity) enable_wbemdisp_ISWbemSecurity="$2" ;; - wbemprox-Bios_Name) - enable_wbemprox_Bios_Name="$2" - ;; wiaservc-IEnumWIA_DEV_INFO) enable_wiaservc_IEnumWIA_DEV_INFO="$2" ;; @@ -5439,18 +5435,6 @@ if test "$enable_wbemdisp_ISWbemSecurity" -eq 1; then ) >> "$patchlist" fi -# Patchset wbemprox-Bios_Name -# | -# | Modified files: -# | * dlls/wbemprox/builtin.c -# | -if test "$enable_wbemprox_Bios_Name" -eq 1; then - patch_apply wbemprox-Bios_Name/0001-wbemprox-Set-bios-name-in-Win32_BIOS.patch - ( - echo '+ { "Michael Müller", "wbemprox: Set bios name in Win32_BIOS.", 1 },'; - ) >> "$patchlist" -fi - # Patchset wiaservc-IEnumWIA_DEV_INFO # | # | This patchset fixes the following Wine bugs: @@ -6474,16 +6458,12 @@ fi # | * dlls/ws2_32/socket.c, dlls/ws2_32/tests/sock.c, include/winsock.h, server/protocol.def, server/sock.c # | if test "$enable_ws2_32_TransmitFile" -eq 1; then - patch_apply ws2_32-TransmitFile/0001-ws2_32-Add-stub-for-TransmitFile.patch - patch_apply ws2_32-TransmitFile/0002-ws2_32-Check-for-invalid-parameters-in-TransmitFile.patch - patch_apply ws2_32-TransmitFile/0003-ws2_32-Implement-a-basic-synchronous-TransmitFile.-r.patch - patch_apply ws2_32-TransmitFile/0004-ws2_32-Add-support-for-TransmitFile-headers-and-foot.patch - patch_apply ws2_32-TransmitFile/0005-ws2_32-Add-asynchronous-support-for-TransmitFile.-re.patch - patch_apply ws2_32-TransmitFile/0006-ws2_32-Add-support-for-TF_DISCONNECT-to-TransmitFile.patch - patch_apply ws2_32-TransmitFile/0007-ws2_32-Add-support-for-TF_REUSE_SOCKET-to-TransmitFi.patch + patch_apply ws2_32-TransmitFile/0001-ws2_32-Implement-a-basic-synchronous-TransmitFile.-r.patch + patch_apply ws2_32-TransmitFile/0002-ws2_32-Add-support-for-TransmitFile-headers-and-foot.patch + patch_apply ws2_32-TransmitFile/0003-ws2_32-Add-asynchronous-support-for-TransmitFile.-re.patch + patch_apply ws2_32-TransmitFile/0004-ws2_32-Add-support-for-TF_DISCONNECT-to-TransmitFile.patch + patch_apply ws2_32-TransmitFile/0005-ws2_32-Add-support-for-TF_REUSE_SOCKET-to-TransmitFi.patch ( - echo '+ { "Erich E. Hoover", "ws2_32: Add stub for TransmitFile.", 1 },'; - echo '+ { "Erich E. Hoover", "ws2_32: Check for invalid parameters in TransmitFile.", 1 },'; echo '+ { "Erich E. Hoover", "ws2_32: Implement a basic synchronous TransmitFile.", 2 },'; echo '+ { "Erich E. Hoover", "ws2_32: Add support for TransmitFile headers and footers.", 1 },'; echo '+ { "Erich E. Hoover", "ws2_32: Add asynchronous support for TransmitFile.", 2 },'; diff --git a/patches/wbemprox-Bios_Name/0001-wbemprox-Set-bios-name-in-Win32_BIOS.patch b/patches/wbemprox-Bios_Name/0001-wbemprox-Set-bios-name-in-Win32_BIOS.patch deleted file mode 100644 index 99ed942a..00000000 --- a/patches/wbemprox-Bios_Name/0001-wbemprox-Set-bios-name-in-Win32_BIOS.patch +++ /dev/null @@ -1,52 +0,0 @@ -From d72d7f4a70a9715458b4cbd60c5a951e74770448 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Michael=20M=C3=BCller?= -Date: Thu, 27 Aug 2015 01:55:42 +0200 -Subject: wbemprox: Set bios name in Win32_BIOS. - ---- - dlls/wbemprox/builtin.c | 8 ++++++-- - 1 file changed, 6 insertions(+), 2 deletions(-) - -diff --git a/dlls/wbemprox/builtin.c b/dlls/wbemprox/builtin.c -index 1c960eb..8f51453 100644 ---- a/dlls/wbemprox/builtin.c -+++ b/dlls/wbemprox/builtin.c -@@ -377,7 +377,8 @@ static const struct column col_bios[] = - { prop_releasedateW, CIM_DATETIME }, - { prop_serialnumberW, CIM_STRING }, - { prop_smbiosbiosversionW, CIM_STRING }, -- { prop_versionW, CIM_STRING|COL_FLAG_KEY } -+ { prop_versionW, CIM_STRING|COL_FLAG_KEY }, -+ { prop_nameW, CIM_STRING } - }; - static const struct column col_cdromdrive[] = - { -@@ -666,6 +667,8 @@ static const WCHAR bios_smbiosbiosversionW[] = - {'W','i','n','e',0}; - static const WCHAR bios_versionW[] = - {'W','I','N','E',' ',' ',' ','-',' ','1',0}; -+static const WCHAR bios_nameW[] = -+ {'W','I','N','E',' ','B','I','O','S',0}; - static const WCHAR cdromdrive_mediatypeW[] = - {'C','D','-','R','O','M',0}; - static const WCHAR cdromdrive_nameW[] = -@@ -765,6 +768,7 @@ struct record_bios - const WCHAR *serialnumber; - const WCHAR *smbiosbiosversion; - const WCHAR *version; -+ const WCHAR *name; - }; - struct record_cdromdrive - { -@@ -1041,7 +1045,7 @@ static const struct record_baseboard data_baseboard[] = - static const struct record_bios data_bios[] = - { - { bios_descriptionW, bios_descriptionW, bios_manufacturerW, bios_releasedateW, bios_serialnumberW, -- bios_smbiosbiosversionW, bios_versionW } -+ bios_smbiosbiosversionW, bios_versionW, bios_nameW } - }; - static const struct record_computersystemproduct data_compsysproduct[] = - { --- -2.5.0 - diff --git a/patches/wbemprox-Bios_Name/definition b/patches/wbemprox-Bios_Name/definition deleted file mode 100644 index 9755019b..00000000 --- a/patches/wbemprox-Bios_Name/definition +++ /dev/null @@ -1 +0,0 @@ -Fixes: Return a dummy BIOS name in Win32_BIOS record diff --git a/patches/wined3d-CSMT_Main/0020-wined3d-Introduce-helper-functions-for-mapping-volum.patch b/patches/wined3d-CSMT_Main/0020-wined3d-Introduce-helper-functions-for-mapping-volum.patch index ec542db2..facd707b 100644 --- a/patches/wined3d-CSMT_Main/0020-wined3d-Introduce-helper-functions-for-mapping-volum.patch +++ b/patches/wined3d-CSMT_Main/0020-wined3d-Introduce-helper-functions-for-mapping-volum.patch @@ -1,4 +1,4 @@ -From e714feefbc666c34518c908acbc630e9a9f0b48e Mon Sep 17 00:00:00 2001 +From e45dcebaee1ba3235293c0f84550effd5b445d94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20D=C3=B6singer?= Date: Wed, 18 Sep 2013 22:30:57 +0200 Subject: wined3d: Introduce helper functions for mapping volumes. @@ -8,10 +8,10 @@ Subject: wined3d: Introduce helper functions for mapping volumes. 1 file changed, 96 insertions(+), 61 deletions(-) diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c -index f82347d..17502ee 100644 +index 5d32043..b86b227 100644 --- a/dlls/wined3d/volume.c +++ b/dlls/wined3d/volume.c -@@ -480,12 +480,67 @@ static BOOL wined3d_volume_check_box_dimensions(const struct wined3d_volume *vol +@@ -468,12 +468,67 @@ static BOOL wined3d_volume_check_box_dimensions(const struct wined3d_volume *vol return TRUE; } @@ -80,7 +80,7 @@ index f82347d..17502ee 100644 BYTE *base_memory; const struct wined3d_format *format = volume->resource.format; const unsigned int fmt_flags = volume->container->resource.format_flags; -@@ -518,58 +573,22 @@ HRESULT CDECL wined3d_volume_map(struct wined3d_volume *volume, +@@ -506,58 +561,22 @@ HRESULT CDECL wined3d_volume_map(struct wined3d_volume *volume, flags = wined3d_resource_sanitize_map_flags(&volume->resource, flags); @@ -150,8 +150,8 @@ index f82347d..17502ee 100644 TRACE("Base memory pointer %p.\n", base_memory); -@@ -627,8 +646,34 @@ struct wined3d_volume * CDECL wined3d_volume_from_resource(struct wined3d_resour - return volume_from_resource(resource); +@@ -610,8 +629,34 @@ HRESULT CDECL wined3d_volume_map(struct wined3d_volume *volume, + return WINED3D_OK; } +static void wined3d_volume_release_map_ptr(const struct wined3d_volume *volume, @@ -185,7 +185,7 @@ index f82347d..17502ee 100644 TRACE("volume %p.\n", volume); if (!volume->resource.map_count) -@@ -637,19 +682,9 @@ HRESULT CDECL wined3d_volume_unmap(struct wined3d_volume *volume) +@@ -620,19 +665,9 @@ HRESULT CDECL wined3d_volume_unmap(struct wined3d_volume *volume) return WINED3DERR_INVALIDCALL; } @@ -209,5 +209,5 @@ index f82347d..17502ee 100644 volume->resource.map_count--; -- -2.4.2 +2.6.0 diff --git a/patches/wined3d-CSMT_Main/0021-wined3d-Move-volume-PBO-infrastructure-into-the-reso.patch b/patches/wined3d-CSMT_Main/0021-wined3d-Move-volume-PBO-infrastructure-into-the-reso.patch index 032a6c80..44b1de07 100644 --- a/patches/wined3d-CSMT_Main/0021-wined3d-Move-volume-PBO-infrastructure-into-the-reso.patch +++ b/patches/wined3d-CSMT_Main/0021-wined3d-Move-volume-PBO-infrastructure-into-the-reso.patch @@ -1,4 +1,4 @@ -From 8d5263c4675ba0456a486cba995fa6e41f056aa2 Mon Sep 17 00:00:00 2001 +From 512672b57e21aab944955cf738f8285d91369604 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20D=C3=B6singer?= Date: Thu, 16 Jan 2014 22:07:17 +0100 Subject: wined3d: Move volume PBO infrastructure into the resource. @@ -10,7 +10,7 @@ Subject: wined3d: Move volume PBO infrastructure into the resource. 3 files changed, 83 insertions(+), 80 deletions(-) diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c -index 9ec6a6a..c652c99 100644 +index 39df397..5f0a98e 100644 --- a/dlls/wined3d/resource.c +++ b/dlls/wined3d/resource.c @@ -373,7 +373,7 @@ GLbitfield wined3d_resource_gl_map_flags(DWORD d3d_flags) @@ -89,7 +89,7 @@ index 9ec6a6a..c652c99 100644 + } +} diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c -index 17502ee..ea54b97 100644 +index b86b227..d196b0e 100644 --- a/dlls/wined3d/volume.c +++ b/dlls/wined3d/volume.c @@ -218,7 +218,7 @@ static void wined3d_volume_load_location(struct wined3d_resource *resource, @@ -173,7 +173,7 @@ index 17502ee..ea54b97 100644 { /* Should not happen because only dynamic default pool volumes * have a buffer, and those are not evicted by device_evit_managed_resources -@@ -498,44 +498,6 @@ static BOOL wined3d_volume_prepare_map_memory(struct wined3d_volume *volume, str +@@ -486,44 +486,6 @@ static BOOL wined3d_volume_prepare_map_memory(struct wined3d_volume *volume, str } } @@ -218,7 +218,7 @@ index 17502ee..ea54b97 100644 HRESULT CDECL wined3d_volume_map(struct wined3d_volume *volume, struct wined3d_map_desc *map_desc, const struct wined3d_box *box, DWORD flags) { -@@ -587,7 +549,7 @@ HRESULT CDECL wined3d_volume_map(struct wined3d_volume *volume, +@@ -575,7 +537,7 @@ HRESULT CDECL wined3d_volume_map(struct wined3d_volume *volume, else wined3d_resource_load_location(&volume->resource, context, volume->resource.map_binding); @@ -227,8 +227,8 @@ index 17502ee..ea54b97 100644 context_release(context); TRACE("Base memory pointer %p.\n", base_memory); -@@ -646,30 +608,6 @@ struct wined3d_volume * CDECL wined3d_volume_from_resource(struct wined3d_resour - return volume_from_resource(resource); +@@ -629,30 +591,6 @@ HRESULT CDECL wined3d_volume_map(struct wined3d_volume *volume, + return WINED3D_OK; } -static void wined3d_volume_release_map_ptr(const struct wined3d_volume *volume, @@ -258,7 +258,7 @@ index 17502ee..ea54b97 100644 HRESULT CDECL wined3d_volume_unmap(struct wined3d_volume *volume) { struct wined3d_device *device = volume->resource.device; -@@ -683,7 +621,7 @@ HRESULT CDECL wined3d_volume_unmap(struct wined3d_volume *volume) +@@ -666,7 +604,7 @@ HRESULT CDECL wined3d_volume_unmap(struct wined3d_volume *volume) } context = context_acquire(device, NULL); @@ -268,10 +268,10 @@ index 17502ee..ea54b97 100644 volume->resource.map_count--; diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h -index ece63d0..1710b7c 100644 +index eeed387..efd865b 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h -@@ -2168,6 +2168,7 @@ struct wined3d_resource +@@ -2174,6 +2174,7 @@ struct wined3d_resource DWORD priority; void *heap_memory, *user_memory, *bitmap_data; UINT custom_row_pitch, custom_slice_pitch; @@ -279,7 +279,7 @@ index ece63d0..1710b7c 100644 struct list resource_list_entry; DWORD locations; -@@ -2197,14 +2198,17 @@ void resource_unload(struct wined3d_resource *resource) DECLSPEC_HIDDEN; +@@ -2203,14 +2204,17 @@ void resource_unload(struct wined3d_resource *resource) DECLSPEC_HIDDEN; DWORD wined3d_resource_access_from_location(DWORD location) DECLSPEC_HIDDEN; BOOL wined3d_resource_allocate_sysmem(struct wined3d_resource *resource) DECLSPEC_HIDDEN; void wined3d_resource_free_sysmem(struct wined3d_resource *resource) DECLSPEC_HIDDEN; @@ -298,7 +298,7 @@ index ece63d0..1710b7c 100644 DWORD wined3d_resource_sanitize_map_flags(const struct wined3d_resource *resource, DWORD flags) DECLSPEC_HIDDEN; void wined3d_resource_update_draw_binding(struct wined3d_resource *resource) DECLSPEC_HIDDEN; void wined3d_resource_validate_location(struct wined3d_resource *resource, DWORD location) DECLSPEC_HIDDEN; -@@ -2328,7 +2332,6 @@ struct wined3d_volume +@@ -2337,7 +2341,6 @@ struct wined3d_volume DWORD flags; GLint texture_level; DWORD download_count; @@ -307,5 +307,5 @@ index ece63d0..1710b7c 100644 static inline struct wined3d_volume *volume_from_resource(struct wined3d_resource *resource) -- -2.5.1 +2.6.0 diff --git a/patches/wined3d-CSMT_Main/0039-wined3d-Move-most-of-volume_map-to-resource.c.patch b/patches/wined3d-CSMT_Main/0039-wined3d-Move-most-of-volume_map-to-resource.c.patch index 21cc256b..85a96254 100644 --- a/patches/wined3d-CSMT_Main/0039-wined3d-Move-most-of-volume_map-to-resource.c.patch +++ b/patches/wined3d-CSMT_Main/0039-wined3d-Move-most-of-volume_map-to-resource.c.patch @@ -1,4 +1,4 @@ -From 6ec55bf77d18523e178ca2e35553693c754827d5 Mon Sep 17 00:00:00 2001 +From 2faccff39a75dfddd6aa22f3211d6ca12a4b3555 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20D=C3=B6singer?= Date: Thu, 19 Sep 2013 17:51:38 +0200 Subject: wined3d: Move most of volume_map to resource.c @@ -13,7 +13,7 @@ boundary check behaviours. 3 files changed, 124 insertions(+), 95 deletions(-) diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c -index ab83637..8ab137d 100644 +index 2e06f21..e5af445 100644 --- a/dlls/wined3d/resource.c +++ b/dlls/wined3d/resource.c @@ -765,3 +765,118 @@ BOOL wined3d_resource_check_block_align(const struct wined3d_resource *resource, @@ -136,10 +136,10 @@ index ab83637..8ab137d 100644 + return WINED3D_OK; +} diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c -index 6b17044..983ae90 100644 +index 0827c74..0a1df4b 100644 --- a/dlls/wined3d/volume.c +++ b/dlls/wined3d/volume.c -@@ -404,26 +404,16 @@ static BOOL wined3d_volume_check_box_dimensions(const struct wined3d_volume *vol +@@ -392,26 +392,16 @@ static BOOL wined3d_volume_check_box_dimensions(const struct wined3d_volume *vol HRESULT CDECL wined3d_volume_map(struct wined3d_volume *volume, struct wined3d_map_desc *map_desc, const struct wined3d_box *box, DWORD flags) { @@ -167,7 +167,7 @@ index 6b17044..983ae90 100644 if (!wined3d_volume_check_box_dimensions(volume, box)) { WARN("Map box is invalid.\n"); -@@ -436,74 +426,11 @@ HRESULT CDECL wined3d_volume_map(struct wined3d_volume *volume, +@@ -424,95 +414,16 @@ HRESULT CDECL wined3d_volume_map(struct wined3d_volume *volume, return WINED3DERR_INVALIDCALL; } @@ -245,9 +245,6 @@ index 6b17044..983ae90 100644 + return hr; } - struct wined3d_volume * CDECL wined3d_volume_from_resource(struct wined3d_resource *resource) -@@ -513,23 +440,7 @@ struct wined3d_volume * CDECL wined3d_volume_from_resource(struct wined3d_resour - HRESULT CDECL wined3d_volume_unmap(struct wined3d_volume *volume) { - struct wined3d_device *device = volume->resource.device; @@ -272,10 +269,10 @@ index 6b17044..983ae90 100644 static ULONG volume_resource_incref(struct wined3d_resource *resource) diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h -index 3dff204..db8126f 100644 +index 91e6db8..c230cb5 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h -@@ -2212,12 +2212,15 @@ void wined3d_resource_invalidate_location(struct wined3d_resource *resource, DWO +@@ -2218,12 +2218,15 @@ void wined3d_resource_invalidate_location(struct wined3d_resource *resource, DWO BOOL wined3d_resource_is_offscreen(struct wined3d_resource *resource) DECLSPEC_HIDDEN; void wined3d_resource_load_location(struct wined3d_resource *resource, struct wined3d_context *context, DWORD location) DECLSPEC_HIDDEN; @@ -292,5 +289,5 @@ index 3dff204..db8126f 100644 void wined3d_resource_validate_location(struct wined3d_resource *resource, DWORD location) DECLSPEC_HIDDEN; -- -2.5.1 +2.6.0 diff --git a/patches/wined3d-CSMT_Main/9999-IfDefined.patch b/patches/wined3d-CSMT_Main/9999-IfDefined.patch index b1d18ee4..4e2a01cd 100644 --- a/patches/wined3d-CSMT_Main/9999-IfDefined.patch +++ b/patches/wined3d-CSMT_Main/9999-IfDefined.patch @@ -876,9 +876,9 @@ diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c HRESULT hr; const struct wined3d_format *format = volume->resource.format; const unsigned int fmt_flags = volume->container->resource.format_flags; -@@ -426,6 +701,148 @@ - return hr; - +@@ -439,6 +714,177 @@ + if (hr == WINEDDERR_NOTLOCKED) + return WINED3DERR_INVALIDCALL; return hr; +#else /* STAGING_CSMT */ + struct wined3d_device *device = volume->resource.device; @@ -1021,23 +1021,10 @@ diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c + map_desc->data, map_desc->row_pitch, map_desc->slice_pitch); + + return WINED3D_OK; -+#endif /* STAGING_CSMT */ - } - - struct wined3d_volume * CDECL wined3d_volume_from_resource(struct wined3d_resource *resource) -@@ -435,6 +852,7 @@ - - HRESULT CDECL wined3d_volume_unmap(struct wined3d_volume *volume) - { -+#if defined(STAGING_CSMT) - HRESULT hr; - - if (volume->resource.unmap_dirtify) -@@ -444,6 +862,33 @@ - if (hr == WINEDDERR_NOTLOCKED) - return WINED3DERR_INVALIDCALL; - return hr; -+#else /* STAGING_CSMT */ ++} ++ ++HRESULT CDECL wined3d_volume_unmap(struct wined3d_volume *volume) ++{ + TRACE("volume %p.\n", volume); + + if (!volume->resource.map_count) @@ -1067,7 +1054,7 @@ diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c } static ULONG volume_resource_incref(struct wined3d_resource *resource) -@@ -456,6 +901,7 @@ +@@ -451,6 +897,7 @@ return wined3d_volume_decref(volume_from_resource(resource)); } @@ -1075,7 +1062,7 @@ diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c static void wined3d_volume_location_invalidated(struct wined3d_resource *resource, DWORD location) { struct wined3d_volume *volume = volume_from_resource(resource); -@@ -471,6 +917,13 @@ +@@ -466,6 +913,13 @@ volume_unload, wined3d_volume_location_invalidated, wined3d_volume_load_location, @@ -1089,7 +1076,7 @@ diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c }; static HRESULT volume_init(struct wined3d_volume *volume, struct wined3d_texture *container, -@@ -502,7 +955,11 @@ +@@ -497,7 +951,11 @@ } volume->texture_level = level; @@ -1101,7 +1088,7 @@ diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c if (desc->pool == WINED3D_POOL_DEFAULT && desc->usage & WINED3DUSAGE_DYNAMIC && gl_info->supported[ARB_PIXEL_BUFFER_OBJECT] -@@ -510,7 +967,9 @@ +@@ -505,7 +963,9 @@ { wined3d_resource_free_sysmem(&volume->resource); volume->resource.map_binding = WINED3D_LOCATION_BUFFER; @@ -1226,7 +1213,7 @@ diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader shader_arb_ps_local_constants(compiled, context, state, rt_height); } -@@ -7849,7 +7857,11 @@ +@@ -7850,7 +7858,11 @@ /* Now load the surface */ if (wined3d_settings.offscreen_rendering_mode != ORM_FBO @@ -1238,7 +1225,7 @@ diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader == WINED3D_LOCATION_DRAWABLE && !wined3d_resource_is_offscreen(&src_surface->container->resource)) { -@@ -7879,6 +7891,7 @@ +@@ -7880,6 +7892,7 @@ /* Leave the opengl state valid for blitting */ arbfp_blit_unset(context->gl_info); @@ -1246,7 +1233,7 @@ diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader if (wined3d_settings.cs_multithreaded) context->gl_info->gl_ops.gl.p_glFinish(); else if (wined3d_settings.strict_draw_ordering -@@ -7890,6 +7903,17 @@ +@@ -7891,6 +7904,17 @@ wined3d_resource_validate_location(&dst_surface->resource, dst_surface->container->resource.draw_binding); wined3d_resource_invalidate_location(&dst_surface->resource, ~dst_surface->container->resource.draw_binding); @@ -1785,7 +1772,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h }; extern struct wined3d_settings wined3d_settings DECLSPEC_HIDDEN; -@@ -1013,9 +1043,14 @@ +@@ -1015,9 +1045,14 @@ WORD use_map; /* MAX_ATTRIBS, 16 */ }; @@ -1800,7 +1787,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h DWORD get_flexible_vertex_size(DWORD d3dvtVertexType) DECLSPEC_HIDDEN; #define eps 1e-8f -@@ -1103,8 +1138,10 @@ +@@ -1105,8 +1140,10 @@ struct list entry; GLuint id; struct wined3d_context *context; @@ -1811,7 +1798,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h }; union wined3d_gl_query_object -@@ -1140,6 +1177,7 @@ +@@ -1142,6 +1179,7 @@ struct list entry; GLuint id; struct wined3d_context *context; @@ -1819,7 +1806,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h UINT64 timestamp; }; -@@ -1175,6 +1213,12 @@ +@@ -1177,6 +1215,12 @@ for (i = 0; i < min(dst->rt_size, src->rt_size); i++) dst->render_targets[i] = src->render_targets[i]; } @@ -1832,7 +1819,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h struct wined3d_context { -@@ -1190,7 +1234,9 @@ +@@ -1192,7 +1236,9 @@ DWORD dirtyArray[STATE_HIGHEST + 1]; /* Won't get bigger than that, a state is never marked dirty 2 times */ DWORD numDirtyEntries; DWORD isStateDirty[STATE_HIGHEST / (sizeof(DWORD) * CHAR_BIT) + 1]; /* Bitmap to find out quickly if a state is dirty */ @@ -1842,7 +1829,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h struct wined3d_swapchain *swapchain; struct wined3d_surface *current_rt; -@@ -1287,8 +1333,17 @@ +@@ -1289,8 +1335,17 @@ GLfloat fog_coord_value; GLfloat color[4], fogstart, fogend, fogcolor[4]; GLuint dummy_arbfp_prog; @@ -1860,7 +1847,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h }; typedef void (*APPLYSTATEFUNC)(struct wined3d_context *ctx, const struct wined3d_state *state, DWORD state_id); -@@ -1428,8 +1483,12 @@ +@@ -1430,8 +1485,12 @@ void context_apply_blit_state(struct wined3d_context *context, const struct wined3d_device *device) DECLSPEC_HIDDEN; BOOL context_apply_clear_state(struct wined3d_context *context, const struct wined3d_device *device, UINT rt_count, const struct wined3d_fb_state *fb) DECLSPEC_HIDDEN; @@ -1873,7 +1860,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h void context_apply_fbo_state_blit(struct wined3d_context *context, GLenum target, struct wined3d_surface *render_target, struct wined3d_surface *depth_stencil, DWORD location) DECLSPEC_HIDDEN; void context_active_texture(struct wined3d_context *context, const struct wined3d_gl_info *gl_info, -@@ -2004,7 +2063,11 @@ +@@ -2009,7 +2068,11 @@ struct wined3d_state { DWORD flags; @@ -1885,7 +1872,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h struct wined3d_vertex_declaration *vertex_declaration; struct wined3d_stream_output stream_output[MAX_STREAM_OUT]; -@@ -2049,6 +2112,7 @@ +@@ -2054,6 +2117,7 @@ DWORD render_states[WINEHIGHEST_RENDER_STATE + 1]; }; @@ -1893,7 +1880,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h struct wined3d_gl_bo { GLuint name; -@@ -2057,6 +2121,7 @@ +@@ -2062,6 +2126,7 @@ UINT size; }; @@ -1901,7 +1888,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h #define WINED3D_UNMAPPED_STAGE ~0U /* Multithreaded flag. Removed from the public header to signal that -@@ -2112,11 +2177,23 @@ +@@ -2117,11 +2182,23 @@ struct wined3d_rendertarget_view *back_buffer_view; struct wined3d_swapchain **swapchains; UINT swapchain_count; @@ -1925,7 +1912,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h /* For rendering to a texture using glCopyTexImage */ GLuint depth_blt_texture; -@@ -2127,6 +2204,9 @@ +@@ -2132,6 +2209,9 @@ UINT xScreenSpace; UINT yScreenSpace; UINT cursorWidth, cursorHeight; @@ -1935,7 +1922,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h HCURSOR hardwareCursor; /* The Wine logo texture */ -@@ -2158,6 +2238,7 @@ +@@ -2163,6 +2243,7 @@ UINT message, WPARAM wparam, LPARAM lparam, WNDPROC proc) DECLSPEC_HIDDEN; 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; @@ -1943,7 +1930,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h void device_invalidate_state(const struct wined3d_device *device, DWORD state) DECLSPEC_HIDDEN; void device_invalidate_shader_constants(const struct wined3d_device *device, DWORD mask) DECLSPEC_HIDDEN; void device_exec_update_texture(struct wined3d_context *context, struct wined3d_texture *src_texture, -@@ -2169,6 +2250,11 @@ +@@ -2174,6 +2255,11 @@ void device_create_dummy_textures(struct wined3d_device *device, struct wined3d_context *context) DECLSPEC_HIDDEN; void device_delete_opengl_contexts_cs(struct wined3d_device *device, struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN; @@ -1955,7 +1942,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h static inline BOOL isStateDirty(const struct wined3d_context *context, DWORD state) { -@@ -2185,9 +2271,11 @@ +@@ -2190,9 +2276,11 @@ ULONG (*resource_incref)(struct wined3d_resource *resource); ULONG (*resource_decref)(struct wined3d_resource *resource); void (*resource_unload)(struct wined3d_resource *resource); @@ -1967,7 +1954,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h }; struct wined3d_resource -@@ -2212,6 +2300,7 @@ +@@ -2217,6 +2305,7 @@ UINT depth; UINT size; DWORD priority; @@ -1975,7 +1962,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h void *heap_memory, *map_heap_memory, *user_memory, *bitmap_data; UINT custom_row_pitch, custom_slice_pitch; struct wined3d_gl_bo *buffer, *map_buffer; -@@ -2219,6 +2308,10 @@ +@@ -2224,6 +2313,10 @@ DWORD locations; LONG access_fence; BOOL unmap_dirtify; @@ -1986,7 +1973,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h void *parent; const struct wined3d_parent_ops *parent_ops; -@@ -2243,6 +2336,7 @@ +@@ -2248,6 +2341,7 @@ void *parent, const struct wined3d_parent_ops *parent_ops, const struct wined3d_resource_ops *resource_ops) DECLSPEC_HIDDEN; void resource_unload(struct wined3d_resource *resource) DECLSPEC_HIDDEN; @@ -1994,7 +1981,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h DWORD wined3d_resource_access_from_location(DWORD location) DECLSPEC_HIDDEN; BOOL wined3d_resource_allocate_sysmem(struct wined3d_resource *resource) DECLSPEC_HIDDEN; void wined3d_resource_changed(struct wined3d_resource *resource, -@@ -2291,6 +2385,15 @@ +@@ -2296,6 +2390,15 @@ { while(InterlockedCompareExchange(&resource->access_fence, 0, 0)); } @@ -2010,7 +1997,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h /* Tests show that the start address of resources is 32 byte aligned */ #define RESOURCE_ALIGNMENT 16 -@@ -2375,7 +2478,9 @@ +@@ -2383,7 +2486,9 @@ void wined3d_texture_apply_sampler_desc(struct wined3d_texture *texture, const struct wined3d_sampler_desc *sampler_desc, const struct wined3d_gl_info *gl_info) DECLSPEC_HIDDEN; @@ -2020,7 +2007,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h void wined3d_texture_bind(struct wined3d_texture *texture, struct wined3d_context *context, BOOL srgb) DECLSPEC_HIDDEN; void wined3d_texture_bind_and_dirtify(struct wined3d_texture *texture, -@@ -2409,9 +2514,16 @@ +@@ -2417,9 +2522,16 @@ struct wined3d_resource resource; struct wined3d_texture *container; @@ -2037,7 +2024,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h }; static inline struct wined3d_volume *volume_from_resource(struct wined3d_resource *resource) -@@ -2419,6 +2531,7 @@ +@@ -2427,6 +2539,7 @@ return CONTAINING_RECORD(resource, struct wined3d_volume, resource); } @@ -2045,7 +2032,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h HRESULT wined3d_volume_create(struct wined3d_texture *container, const struct wined3d_resource_desc *desc, unsigned int level, struct wined3d_volume **volume) DECLSPEC_HIDDEN; void wined3d_volume_destroy(struct wined3d_volume *volume) DECLSPEC_HIDDEN; -@@ -2431,6 +2544,24 @@ +@@ -2439,6 +2552,24 @@ struct wined3d_surface_dib { HBITMAP DIBsection; @@ -2070,7 +2057,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h UINT bitmap_size; }; -@@ -2456,7 +2587,11 @@ +@@ -2464,7 +2595,11 @@ struct wined3d_surface_ops { HRESULT (*surface_private_setup)(struct wined3d_surface *surface); @@ -2082,7 +2069,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h }; struct wined3d_surface -@@ -2464,12 +2599,26 @@ +@@ -2472,12 +2607,26 @@ struct wined3d_resource resource; const struct wined3d_surface_ops *surface_ops; struct wined3d_texture *container; @@ -2109,7 +2096,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h GLuint rb_multisample; GLuint rb_resolved; GLenum texture_target; -@@ -2513,10 +2662,19 @@ +@@ -2521,10 +2670,19 @@ GLenum surface_get_gl_buffer(const struct wined3d_surface *surface) DECLSPEC_HIDDEN; void surface_get_drawable_size(const struct wined3d_surface *surface, const struct wined3d_context *context, unsigned int *width, unsigned int *height) DECLSPEC_HIDDEN; @@ -2129,7 +2116,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h void surface_modify_ds_location(struct wined3d_surface *surface, DWORD location, UINT w, UINT h) DECLSPEC_HIDDEN; void surface_prepare_rb(struct wined3d_surface *surface, const struct wined3d_gl_info *gl_info, BOOL multisample) DECLSPEC_HIDDEN; -@@ -2528,6 +2686,7 @@ +@@ -2536,6 +2694,7 @@ const struct wined3d_gl_info *gl_info, void *mem, unsigned int pitch) DECLSPEC_HIDDEN; HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const POINT *dst_point, struct wined3d_surface *src_surface, const RECT *src_rect) DECLSPEC_HIDDEN; @@ -2137,7 +2124,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h HRESULT wined3d_surface_create(struct wined3d_texture *container, const struct wined3d_resource_desc *desc, GLenum target, unsigned int level, unsigned int layer, DWORD flags, struct wined3d_surface **surface) DECLSPEC_HIDDEN; -@@ -2542,6 +2701,17 @@ +@@ -2550,6 +2709,17 @@ void wined3d_surface_cleanup_cs(struct wined3d_surface *surface) DECLSPEC_HIDDEN; void wined3d_surface_getdc_cs(struct wined3d_surface *surface) DECLSPEC_HIDDEN; void wined3d_surface_releasedc_cs(struct wined3d_surface *surface) DECLSPEC_HIDDEN; @@ -2155,7 +2142,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h void draw_textured_quad(const struct wined3d_surface *src_surface, struct wined3d_context *context, const RECT *src_rect, const RECT *dst_rect, enum wined3d_texture_filter_type filter) DECLSPEC_HIDDEN; -@@ -2564,8 +2734,10 @@ +@@ -2572,8 +2742,10 @@ GLuint name; }; @@ -2166,7 +2153,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h struct wined3d_vertex_declaration_element { const struct wined3d_format *format; -@@ -2594,8 +2766,10 @@ +@@ -2602,8 +2774,10 @@ BOOL half_float_conv_needed; }; @@ -2177,7 +2164,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h struct wined3d_saved_states { DWORD transform[(HIGHEST_TRANSFORMSTATE >> 5) + 1]; -@@ -2663,6 +2837,7 @@ +@@ -2671,6 +2845,7 @@ void stateblock_init_contained_states(struct wined3d_stateblock *stateblock) DECLSPEC_HIDDEN; void state_cleanup(struct wined3d_state *state) DECLSPEC_HIDDEN; @@ -2185,7 +2172,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h HRESULT state_init(struct wined3d_state *state, const struct wined3d_gl_info *gl_info, const struct wined3d_d3d_info *d3d_info, DWORD flags) DECLSPEC_HIDDEN; void state_unbind_resources(struct wined3d_state *state) DECLSPEC_HIDDEN; -@@ -2713,6 +2888,32 @@ +@@ -2721,6 +2896,32 @@ void wined3d_cs_destroy(struct wined3d_cs *cs) DECLSPEC_HIDDEN; void wined3d_cs_switch_onscreen_ds(struct wined3d_cs *cs, struct wined3d_context *context, struct wined3d_surface *depth_stencil) DECLSPEC_HIDDEN; @@ -2218,7 +2205,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *rects, DWORD flags, const struct wined3d_color *color, float depth, DWORD stencil) DECLSPEC_HIDDEN; -@@ -2762,6 +2963,7 @@ +@@ -2770,6 +2971,7 @@ 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; @@ -2226,7 +2213,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h void wined3d_cs_emit_set_consts_f(struct wined3d_cs *cs, UINT start_register, const float *constants, UINT vector4f_count, enum wined3d_shader_type type) DECLSPEC_HIDDEN; void wined3d_cs_emit_set_consts_b(struct wined3d_cs *cs, UINT start_register, -@@ -2825,6 +3027,7 @@ +@@ -2833,6 +3035,7 @@ 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; @@ -2234,7 +2221,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h /* Direct3D terminology with little modifications. We do not have an issued state * because only the driver knows about it, but we have a created state because d3d -@@ -2839,8 +3042,12 @@ +@@ -2847,8 +3050,12 @@ struct wined3d_query_ops { HRESULT (*query_get_data)(struct wined3d_query *query, void *data, DWORD data_size, DWORD flags); @@ -2247,7 +2234,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h }; struct wined3d_query -@@ -2854,12 +3061,16 @@ +@@ -2862,12 +3069,16 @@ enum wined3d_query_type type; DWORD data_size; void *extendedData; @@ -2264,7 +2251,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h /* TODO: Add tests and support for FLOAT16_4 POSITIONT, D3DCOLOR position, other * fixed function semantics as D3DCOLOR or FLOAT16 */ -@@ -2886,7 +3097,9 @@ +@@ -2894,7 +3105,9 @@ GLenum buffer_object_usage; GLenum buffer_type_hint; DWORD flags; @@ -2274,7 +2261,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h void *map_ptr; struct wined3d_map_range *maps; -@@ -2911,11 +3124,15 @@ +@@ -2919,11 +3132,15 @@ BYTE *buffer_get_sysmem(struct wined3d_buffer *This, struct wined3d_context *context) DECLSPEC_HIDDEN; void buffer_internal_preload(struct wined3d_buffer *buffer, struct wined3d_context *context, const struct wined3d_state *state) DECLSPEC_HIDDEN; @@ -2290,7 +2277,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h struct wined3d_rendertarget_view { -@@ -2954,8 +3171,10 @@ +@@ -2962,8 +3179,10 @@ return surface_from_resource(resource); } @@ -2301,7 +2288,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h struct wined3d_shader_resource_view { LONG refcount; -@@ -2968,8 +3187,12 @@ +@@ -2976,8 +3195,12 @@ struct wined3d_swapchain_ops { void (*swapchain_present)(struct wined3d_swapchain *swapchain, const RECT *src_rect, @@ -2314,7 +2301,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h }; struct wined3d_swapchain -@@ -3008,8 +3231,10 @@ +@@ -3016,8 +3239,10 @@ 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; @@ -2325,7 +2312,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h /***************************************************************************** * Utility function prototypes -@@ -3213,7 +3438,9 @@ +@@ -3221,7 +3446,9 @@ void shader_generate_main(const struct wined3d_shader *shader, struct wined3d_string_buffer *buffer, const struct wined3d_shader_reg_maps *reg_maps, const DWORD *byte_code, void *backend_ctx) DECLSPEC_HIDDEN; BOOL shader_match_semantic(const char *semantic_name, enum wined3d_decl_usage usage) DECLSPEC_HIDDEN; @@ -4655,7 +4642,7 @@ diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c unsigned int i, extra_constants_needed = 0; const struct wined3d_shader_lconst *lconst; const char *prefix; -@@ -1868,7 +1876,11 @@ +@@ -1864,7 +1872,11 @@ { UINT in_count = min(vec4_varyings(version->major, gl_info), shader->limits->packed_input); @@ -4667,7 +4654,7 @@ diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c declare_in_varying(gl_info, buffer, FALSE, "vec4 %s_link[%u];\n", prefix, in_count); shader_addline(buffer, "vec4 %s_in[%u];\n", prefix, in_count); } -@@ -1909,6 +1921,7 @@ +@@ -1905,6 +1917,7 @@ } else { @@ -4675,7 +4662,7 @@ diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c /* This happens because we do not have proper tracking of the * constant registers that are actually used, only the max * limit of the shader version. -@@ -1917,6 +1930,23 @@ +@@ -1913,6 +1926,23 @@ * it and just create the uniform. */ FIXME("Cannot find a free uniform for vpos correction params\n"); @@ -6238,7 +6225,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c surface->flags |= SFLAG_CLIENT; mem = surface->resource.heap_memory; -@@ -972,6 +1048,7 @@ +@@ -985,6 +1061,7 @@ wined3d_texture_unload_gl_texture(texture); } @@ -6246,7 +6233,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c static void wined3d_texture_load_location_invalidated(struct wined3d_resource *resource, DWORD location) { ERR("Should not be called on textures.\n"); -@@ -991,6 +1068,13 @@ +@@ -1004,6 +1081,13 @@ wined3d_texture_unload, wined3d_texture_load_location_invalidated, wined3d_texture_load_location, @@ -6260,7 +6247,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c }; static HRESULT cubetexture_init(struct wined3d_texture *texture, const struct wined3d_resource_desc *desc, -@@ -1007,7 +1091,9 @@ +@@ -1020,7 +1104,9 @@ if (WINED3DFMT_UNKNOWN >= desc->format) { WARN("(%p) : Texture cannot be created with a format of WINED3DFMT_UNKNOWN.\n", texture); @@ -6270,7 +6257,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c return WINED3DERR_INVALIDCALL; } -@@ -1017,6 +1103,7 @@ +@@ -1030,6 +1116,7 @@ if (!gl_info->supported[SGIS_GENERATE_MIPMAP]) { WARN("No mipmap generation support, returning D3DERR_INVALIDCALL.\n"); @@ -6278,7 +6265,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c HeapFree(GetProcessHeap(), 0, texture); return WINED3DERR_INVALIDCALL; } -@@ -1025,6 +1112,14 @@ +@@ -1038,6 +1125,14 @@ { WARN("WINED3DUSAGE_AUTOGENMIPMAP is set, and level count != 1, returning D3DERR_INVALIDCALL.\n"); HeapFree(GetProcessHeap(), 0, texture); @@ -6293,7 +6280,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c return WINED3DERR_INVALIDCALL; } } -@@ -1045,7 +1140,9 @@ +@@ -1058,7 +1153,9 @@ else { WARN("Attempted to create a NPOT cube texture (edge length %u) without GL support.\n", desc->width); @@ -6303,7 +6290,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c return WINED3DERR_INVALIDCALL; } } -@@ -1055,7 +1152,9 @@ +@@ -1068,7 +1165,9 @@ surface_flags, device, parent, parent_ops, &texture_resource_ops))) { WARN("Failed to initialize texture, returning %#x\n", hr); @@ -6313,7 +6300,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c return hr; } -@@ -1118,7 +1217,9 @@ +@@ -1131,7 +1230,9 @@ if (WINED3DFMT_UNKNOWN >= desc->format) { WARN("(%p) : Texture cannot be created with a format of WINED3DFMT_UNKNOWN.\n", texture); @@ -6323,7 +6310,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c return WINED3DERR_INVALIDCALL; } -@@ -1149,7 +1250,9 @@ +@@ -1162,7 +1263,9 @@ else { WARN("Attempted to create a mipmapped NPOT texture without unconditional NPOT support.\n"); @@ -6333,7 +6320,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c return WINED3DERR_INVALIDCALL; } } -@@ -1162,6 +1265,7 @@ +@@ -1175,6 +1278,7 @@ if (!gl_info->supported[SGIS_GENERATE_MIPMAP]) { WARN("No mipmap generation support, returning WINED3DERR_INVALIDCALL.\n"); @@ -6341,7 +6328,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c HeapFree(GetProcessHeap(), 0, texture); return WINED3DERR_INVALIDCALL; } -@@ -1170,6 +1274,14 @@ +@@ -1183,6 +1287,14 @@ { WARN("WINED3DUSAGE_AUTOGENMIPMAP is set, and level count != 1, returning WINED3DERR_INVALIDCALL.\n"); HeapFree(GetProcessHeap(), 0, texture); @@ -6356,7 +6343,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c return WINED3DERR_INVALIDCALL; } } -@@ -1178,7 +1290,9 @@ +@@ -1191,7 +1303,9 @@ surface_flags, device, parent, parent_ops, &texture_resource_ops))) { WARN("Failed to initialize texture, returning %#x.\n", hr); @@ -6366,7 +6353,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c return hr; } -@@ -1264,12 +1378,25 @@ +@@ -1277,12 +1391,25 @@ static void texture3d_sub_resource_invalidate_location(struct wined3d_resource *sub_resource, DWORD location) { @@ -6392,7 +6379,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c } static void texture3d_sub_resource_upload_data(struct wined3d_resource *sub_resource, -@@ -1279,7 +1406,11 @@ +@@ -1292,7 +1419,11 @@ struct wined3d_const_bo_address addr; unsigned int row_pitch, slice_pitch; @@ -6404,7 +6391,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c if (row_pitch != data->row_pitch || slice_pitch != data->slice_pitch) FIXME("Ignoring row/slice pitch (%u/%u).\n", data->row_pitch, data->slice_pitch); -@@ -1304,7 +1435,11 @@ +@@ -1317,7 +1448,11 @@ void *mem = NULL; if (gl_info->supported[APPLE_CLIENT_STORAGE] && !format->convert @@ -6416,7 +6403,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c { TRACE("Enabling GL_UNPACK_CLIENT_STORAGE_APPLE for volume %p\n", volume); gl_info->gl_ops.gl.p_glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE, GL_TRUE); -@@ -1351,6 +1486,7 @@ +@@ -1377,6 +1512,7 @@ if (WINED3DFMT_UNKNOWN >= desc->format) { WARN("(%p) : Texture cannot be created with a format of WINED3DFMT_UNKNOWN.\n", texture); @@ -6424,7 +6411,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c HeapFree(GetProcessHeap(), 0, texture); return WINED3DERR_INVALIDCALL; } -@@ -1359,6 +1495,14 @@ +@@ -1385,6 +1521,14 @@ { WARN("(%p) : Texture cannot be created - no volume texture support.\n", texture); HeapFree(GetProcessHeap(), 0, texture); @@ -6439,7 +6426,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c return WINED3DERR_INVALIDCALL; } -@@ -1368,6 +1512,7 @@ +@@ -1394,6 +1538,7 @@ if (!gl_info->supported[SGIS_GENERATE_MIPMAP]) { WARN("No mipmap generation support, returning D3DERR_INVALIDCALL.\n"); @@ -6447,7 +6434,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c HeapFree(GetProcessHeap(), 0, texture); return WINED3DERR_INVALIDCALL; } -@@ -1376,6 +1521,14 @@ +@@ -1402,6 +1547,14 @@ { WARN("WINED3DUSAGE_AUTOGENMIPMAP is set, and level count != 1, returning D3DERR_INVALIDCALL.\n"); HeapFree(GetProcessHeap(), 0, texture); @@ -6462,7 +6449,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c return WINED3DERR_INVALIDCALL; } } -@@ -1403,7 +1556,9 @@ +@@ -1429,7 +1582,9 @@ { WARN("Attempted to create a NPOT volume texture (%u, %u, %u) without GL support.\n", desc->width, desc->height, desc->depth); @@ -6472,7 +6459,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c return WINED3DERR_INVALIDCALL; } } -@@ -1413,7 +1568,9 @@ +@@ -1439,7 +1594,9 @@ 0, device, parent, parent_ops, &texture_resource_ops))) { WARN("Failed to initialize texture, returning %#x.\n", hr); @@ -6482,7 +6469,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c return hr; } -@@ -1490,6 +1647,9 @@ +@@ -1516,6 +1673,9 @@ if (FAILED(hr)) { WARN("Failed to initialize texture, returning %#x.\n", hr); @@ -9323,7 +9310,7 @@ diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c { HeapFree(GetProcessHeap(), 0, shader->output_signature.elements); HeapFree(GetProcessHeap(), 0, shader->input_signature.elements); -@@ -2125,10 +2129,16 @@ +@@ -2126,10 +2130,16 @@ if (!refcount) { @@ -9340,7 +9327,7 @@ diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c } return refcount; -@@ -2405,7 +2415,11 @@ +@@ -2407,7 +2417,11 @@ memset(args, 0, sizeof(*args)); /* FIXME: Make sure all bits are set. */ if (!gl_info->supported[ARB_FRAMEBUFFER_SRGB] && state->render_states[WINED3D_RS_SRGBWRITEENABLE]) { @@ -9915,7 +9902,7 @@ diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c -@@ -5536,9 +5536,15 @@ +@@ -5537,9 +5537,15 @@ DebugBreak(); } diff --git a/patches/ws2_32-TransmitFile/0001-ws2_32-Add-stub-for-TransmitFile.patch b/patches/ws2_32-TransmitFile/0001-ws2_32-Add-stub-for-TransmitFile.patch deleted file mode 100644 index a01647b1..00000000 --- a/patches/ws2_32-TransmitFile/0001-ws2_32-Add-stub-for-TransmitFile.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 73dbe41e80fa7ed3aeb3c3f0ee91fe2023b2a356 Mon Sep 17 00:00:00 2001 -From: "Erich E. Hoover" -Date: Thu, 16 Jan 2014 17:52:50 -0700 -Subject: ws2_32: Add stub for TransmitFile. - ---- - dlls/ws2_32/socket.c | 16 +++++++++++++++- - 1 file changed, 15 insertions(+), 1 deletion(-) - -diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c -index 760e184..86efbe6 100644 ---- a/dlls/ws2_32/socket.c -+++ b/dlls/ws2_32/socket.c -@@ -2538,6 +2538,19 @@ static BOOL WINAPI WS2_AcceptEx(SOCKET listener, SOCKET acceptor, PVOID dest, DW - } - - /*********************************************************************** -+ * TransmitFile -+ */ -+static BOOL WINAPI WS2_TransmitFile( SOCKET s, HANDLE h, DWORD file_bytes, DWORD bytes_per_send, -+ LPOVERLAPPED overlapped, LPTRANSMIT_FILE_BUFFERS buffers, -+ DWORD flags ) -+{ -+ FIXME("(%lx, %p, %d, %d, %p, %p, %d): stub !\n", s, h, file_bytes, bytes_per_send, overlapped, -+ buffers, flags ); -+ WSASetLastError( WSAEOPNOTSUPP ); -+ return FALSE; -+} -+ -+/*********************************************************************** - * GetAcceptExSockaddrs - */ - static void WINAPI WS2_GetAcceptExSockaddrs(PVOID buffer, DWORD data_size, DWORD local_size, DWORD remote_size, -@@ -4177,7 +4190,8 @@ INT WINAPI WSAIoctl(SOCKET s, DWORD code, LPVOID in_buff, DWORD in_size, LPVOID - } - else if ( IsEqualGUID(&transmitfile_guid, in_buff) ) - { -- FIXME("SIO_GET_EXTENSION_FUNCTION_POINTER: unimplemented TransmitFile\n"); -+ *(LPFN_TRANSMITFILE *)out_buff = WS2_TransmitFile; -+ break; - } - else if ( IsEqualGUID(&transmitpackets_guid, in_buff) ) - { --- -2.3.0 - diff --git a/patches/ws2_32-TransmitFile/0003-ws2_32-Implement-a-basic-synchronous-TransmitFile.-r.patch b/patches/ws2_32-TransmitFile/0001-ws2_32-Implement-a-basic-synchronous-TransmitFile.-r.patch similarity index 100% rename from patches/ws2_32-TransmitFile/0003-ws2_32-Implement-a-basic-synchronous-TransmitFile.-r.patch rename to patches/ws2_32-TransmitFile/0001-ws2_32-Implement-a-basic-synchronous-TransmitFile.-r.patch diff --git a/patches/ws2_32-TransmitFile/0004-ws2_32-Add-support-for-TransmitFile-headers-and-foot.patch b/patches/ws2_32-TransmitFile/0002-ws2_32-Add-support-for-TransmitFile-headers-and-foot.patch similarity index 100% rename from patches/ws2_32-TransmitFile/0004-ws2_32-Add-support-for-TransmitFile-headers-and-foot.patch rename to patches/ws2_32-TransmitFile/0002-ws2_32-Add-support-for-TransmitFile-headers-and-foot.patch diff --git a/patches/ws2_32-TransmitFile/0002-ws2_32-Check-for-invalid-parameters-in-TransmitFile.patch b/patches/ws2_32-TransmitFile/0002-ws2_32-Check-for-invalid-parameters-in-TransmitFile.patch deleted file mode 100644 index ed85d3a2..00000000 --- a/patches/ws2_32-TransmitFile/0002-ws2_32-Check-for-invalid-parameters-in-TransmitFile.patch +++ /dev/null @@ -1,168 +0,0 @@ -From 9e8e6d6b4c14478ac28da693de9bd1a51f60d3eb Mon Sep 17 00:00:00 2001 -From: "Erich E. Hoover" -Date: Fri, 17 Jan 2014 12:35:57 -0700 -Subject: ws2_32: Check for invalid parameters in TransmitFile. - ---- - dlls/ws2_32/socket.c | 21 ++++++++++ - dlls/ws2_32/tests/sock.c | 103 +++++++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 124 insertions(+) - -diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c -index 86efbe6..96335cd 100644 ---- a/dlls/ws2_32/socket.c -+++ b/dlls/ws2_32/socket.c -@@ -2544,8 +2544,29 @@ static BOOL WINAPI WS2_TransmitFile( SOCKET s, HANDLE h, DWORD file_bytes, DWORD - LPOVERLAPPED overlapped, LPTRANSMIT_FILE_BUFFERS buffers, - DWORD flags ) - { -+ union generic_unix_sockaddr uaddr; -+ unsigned int uaddrlen = sizeof(uaddr); -+ int fd; -+ - FIXME("(%lx, %p, %d, %d, %p, %p, %d): stub !\n", s, h, file_bytes, bytes_per_send, overlapped, - buffers, flags ); -+ -+ fd = get_sock_fd( s, 0, NULL ); -+ if (fd == -1) -+ { -+ WSASetLastError( WSAENOTSOCK ); -+ return FALSE; -+ } -+ if (getpeername( fd, &uaddr.addr, &uaddrlen ) != 0) -+ { -+ release_sock_fd( s, fd ); -+ WSASetLastError( WSAENOTCONN ); -+ return FALSE; -+ } -+ release_sock_fd( s, fd ); -+ if (flags) -+ FIXME("Flags are not currently supported (0x%x).\n", flags); -+ - WSASetLastError( WSAEOPNOTSUPP ); - return FALSE; - } -diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c -index 7155a09..0991e54 100644 ---- a/dlls/ws2_32/tests/sock.c -+++ b/dlls/ws2_32/tests/sock.c -@@ -6906,6 +6906,108 @@ end: - closesocket(connector2); - } - -+static void test_TransmitFile(void) -+{ -+ GUID transmitFileGuid = WSAID_TRANSMITFILE; -+ LPFN_TRANSMITFILE pTransmitFile = NULL; -+ HANDLE file = INVALID_HANDLE_VALUE; -+ char system_ini_path[MAX_PATH]; -+ struct sockaddr_in bindAddress; -+ SOCKET client, server, dest; -+ DWORD num_bytes, err; -+ int iret, len; -+ BOOL bret; -+ -+ /* Setup sockets for testing TransmitFile */ -+ client = socket(AF_INET, SOCK_STREAM, 0); -+ server = socket(AF_INET, SOCK_STREAM, 0); -+ if (client == INVALID_SOCKET || server == INVALID_SOCKET) -+ { -+ skip("could not create acceptor socket, error %d\n", WSAGetLastError()); -+ goto cleanup; -+ } -+ iret = WSAIoctl(client, SIO_GET_EXTENSION_FUNCTION_POINTER, &transmitFileGuid, sizeof(transmitFileGuid), -+ &pTransmitFile, sizeof(pTransmitFile), &num_bytes, NULL, NULL); -+ if (iret) -+ { -+ skip("WSAIoctl failed to get TransmitFile with ret %d + errno %d\n", iret, WSAGetLastError()); -+ goto cleanup; -+ } -+ GetSystemWindowsDirectoryA(system_ini_path, MAX_PATH ); -+ strcat(system_ini_path, "\\system.ini"); -+ file = CreateFileA(system_ini_path, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_ALWAYS, 0x0, NULL); -+ if (file == INVALID_HANDLE_VALUE) -+ { -+ skip("Unable to open a file to transmit.\n"); -+ goto cleanup; -+ } -+ -+ /* Test TransmitFile with an invalid socket */ -+ bret = pTransmitFile(INVALID_SOCKET, file, 0, 0, NULL, NULL, 0); -+ err = WSAGetLastError(); -+ ok(!bret, "TransmitFile succeeded unexpectedly.\n"); -+ ok(err == WSAENOTSOCK, "TransmitFile triggered unexpected errno (%d != %d)\n", err, WSAENOTSOCK); -+ -+ /* Test a bogus TransmitFile without a connected socket */ -+ bret = pTransmitFile(client, NULL, 0, 0, NULL, NULL, TF_REUSE_SOCKET); -+ err = WSAGetLastError(); -+ ok(!bret, "TransmitFile succeeded unexpectedly.\n"); -+ ok(err == WSAENOTCONN, "TransmitFile triggered unexpected errno (%d != %d)\n", err, WSAENOTCONN); -+ -+ /* Setup a properly connected socket for transfers */ -+ memset(&bindAddress, 0, sizeof(bindAddress)); -+ bindAddress.sin_family = AF_INET; -+ bindAddress.sin_port = htons(9375); -+ bindAddress.sin_addr.s_addr = inet_addr("127.0.0.1"); -+ iret = bind(server, (struct sockaddr*)&bindAddress, sizeof(bindAddress)); -+ if (iret != 0) -+ { -+ skip("failed to bind(), error %d\n", WSAGetLastError()); -+ goto cleanup; -+ } -+ iret = listen(server, 1); -+ if (iret != 0) -+ { -+ skip("failed to listen(), error %d\n", WSAGetLastError()); -+ goto cleanup; -+ } -+ iret = connect(client, (struct sockaddr*)&bindAddress, sizeof(bindAddress)); -+ if (iret != 0) -+ { -+ skip("failed to connect(), error %d\n", WSAGetLastError()); -+ goto cleanup; -+ } -+ len = sizeof(bindAddress); -+ dest = accept(server, (struct sockaddr*)&bindAddress, &len); -+ if (dest == INVALID_SOCKET) -+ { -+ skip("failed to accept(), error %d\n", WSAGetLastError()); -+ goto cleanup; -+ } -+ if (set_blocking(dest, FALSE)) -+ { -+ skip("couldn't make socket non-blocking, error %d\n", WSAGetLastError()); -+ goto cleanup; -+ } -+ -+ /* Test TransmitFile with no possible buffer */ -+ bret = pTransmitFile(client, NULL, 0, 0, NULL, NULL, 0); -+ todo_wine ok(bret, "TransmitFile failed unexpectedly.\n"); -+ -+ /* Test TransmitFile with a UDP datagram socket */ -+ closesocket(client); -+ client = socket(AF_INET, SOCK_DGRAM, 0); -+ bret = pTransmitFile(client, NULL, 0, 0, NULL, NULL, 0); -+ err = WSAGetLastError(); -+ ok(!bret, "TransmitFile succeeded unexpectedly.\n"); -+ ok(err == WSAENOTCONN, "TransmitFile triggered unexpected errno (%d != %d)\n", err, WSAENOTCONN); -+ -+cleanup: -+ CloseHandle(file); -+ closesocket(client); -+ closesocket(server); -+} -+ - static void test_getpeername(void) - { - SOCKET sock; -@@ -8266,6 +8368,7 @@ START_TEST( sock ) - test_events(1); - - test_ipv6only(); -+ test_TransmitFile(); - test_GetAddrInfoW(); - test_getaddrinfo(); - test_AcceptEx(); --- -2.3.0 - diff --git a/patches/ws2_32-TransmitFile/0005-ws2_32-Add-asynchronous-support-for-TransmitFile.-re.patch b/patches/ws2_32-TransmitFile/0003-ws2_32-Add-asynchronous-support-for-TransmitFile.-re.patch similarity index 100% rename from patches/ws2_32-TransmitFile/0005-ws2_32-Add-asynchronous-support-for-TransmitFile.-re.patch rename to patches/ws2_32-TransmitFile/0003-ws2_32-Add-asynchronous-support-for-TransmitFile.-re.patch diff --git a/patches/ws2_32-TransmitFile/0006-ws2_32-Add-support-for-TF_DISCONNECT-to-TransmitFile.patch b/patches/ws2_32-TransmitFile/0004-ws2_32-Add-support-for-TF_DISCONNECT-to-TransmitFile.patch similarity index 100% rename from patches/ws2_32-TransmitFile/0006-ws2_32-Add-support-for-TF_DISCONNECT-to-TransmitFile.patch rename to patches/ws2_32-TransmitFile/0004-ws2_32-Add-support-for-TF_DISCONNECT-to-TransmitFile.patch diff --git a/patches/ws2_32-TransmitFile/0007-ws2_32-Add-support-for-TF_REUSE_SOCKET-to-TransmitFi.patch b/patches/ws2_32-TransmitFile/0005-ws2_32-Add-support-for-TF_REUSE_SOCKET-to-TransmitFi.patch similarity index 100% rename from patches/ws2_32-TransmitFile/0007-ws2_32-Add-support-for-TF_REUSE_SOCKET-to-TransmitFi.patch rename to patches/ws2_32-TransmitFile/0005-ws2_32-Add-support-for-TF_REUSE_SOCKET-to-TransmitFi.patch