diff --git a/README.md b/README.md index 4e6b0cb1..f4bd9818 100644 --- a/README.md +++ b/README.md @@ -34,12 +34,10 @@ Wine. All those differences are also documented on the Included bug fixes and improvements ----------------------------------- -**Bug fixes and features included in the next upcoming release [4]:** +**Bug fixes and features included in the next upcoming release [2]:** * Do not allow interruption of system APC in server_select ([Wine Bug #14697](https://bugs.winehq.org/show_bug.cgi?id=14697)) * Implement stub for ProcessQuotaLimits info class -* Release capture before sending WM_COMMAND ([Wine Bug #39296](https://bugs.winehq.org/show_bug.cgi?id=39296)) -* Use wrapper function for consolidation callback during unwinding. ([Wine Bug #39449](https://bugs.winehq.org/show_bug.cgi?id=39449)) **Bug fixes and features in Wine Staging 1.7.53 [262]:** @@ -248,7 +246,7 @@ for more details.* * 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 * Return correct values for GetThreadTimes function ([Wine Bug #20230](https://bugs.winehq.org/show_bug.cgi?id=20230)) -* Return default palette entries from GetSystemPaletteEntries for non-palette-based devices ([Wine Bug #36895](https://bugs.winehq.org/show_bug.cgi?id=36895)) +* ~~Return default palette entries from GetSystemPaletteEntries for non-palette-based devices~~ ([Wine Bug #36895](https://bugs.winehq.org/show_bug.cgi?id=36895)) * Return dummy ID3DXSkinInfo interface when skinning info not present ([Wine Bug #33904](https://bugs.winehq.org/show_bug.cgi?id=33904)) * Return fake device type when systemroot is located on virtual disk ([Wine Bug #36546](https://bugs.winehq.org/show_bug.cgi?id=36546)) * Return proper status codes when NtReadFile/NtWriteFile is called on closed (but not disconnected) pipe diff --git a/debian/changelog b/debian/changelog index 75fd6a0b..0f99833d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,6 +9,12 @@ wine-staging (1.7.54) UNRELEASED; urgency=low * Partially removed patches for ws2_32 TransmitFile (accepted upstream). * Removed patch to fix NULL dereference in ICSeqCompressFrameStart (fixed upstream). + * Removed patch to return default palette entries from GetSystemPaletteEntries + for non-palette-based devices (accepted upstream). + * Removed patch to use wrapper function for consolidate callback during + unwinding on x86_64 (accepted upstream). + * Removed patch to release capture before sending WM_COMMAND (accepted + upstream). -- Sebastian Lackner Mon, 19 Oct 2015 21:56:22 +0200 wine-staging (1.7.53) unstable; urgency=low diff --git a/patches/gdi32-Default_Palette/0001-gdi32-Return-default-palette-entries-from-GetSystemP.patch b/patches/gdi32-Default_Palette/0001-gdi32-Return-default-palette-entries-from-GetSystemP.patch deleted file mode 100644 index 9c5dc057..00000000 --- a/patches/gdi32-Default_Palette/0001-gdi32-Return-default-palette-entries-from-GetSystemP.patch +++ /dev/null @@ -1,191 +0,0 @@ -From f3e41ff12cb58ee6cb5c36a447cfdeeda3eb21a2 Mon Sep 17 00:00:00 2001 -From: Anton Baskanov -Date: Fri, 1 May 2015 13:02:28 +0600 -Subject: gdi32: Return default palette entries from GetSystemPaletteEntries - for non-palette-based devices. - -Fixes rendering artifacts in Marble Drop. - -Changes by Sebastian Lackner : - * Added additional tests. - * Fix comparison in GetSystemPaletteEntries. ---- - dlls/gdi32/palette.c | 35 +++++++++++++- - dlls/gdi32/tests/palette.c | 112 +++++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 145 insertions(+), 2 deletions(-) - -diff --git a/dlls/gdi32/palette.c b/dlls/gdi32/palette.c -index d850d0f..70a75d8 100644 ---- a/dlls/gdi32/palette.c -+++ b/dlls/gdi32/palette.c -@@ -418,8 +418,39 @@ UINT WINAPI GetSystemPaletteEntries( - - if ((dc = get_dc_ptr( hdc ))) - { -- PHYSDEV physdev = GET_DC_PHYSDEV( dc, pGetSystemPaletteEntries ); -- ret = physdev->funcs->pGetSystemPaletteEntries( physdev, start, count, entries ); -+ if (!(GetDeviceCaps( hdc, RASTERCAPS ) & RC_PALETTE)) -+ { -+ if (entries && start < 256) -+ { -+ UINT i; -+ const RGBQUAD *default_entries; -+ -+ if (start + count > 256) count = 256 - start; -+ -+ default_entries = get_default_color_table( 8 ); -+ for (i = 0; i < count; ++i) -+ { -+ if (start + i < 10 || start + i >= 246) -+ { -+ entries[i].peRed = default_entries[start + i].rgbRed; -+ entries[i].peGreen = default_entries[start + i].rgbGreen; -+ entries[i].peBlue = default_entries[start + i].rgbBlue; -+ } -+ else -+ { -+ entries[i].peRed = 0; -+ entries[i].peGreen = 0; -+ entries[i].peBlue = 0; -+ } -+ entries[i].peFlags = 0; -+ } -+ } -+ } -+ else -+ { -+ PHYSDEV physdev = GET_DC_PHYSDEV( dc, pGetSystemPaletteEntries ); -+ ret = physdev->funcs->pGetSystemPaletteEntries( physdev, start, count, entries ); -+ } - release_dc_ptr( dc ); - } - return ret; -diff --git a/dlls/gdi32/tests/palette.c b/dlls/gdi32/tests/palette.c -index f95c0d3..09a00a5 100644 ---- a/dlls/gdi32/tests/palette.c -+++ b/dlls/gdi32/tests/palette.c -@@ -191,9 +191,121 @@ static void test_halftone_palette(void) - ReleaseDC( 0, hdc ); - } - -+static void test_system_palette_entries(void) -+{ -+ HDC hdc; -+ PALETTEENTRY entries[256]; -+ PALETTEENTRY defpal[20]; -+ int i, count; -+ -+ hdc = GetDC(0); -+ -+ if (!(GetDeviceCaps( hdc, RASTERCAPS ) & RC_PALETTE)) -+ { -+ memset( defpal, 0xaa, sizeof(defpal) ); -+ count = GetPaletteEntries( GetStockObject(DEFAULT_PALETTE), 0, 20, defpal ); -+ ok( count == 20, "wrong size %u\n", count ); -+ -+ memset( entries, 0x55, sizeof(entries) ); -+ count = GetSystemPaletteEntries( hdc, 0, 256, entries ); -+ ok( count == 0, "wrong size %u\n", count); -+ for (i = 0; i < 10; i++) -+ { -+ ok( entries[i].peRed == defpal[i].peRed && -+ entries[i].peGreen == defpal[i].peGreen && -+ entries[i].peBlue == defpal[i].peBlue && -+ !entries[i].peFlags, -+ "%u: wrong color %02x,%02x,%02x,%02x instead of %02x,%02x,%02x\n", i, -+ entries[i].peRed, entries[i].peGreen, entries[i].peBlue, entries[i].peFlags, -+ defpal[i].peRed, defpal[i].peGreen, defpal[i].peBlue ); -+ } -+ for (i = 10; i < 246; ++i) -+ { -+ ok( !entries[i].peRed && -+ !entries[i].peGreen && -+ !entries[i].peBlue && -+ !entries[i].peFlags, -+ "%u: wrong color %02x,%02x,%02x,%02x instead of 0,0,0\n", i, -+ entries[i].peRed, entries[i].peGreen, entries[i].peBlue, entries[i].peFlags); -+ } -+ for (i = 246; i < 256; i++) -+ { -+ int idx = i - 246 + 10; -+ ok( entries[i].peRed == defpal[idx].peRed && -+ entries[i].peGreen == defpal[idx].peGreen && -+ entries[i].peBlue == defpal[idx].peBlue && -+ !entries[i].peFlags, -+ "%u: wrong color %02x,%02x,%02x,%02x instead of %02x,%02x,%02x\n", i, -+ entries[i].peRed, entries[i].peGreen, entries[i].peBlue, entries[i].peFlags, -+ defpal[idx].peRed, defpal[idx].peGreen, defpal[idx].peBlue ); -+ } -+ -+ memset( entries, 0x55, sizeof(entries) ); -+ count = GetSystemPaletteEntries( hdc, 0, 10, entries ); -+ ok( count == 0, "wrong size %u\n", count); -+ for (i = 0; i < 10; i++) -+ { -+ ok( entries[i].peRed == defpal[i].peRed && -+ entries[i].peGreen == defpal[i].peGreen && -+ entries[i].peBlue == defpal[i].peBlue && -+ !entries[i].peFlags, -+ "%u: wrong color %02x,%02x,%02x,%02x instead of %02x,%02x,%02x\n", i, -+ entries[i].peRed, entries[i].peGreen, entries[i].peBlue, entries[i].peFlags, -+ defpal[i].peRed, defpal[i].peGreen, defpal[i].peBlue ); -+ } -+ -+ memset( entries, 0x55, sizeof(entries) ); -+ count = GetSystemPaletteEntries( hdc, 10, 246, entries ); -+ ok( count == 0, "wrong size %u\n", count); -+ for (i = 0; i < 236; ++i) -+ { -+ ok( !entries[i].peRed && -+ !entries[i].peGreen && -+ !entries[i].peBlue && -+ !entries[i].peFlags, -+ "%u: wrong color %02x,%02x,%02x,%02x instead of 0,0,0\n", i, -+ entries[i].peRed, entries[i].peGreen, entries[i].peBlue, entries[i].peFlags); -+ } -+ for (i = 236; i < 246; i++) -+ { -+ int idx = i - 236 + 10; -+ ok( entries[i].peRed == defpal[idx].peRed && -+ entries[i].peGreen == defpal[idx].peGreen && -+ entries[i].peBlue == defpal[idx].peBlue && -+ !entries[i].peFlags, -+ "%u: wrong color %02x,%02x,%02x,%02x instead of %02x,%02x,%02x\n", i, -+ entries[i].peRed, entries[i].peGreen, entries[i].peBlue, entries[i].peFlags, -+ defpal[idx].peRed, defpal[idx].peGreen, defpal[idx].peBlue ); -+ } -+ -+ memset( entries, 0x55, sizeof(entries) ); -+ count = GetSystemPaletteEntries( hdc, 246, 10, entries ); -+ ok( count == 0, "wrong size %u\n", count); -+ for (i = 0; i < 10; i++) -+ { -+ int idx = i + 10; -+ ok( entries[i].peRed == defpal[idx].peRed && -+ entries[i].peGreen == defpal[idx].peGreen && -+ entries[i].peBlue == defpal[idx].peBlue && -+ !entries[i].peFlags, -+ "%u: wrong color %02x,%02x,%02x,%02x instead of %02x,%02x,%02x\n", i, -+ entries[i].peRed, entries[i].peGreen, entries[i].peBlue, entries[i].peFlags, -+ defpal[idx].peRed, defpal[idx].peGreen, defpal[idx].peBlue ); -+ } -+ -+ } -+ else -+ { -+ skip( "device is palette-based, skipping test\n" ); -+ } -+ -+ ReleaseDC( 0, hdc ); -+} -+ - START_TEST(palette) - { - test_DIB_PAL_COLORS(); - test_palette_entries(); - test_halftone_palette(); -+ test_system_palette_entries(); - } --- -2.3.7 - diff --git a/patches/gdi32-Default_Palette/definition b/patches/gdi32-Default_Palette/definition deleted file mode 100644 index fb5b6351..00000000 --- a/patches/gdi32-Default_Palette/definition +++ /dev/null @@ -1 +0,0 @@ -Fixes: [36895] Return default palette entries from GetSystemPaletteEntries for non-palette-based devices diff --git a/patches/ntdll-Consolidation_Callback/0001-ntdll-Use-wrapper-function-for-consolidation-callbac.patch b/patches/ntdll-Consolidation_Callback/0001-ntdll-Use-wrapper-function-for-consolidation-callbac.patch deleted file mode 100644 index 3984ed0b..00000000 --- a/patches/ntdll-Consolidation_Callback/0001-ntdll-Use-wrapper-function-for-consolidation-callbac.patch +++ /dev/null @@ -1,94 +0,0 @@ -From cea14f59b480bf408af07081dba8300cd62efbfd Mon Sep 17 00:00:00 2001 -From: Sebastian Lackner -Date: Tue, 20 Oct 2015 05:53:46 +0200 -Subject: ntdll: Use wrapper function for consolidate callback on x86_64. - -Signed-off-by: Sebastian Lackner ---- - dlls/ntdll/signal_x86_64.c | 63 ++++++++++++++++++++++++++++++++++++++++++++-- - 1 file changed, 61 insertions(+), 2 deletions(-) - -diff --git a/dlls/ntdll/signal_x86_64.c b/dlls/ntdll/signal_x86_64.c -index 575a770..524de68 100644 ---- a/dlls/ntdll/signal_x86_64.c -+++ b/dlls/ntdll/signal_x86_64.c -@@ -3288,6 +3288,64 @@ static void call_teb_unwind_handler( EXCEPTION_RECORD *rec, DISPATCHER_CONTEXT * - } - - -+/********************************************************************** -+ * call_consolidate_callback -+ * -+ * Wrapper function to call a consolidate callback from a fake frame. -+ * If the callback executes RtlUnwindEx (like for example done in C++ handlers), -+ * we have to skip all frames which were already processed. To do that we -+ * trick the unwinding functions into thinking the call came from somewhere -+ * else. All CFI instructions are either DW_CFA_def_cfa_expression or -+ * DW_CFA_expression, and the expressions have the following format: -+ * -+ * DW_OP_breg6; sleb128 0x10 | Load %rbp + 0x10 -+ * DW_OP_deref | Get *(%rbp + 0x10) == context -+ * DW_OP_plus_uconst; uleb128 | Add offset to get struct member -+ * [DW_OP_deref] | Dereference, only for CFA -+ */ -+extern void * WINAPI call_consolidate_callback( CONTEXT *context, -+ void *(CALLBACK *callback)(EXCEPTION_RECORD *), -+ EXCEPTION_RECORD *rec ); -+__ASM_GLOBAL_FUNC( call_consolidate_callback, -+ "pushq %rbp\n\t" -+ __ASM_CFI(".cfi_adjust_cfa_offset 8\n\t") -+ __ASM_CFI(".cfi_rel_offset %rbp,0\n\t") -+ "movq %rsp,%rbp\n\t" -+ __ASM_CFI(".cfi_def_cfa_register %rbp\n\t") -+ "subq $0x20,%rsp\n\t" -+ "movq %rcx,0x10(%rbp)\n\t" -+ __ASM_CFI(".cfi_remember_state\n\t") -+ __ASM_CFI(".cfi_escape 0x0f,0x07,0x76,0x10,0x06,0x23,0x98,0x01,0x06\n\t") /* CFA */ -+ __ASM_CFI(".cfi_escape 0x10,0x03,0x06,0x76,0x10,0x06,0x23,0x90,0x01\n\t") /* %rbx */ -+ __ASM_CFI(".cfi_escape 0x10,0x04,0x06,0x76,0x10,0x06,0x23,0xa8,0x01\n\t") /* %rsi */ -+ __ASM_CFI(".cfi_escape 0x10,0x05,0x06,0x76,0x10,0x06,0x23,0xb0,0x01\n\t") /* %rdi */ -+ __ASM_CFI(".cfi_escape 0x10,0x06,0x06,0x76,0x10,0x06,0x23,0xa0,0x01\n\t") /* %rbp */ -+ __ASM_CFI(".cfi_escape 0x10,0x0c,0x06,0x76,0x10,0x06,0x23,0xd8,0x01\n\t") /* %r12 */ -+ __ASM_CFI(".cfi_escape 0x10,0x0d,0x06,0x76,0x10,0x06,0x23,0xe0,0x01\n\t") /* %r13 */ -+ __ASM_CFI(".cfi_escape 0x10,0x0e,0x06,0x76,0x10,0x06,0x23,0xe8,0x01\n\t") /* %r14 */ -+ __ASM_CFI(".cfi_escape 0x10,0x0f,0x06,0x76,0x10,0x06,0x23,0xf0,0x01\n\t") /* %r15 */ -+ __ASM_CFI(".cfi_escape 0x10,0x10,0x06,0x76,0x10,0x06,0x23,0xf8,0x01\n\t") /* %rip */ -+ __ASM_CFI(".cfi_escape 0x10,0x17,0x06,0x76,0x10,0x06,0x23,0x80,0x04\n\t") /* %xmm6 */ -+ __ASM_CFI(".cfi_escape 0x10,0x18,0x06,0x76,0x10,0x06,0x23,0x90,0x04\n\t") /* %xmm7 */ -+ __ASM_CFI(".cfi_escape 0x10,0x19,0x06,0x76,0x10,0x06,0x23,0xa0,0x04\n\t") /* %xmm8 */ -+ __ASM_CFI(".cfi_escape 0x10,0x1a,0x06,0x76,0x10,0x06,0x23,0xb0,0x04\n\t") /* %xmm9 */ -+ __ASM_CFI(".cfi_escape 0x10,0x1b,0x06,0x76,0x10,0x06,0x23,0xc0,0x04\n\t") /* %xmm10 */ -+ __ASM_CFI(".cfi_escape 0x10,0x1c,0x06,0x76,0x10,0x06,0x23,0xd0,0x04\n\t") /* %xmm11 */ -+ __ASM_CFI(".cfi_escape 0x10,0x1d,0x06,0x76,0x10,0x06,0x23,0xe0,0x04\n\t") /* %xmm12 */ -+ __ASM_CFI(".cfi_escape 0x10,0x1e,0x06,0x76,0x10,0x06,0x23,0xf0,0x04\n\t") /* %xmm13 */ -+ __ASM_CFI(".cfi_escape 0x10,0x1f,0x06,0x76,0x10,0x06,0x23,0x80,0x05\n\t") /* %xmm14 */ -+ __ASM_CFI(".cfi_escape 0x10,0x20,0x06,0x76,0x10,0x06,0x23,0x90,0x05\n\t") /* %xmm15 */ -+ "movq %r8,%rcx\n\t" -+ "callq *%rdx\n\t" -+ __ASM_CFI(".cfi_restore_state\n\t") -+ "movq %rbp,%rsp\n\t" -+ __ASM_CFI(".cfi_def_cfa_register %rsp\n\t") -+ "popq %rbp\n\t" -+ __ASM_CFI(".cfi_adjust_cfa_offset -8\n\t") -+ __ASM_CFI(".cfi_same_value %rbp\n\t") -+ "ret") -+ -+ - /******************************************************************* - * RtlUnwindEx (NTDLL.@) - */ -@@ -3474,8 +3532,9 @@ void WINAPI RtlUnwindEx( PVOID end_frame, PVOID target_ip, EXCEPTION_RECORD *rec - else if (rec->ExceptionCode == STATUS_UNWIND_CONSOLIDATE && rec->NumberParameters >= 1) - { - PVOID (CALLBACK *consolidate)(EXCEPTION_RECORD *) = (void *)rec->ExceptionInformation[0]; -- TRACE( "calling consolidate callback %p\n", consolidate ); -- target_ip = consolidate( rec ); -+ TRACE( "calling consolidate callback %p (rec=%p)\n", consolidate, rec ); -+ target_ip = call_consolidate_callback( context, consolidate, rec ); -+ TRACE( "-> target=%p\n", target_ip ); - } - context->Rax = (ULONG64)retval; - context->Rip = (ULONG64)target_ip; --- -2.6.1 - diff --git a/patches/ntdll-Consolidation_Callback/definition b/patches/ntdll-Consolidation_Callback/definition deleted file mode 100644 index 65496501..00000000 --- a/patches/ntdll-Consolidation_Callback/definition +++ /dev/null @@ -1 +0,0 @@ -Fixes: [39449] Use wrapper function for consolidation callback during unwinding. diff --git a/patches/ntdll-Junction_Points/0001-ntdll-Add-support-for-junction-point-creation.patch b/patches/ntdll-Junction_Points/0001-ntdll-Add-support-for-junction-point-creation.patch index d00a1264..00af5cd7 100644 --- a/patches/ntdll-Junction_Points/0001-ntdll-Add-support-for-junction-point-creation.patch +++ b/patches/ntdll-Junction_Points/0001-ntdll-Add-support-for-junction-point-creation.patch @@ -1,21 +1,21 @@ -From eac9db85f7a5703a41bb956a9cabc2277872881d Mon Sep 17 00:00:00 2001 +From 0a7a9cfce718a28567b87a5bf6776632af629d41 Mon Sep 17 00:00:00 2001 From: "Erich E. Hoover" Date: Thu, 16 Jan 2014 20:56:49 -0700 Subject: ntdll: Add support for junction point creation. --- - dlls/ntdll/file.c | 89 ++++++++++++++++++++++++++++++++++++++++++++++ + dlls/ntdll/file.c | 91 +++++++++++++++++++++++++++++++++++++++++++++++ dlls/ntdll/tests/file.c | 94 +++++++++++++++++++++++++++++++++++++++++++++++++ include/Makefile.in | 1 + include/ntifs.h | 52 +++++++++++++++++++++++++++ - 4 files changed, 236 insertions(+) + 4 files changed, 238 insertions(+) create mode 100644 include/ntifs.h diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c -index 8503dd8..fb171f2 100644 +index fecec13..d8bb01b 100644 --- a/dlls/ntdll/file.c +++ b/dlls/ntdll/file.c -@@ -88,12 +88,14 @@ +@@ -103,12 +103,14 @@ #include "winioctl.h" #include "ddk/ntddk.h" #include "ddk/ntddser.h" @@ -30,7 +30,7 @@ index 8503dd8..fb171f2 100644 #define SECSPERDAY 86400 #define SECS_1601_TO_1970 ((369 * 365 + 89) * (ULONGLONG)SECSPERDAY) -@@ -1633,6 +1635,76 @@ NTSTATUS WINAPI NtDeviceIoControlFile(HANDLE handle, HANDLE event, +@@ -1655,6 +1657,76 @@ NTSTATUS WINAPI SYSCALL(NtDeviceIoControlFile)(HANDLE handle, HANDLE event, } @@ -107,10 +107,16 @@ index 8503dd8..fb171f2 100644 /************************************************************************** * NtFsControlFile [NTDLL.@] * ZwFsControlFile [NTDLL.@] -@@ -1780,6 +1852,23 @@ NTSTATUS WINAPI NtFsControlFile(HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc +@@ -1803,11 +1875,30 @@ NTSTATUS WINAPI SYSCALL(NtFsControlFile)(HANDLE handle, HANDLE event, PIO_APC_RO } break; } ++ + case FSCTL_SET_SPARSE: + TRACE("FSCTL_SET_SPARSE: Ignoring request\n"); + io->Information = 0; + status = STATUS_SUCCESS; + break; + + case FSCTL_SET_REPARSE_POINT: + { @@ -128,11 +134,12 @@ index 8503dd8..fb171f2 100644 + } + break; + } ++ case FSCTL_PIPE_LISTEN: case FSCTL_PIPE_WAIT: default: diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c -index 3696124..b7b9e00 100644 +index 55e34ad..71e10c2 100644 --- a/dlls/ntdll/tests/file.c +++ b/dlls/ntdll/tests/file.c @@ -37,6 +37,7 @@ @@ -143,7 +150,7 @@ index 3696124..b7b9e00 100644 #ifndef IO_COMPLETION_ALL_ACCESS #define IO_COMPLETION_ALL_ACCESS 0x001F0003 -@@ -2866,6 +2867,98 @@ static void test_query_ea(void) +@@ -4273,6 +4274,98 @@ static void test_query_ea(void) #undef EA_BUFFER_SIZE } @@ -242,17 +249,17 @@ index 3696124..b7b9e00 100644 START_TEST(file) { HMODULE hkernel32 = GetModuleHandleA("kernel32.dll"); -@@ -2922,4 +3015,5 @@ START_TEST(file) +@@ -4332,4 +4425,5 @@ START_TEST(file) test_query_volume_information_file(); test_query_attribute_information_file(); test_query_ea(); + test_junction_points(); } diff --git a/include/Makefile.in b/include/Makefile.in -index 499c5d4..e410e14 100644 +index c5563a2..1e60e08 100644 --- a/include/Makefile.in +++ b/include/Makefile.in -@@ -479,6 +479,7 @@ SRCDIR_INCLUDES = \ +@@ -493,6 +493,7 @@ SRCDIR_INCLUDES = \ ntddstor.h \ ntdef.h \ ntdsapi.h \ @@ -319,5 +326,5 @@ index 0000000..db07c28 + +#endif /* __WINE_NTIFS_H */ -- -2.4.2 +2.6.1 diff --git a/patches/ntdll-Junction_Points/0002-ntdll-Add-support-for-reading-junction-points.patch b/patches/ntdll-Junction_Points/0002-ntdll-Add-support-for-reading-junction-points.patch index 934f3b04..31143bc3 100644 --- a/patches/ntdll-Junction_Points/0002-ntdll-Add-support-for-reading-junction-points.patch +++ b/patches/ntdll-Junction_Points/0002-ntdll-Add-support-for-reading-junction-points.patch @@ -1,18 +1,18 @@ -From 8770e934e61e237b6ef88b5442e7635542d99d4c Mon Sep 17 00:00:00 2001 +From 4489ca1cdd1eeb62b129e4f83278da14af653468 Mon Sep 17 00:00:00 2001 From: "Erich E. Hoover" Date: Thu, 16 Jan 2014 20:57:57 -0700 Subject: ntdll: Add support for reading junction points. --- - dlls/ntdll/file.c | 63 +++++++++++++++++++++++++++++++++++++++++++++++ - dlls/ntdll/tests/file.c | 14 ++++++++++- + dlls/ntdll/file.c | 63 +++++++++++++++++++++++++++++++++++++++++++++++++ + dlls/ntdll/tests/file.c | 14 ++++++++++- 2 files changed, 76 insertions(+), 1 deletion(-) diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c -index 8413ad1..39044ee 100644 +index d8bb01b..6e73547 100644 --- a/dlls/ntdll/file.c +++ b/dlls/ntdll/file.c -@@ -1542,6 +1542,60 @@ cleanup: +@@ -1727,6 +1727,60 @@ cleanup: } @@ -73,9 +73,9 @@ index 8413ad1..39044ee 100644 /************************************************************************** * NtFsControlFile [NTDLL.@] * ZwFsControlFile [NTDLL.@] -@@ -1690,6 +1744,15 @@ NTSTATUS WINAPI NtFsControlFile(HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc +@@ -1882,6 +1936,15 @@ NTSTATUS WINAPI SYSCALL(NtFsControlFile)(HANDLE handle, HANDLE event, PIO_APC_RO + status = STATUS_SUCCESS; break; - } + case FSCTL_GET_REPARSE_POINT: + { @@ -90,10 +90,10 @@ index 8413ad1..39044ee 100644 { REPARSE_DATA_BUFFER *buffer = (REPARSE_DATA_BUFFER *)in_buffer; diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c -index 90e753d..5c218d7 100644 +index 71e10c2..e07e6a8 100644 --- a/dlls/ntdll/tests/file.c +++ b/dlls/ntdll/tests/file.c -@@ -2713,9 +2713,10 @@ static void test_junction_points(void) +@@ -4303,9 +4303,10 @@ static void test_junction_points(void) static const WCHAR dotW[] = {'.',0}; REPARSE_DATA_BUFFER *buffer = NULL; DWORD dwret, dwLen, dwFlags; @@ -105,7 +105,7 @@ index 90e753d..5c218d7 100644 BOOL bret; /* Create a temporary folder for the junction point tests */ -@@ -2763,6 +2764,17 @@ static void test_junction_points(void) +@@ -4353,6 +4354,17 @@ static void test_junction_points(void) buffer_len = build_reparse_buffer(nameW.Buffer, &buffer); bret = DeviceIoControl(hJunction, FSCTL_SET_REPARSE_POINT, (LPVOID)buffer, buffer_len, NULL, 0, &dwret, 0); ok(bret, "Failed to create junction point! (0x%x)\n", GetLastError()); @@ -124,5 +124,5 @@ index 90e753d..5c218d7 100644 cleanup: -- -1.7.9.5 +2.6.1 diff --git a/patches/ntdll-Junction_Points/0003-ntdll-Add-support-for-deleting-junction-points.patch b/patches/ntdll-Junction_Points/0003-ntdll-Add-support-for-deleting-junction-points.patch index 2829bd4e..238b4029 100644 --- a/patches/ntdll-Junction_Points/0003-ntdll-Add-support-for-deleting-junction-points.patch +++ b/patches/ntdll-Junction_Points/0003-ntdll-Add-support-for-deleting-junction-points.patch @@ -1,19 +1,19 @@ -From 2e0449be946b4d73a4debb712d5032d79bd93878 Mon Sep 17 00:00:00 2001 +From 295b74af626b2870ff5f6923d7138f0c0ccb7346 Mon Sep 17 00:00:00 2001 From: "Erich E. Hoover" Date: Thu, 16 Jan 2014 21:00:21 -0700 Subject: ntdll: Add support for deleting junction points. --- - dlls/ntdll/file.c | 51 +++++++++++++++++++++++++++++++++++++++++++++++ - dlls/ntdll/tests/file.c | 23 +++++++++++++++++++++ - include/ntifs.h | 11 ++++++++++ + dlls/ntdll/file.c | 51 +++++++++++++++++++++++++++++++++++++++++++++++++ + dlls/ntdll/tests/file.c | 23 ++++++++++++++++++++++ + include/ntifs.h | 11 +++++++++++ 3 files changed, 85 insertions(+) diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c -index 39044ee..c8d1a31 100644 +index 6e73547..7abbc89 100644 --- a/dlls/ntdll/file.c +++ b/dlls/ntdll/file.c -@@ -1596,6 +1596,41 @@ cleanup: +@@ -1781,6 +1781,41 @@ cleanup: } @@ -55,9 +55,9 @@ index 39044ee..c8d1a31 100644 /************************************************************************** * NtFsControlFile [NTDLL.@] * ZwFsControlFile [NTDLL.@] -@@ -1744,6 +1779,22 @@ NTSTATUS WINAPI NtFsControlFile(HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc +@@ -1936,6 +1971,22 @@ NTSTATUS WINAPI SYSCALL(NtFsControlFile)(HANDLE handle, HANDLE event, PIO_APC_RO + status = STATUS_SUCCESS; break; - } + case FSCTL_DELETE_REPARSE_POINT: + { @@ -79,10 +79,10 @@ index 39044ee..c8d1a31 100644 { REPARSE_DATA_BUFFER *buffer = (REPARSE_DATA_BUFFER *)out_buffer; diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c -index 5c218d7..f84f6ea 100644 +index e07e6a8..b9aa665 100644 --- a/dlls/ntdll/tests/file.c +++ b/dlls/ntdll/tests/file.c -@@ -2708,12 +2708,15 @@ static void test_junction_points(void) +@@ -4298,12 +4298,15 @@ static void test_junction_points(void) static const WCHAR junctionW[] = {'\\','j','u','n','c','t','i','o','n',0}; WCHAR path[MAX_PATH], junction_path[MAX_PATH], target_path[MAX_PATH]; static const WCHAR targetW[] = {'\\','t','a','r','g','e','t',0}; @@ -98,7 +98,7 @@ index 5c218d7..f84f6ea 100644 UNICODE_STRING nameW; HANDLE hJunction; WCHAR *dest; -@@ -2761,6 +2764,8 @@ static void test_junction_points(void) +@@ -4351,6 +4354,8 @@ static void test_junction_points(void) win_skip("Failed to open junction point directory handle (0x%x).\n", GetLastError()); goto cleanup; } @@ -107,7 +107,7 @@ index 5c218d7..f84f6ea 100644 buffer_len = build_reparse_buffer(nameW.Buffer, &buffer); bret = DeviceIoControl(hJunction, FSCTL_SET_REPARSE_POINT, (LPVOID)buffer, buffer_len, NULL, 0, &dwret, 0); ok(bret, "Failed to create junction point! (0x%x)\n", GetLastError()); -@@ -2775,6 +2780,24 @@ static void test_junction_points(void) +@@ -4365,6 +4370,24 @@ static void test_junction_points(void) ok(bret, "Failed to read junction point!\n"); ok((memcmp(dest, nameW.Buffer, string_len) == 0), "Junction point destination does not match ('%s' != '%s')!\n", wine_dbgstr_w(dest), wine_dbgstr_w(nameW.Buffer)); @@ -155,5 +155,5 @@ index db07c28..cb8638b 100644 #endif /* __WINE_NTIFS_H */ -- -1.7.9.5 +2.6.1 diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 4ec2c3ec..9e8fcf17 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -52,7 +52,7 @@ usage() # Get the upstream commit sha upstream_commit() { - echo "59cca65ce0edd88b65a55a847468761e11dfab0b" + echo "8075101480df82c5f4280d534f2d76f035653667" } # Show version information @@ -137,7 +137,6 @@ patch_enable_all () enable_dxgi_MakeWindowAssociation="$1" enable_dxva2_Video_Decoder="$1" enable_fonts_Missing_Fonts="$1" - enable_gdi32_Default_Palette="$1" enable_gdi32_Lazy_Font_Initialization="$1" enable_gdi32_MaxPixelFormats="$1" enable_gdi32_MultiMonitor="$1" @@ -180,7 +179,6 @@ patch_enable_all () enable_ntdll_APC_Start_Process="$1" enable_ntdll_Activation_Context="$1" enable_ntdll_CLI_Images="$1" - enable_ntdll_Consolidation_Callback="$1" enable_ntdll_DOS_Attributes="$1" enable_ntdll_Dealloc_Thread_Stack="$1" enable_ntdll_DeviceType_Systemroot="$1" @@ -278,7 +276,6 @@ patch_enable_all () enable_user32_Mouse_Message_Hwnd="$1" enable_user32_Painting="$1" enable_user32_Refresh_MDI_Menus="$1" - enable_user32_ReleaseCapture="$1" enable_user32_ScrollWindowEx="$1" enable_user32_WndProc="$1" enable_uxtheme_GTK_Theming="$1" @@ -509,9 +506,6 @@ patch_enable () fonts-Missing_Fonts) enable_fonts_Missing_Fonts="$2" ;; - gdi32-Default_Palette) - enable_gdi32_Default_Palette="$2" - ;; gdi32-Lazy_Font_Initialization) enable_gdi32_Lazy_Font_Initialization="$2" ;; @@ -638,9 +632,6 @@ patch_enable () ntdll-CLI_Images) enable_ntdll_CLI_Images="$2" ;; - ntdll-Consolidation_Callback) - enable_ntdll_Consolidation_Callback="$2" - ;; ntdll-DOS_Attributes) enable_ntdll_DOS_Attributes="$2" ;; @@ -932,9 +923,6 @@ patch_enable () user32-Refresh_MDI_Menus) enable_user32_Refresh_MDI_Menus="$2" ;; - user32-ReleaseCapture) - enable_user32_ReleaseCapture="$2" - ;; user32-ScrollWindowEx) enable_user32_ScrollWindowEx="$2" ;; @@ -3142,21 +3130,6 @@ if test "$enable_fonts_Missing_Fonts" -eq 1; then ) >> "$patchlist" fi -# Patchset gdi32-Default_Palette -# | -# | This patchset fixes the following Wine bugs: -# | * [#36895] Return default palette entries from GetSystemPaletteEntries for non-palette-based devices -# | -# | Modified files: -# | * dlls/gdi32/palette.c, dlls/gdi32/tests/palette.c -# | -if test "$enable_gdi32_Default_Palette" -eq 1; then - patch_apply gdi32-Default_Palette/0001-gdi32-Return-default-palette-entries-from-GetSystemP.patch - ( - echo '+ { "Anton Baskanov", "gdi32: Return default palette entries from GetSystemPaletteEntries for non-palette-based devices.", 1 },'; - ) >> "$patchlist" -fi - # Patchset gdi32-Lazy_Font_Initialization # | # | Modified files: @@ -3910,21 +3883,6 @@ if test "$enable_ntdll_CLI_Images" -eq 1; then ) >> "$patchlist" fi -# Patchset ntdll-Consolidation_Callback -# | -# | This patchset fixes the following Wine bugs: -# | * [#39449] Use wrapper function for consolidation callback during unwinding. -# | -# | Modified files: -# | * dlls/ntdll/signal_x86_64.c -# | -if test "$enable_ntdll_Consolidation_Callback" -eq 1; then - patch_apply ntdll-Consolidation_Callback/0001-ntdll-Use-wrapper-function-for-consolidation-callbac.patch - ( - echo '+ { "Sebastian Lackner", "ntdll: Use wrapper function for consolidate callback on x86_64.", 1 },'; - ) >> "$patchlist" -fi - # Patchset ntdll-Syscall_Wrappers # | # | This patchset fixes the following Wine bugs: @@ -5453,21 +5411,6 @@ if test "$enable_user32_Refresh_MDI_Menus" -eq 1; then ) >> "$patchlist" fi -# Patchset user32-ReleaseCapture -# | -# | This patchset fixes the following Wine bugs: -# | * [#39296] Release capture before sending WM_COMMAND -# | -# | Modified files: -# | * dlls/user32/button.c -# | -if test "$enable_user32_ReleaseCapture" -eq 1; then - patch_apply user32-ReleaseCapture/0001-user32-Release-capture-before-sending-WM_COMMAND.patch - ( - echo '+ { "Alex Henrie", "user32: Release capture before sending WM_COMMAND.", 1 },'; - ) >> "$patchlist" -fi - # Patchset user32-ScrollWindowEx # | # | This patchset fixes the following Wine bugs: @@ -6546,11 +6489,9 @@ 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-asynchronous-support-for-TransmitFile.-re.patch - patch_apply ws2_32-TransmitFile/0002-ws2_32-Add-support-for-TF_DISCONNECT-to-TransmitFile.patch - patch_apply ws2_32-TransmitFile/0003-ws2_32-Add-support-for-TF_REUSE_SOCKET-to-TransmitFi.patch + patch_apply ws2_32-TransmitFile/0001-ws2_32-Add-support-for-TF_DISCONNECT-to-TransmitFile.patch + patch_apply ws2_32-TransmitFile/0002-ws2_32-Add-support-for-TF_REUSE_SOCKET-to-TransmitFi.patch ( - echo '+ { "Erich E. Hoover", "ws2_32: Add asynchronous support for TransmitFile.", 1 },'; echo '+ { "Erich E. Hoover", "ws2_32: Add support for TF_DISCONNECT to TransmitFile.", 1 },'; echo '+ { "Erich E. Hoover", "ws2_32: Add support for TF_REUSE_SOCKET to TransmitFile.", 1 },'; ) >> "$patchlist" diff --git a/patches/user32-ReleaseCapture/0001-user32-Release-capture-before-sending-WM_COMMAND.patch b/patches/user32-ReleaseCapture/0001-user32-Release-capture-before-sending-WM_COMMAND.patch deleted file mode 100644 index e8e5fa47..00000000 --- a/patches/user32-ReleaseCapture/0001-user32-Release-capture-before-sending-WM_COMMAND.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 031d48634a011950fec9990d4bccf835d5b016fa Mon Sep 17 00:00:00 2001 -From: Alex Henrie -Date: Mon, 12 Oct 2015 01:30:51 -0600 -Subject: user32: Release capture before sending WM_COMMAND. - -Fixes https://bugs.winehq.org/show_bug.cgi?id=39296 - -Signed-off-by: Alex Henrie ---- - dlls/user32/button.c | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -diff --git a/dlls/user32/button.c b/dlls/user32/button.c -index eeb3035..db479a8 100644 ---- a/dlls/user32/button.c -+++ b/dlls/user32/button.c -@@ -353,9 +353,13 @@ LRESULT ButtonWndProc_common(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, - (state & BST_INDETERMINATE) ? 0 : ((state & 3) + 1), 0 ); - break; - } -+ ReleaseCapture(); - BUTTON_NOTIFY_PARENT(hWnd, BN_CLICKED); - } -- ReleaseCapture(); -+ else -+ { -+ ReleaseCapture(); -+ } - break; - - case WM_CAPTURECHANGED: --- -2.6.1 - diff --git a/patches/user32-ReleaseCapture/definition b/patches/user32-ReleaseCapture/definition deleted file mode 100644 index 3deafa56..00000000 --- a/patches/user32-ReleaseCapture/definition +++ /dev/null @@ -1 +0,0 @@ -Fixes: [39296] Release capture before sending WM_COMMAND diff --git a/patches/wined3d-CSMT_Main/9999-IfDefined.patch b/patches/wined3d-CSMT_Main/9999-IfDefined.patch index 76b2eb01..38ea6679 100644 --- a/patches/wined3d-CSMT_Main/9999-IfDefined.patch +++ b/patches/wined3d-CSMT_Main/9999-IfDefined.patch @@ -1687,7 +1687,7 @@ diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c /* Vendor-specific formats like ATI2N are a non-issue here since they're not * supported as offscreen plain surfaces and do not support D3DUSAGE_RENDERTARGET * when created as texture. */ -@@ -17363,7 +17367,11 @@ +@@ -17371,7 +17375,11 @@ fill_surface(surface_managed, 0x0000ff00, D3DLOCK_NO_DIRTY_UPDATE); add_dirty_rect_test_draw(device); color = getPixelColor(device, 320, 240); @@ -6034,7 +6034,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c } void wined3d_texture_set_swapchain(struct wined3d_texture *texture, struct wined3d_swapchain *swapchain) -@@ -421,10 +436,16 @@ +@@ -419,10 +434,16 @@ if (!refcount) { @@ -6051,7 +6051,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c } return refcount; -@@ -496,8 +517,15 @@ +@@ -494,8 +515,15 @@ void CDECL wined3d_texture_preload(struct wined3d_texture *texture) { @@ -6067,7 +6067,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c } void * CDECL wined3d_texture_get_parent(const struct wined3d_texture *texture) -@@ -526,6 +554,7 @@ +@@ -524,6 +552,7 @@ if (texture->lod != lod) { @@ -6075,7 +6075,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c if (wined3d_settings.cs_multithreaded) { struct wined3d_device *device = texture->resource.device; -@@ -533,6 +562,7 @@ +@@ -531,6 +560,7 @@ device->cs->ops->finish(device->cs); } @@ -6083,7 +6083,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c texture->lod = lod; texture->texture_rgb.base_level = ~0u; -@@ -651,10 +681,14 @@ +@@ -649,10 +679,14 @@ } if (device->d3d_initialized) @@ -6098,7 +6098,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c texture->resource.format = format; texture->resource.multisample_type = multisample_type; -@@ -789,11 +823,19 @@ +@@ -787,11 +821,19 @@ struct wined3d_surface *surface = surface_from_resource(sub_resource); struct wined3d_context *context; @@ -6118,7 +6118,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c } static void texture2d_sub_resource_cleanup(struct wined3d_resource *sub_resource) -@@ -805,12 +847,25 @@ +@@ -803,12 +845,25 @@ static void texture2d_sub_resource_invalidate_location(struct wined3d_resource *sub_resource, DWORD location) { @@ -6144,7 +6144,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c } static void texture2d_sub_resource_upload_data(struct wined3d_resource *sub_resource, -@@ -889,6 +944,7 @@ +@@ -887,6 +942,7 @@ if (gl_info->supported[APPLE_CLIENT_STORAGE]) { @@ -6152,7 +6152,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c if (surface->flags & (SFLAG_NONPOW2) || texture->flags & WINED3D_TEXTURE_CONVERTED) { -@@ -897,12 +953,26 @@ +@@ -895,12 +951,26 @@ * WINED3D_TEXTURE_CONVERTED: The conversion destination memory is freed after loading the surface * heap_memory == NULL: Not defined in the extension. Seems to disable client storage effectively */ @@ -6179,7 +6179,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c surface->flags |= SFLAG_CLIENT; mem = surface->resource.heap_memory; -@@ -985,6 +1055,7 @@ +@@ -983,6 +1053,7 @@ wined3d_texture_unload_gl_texture(texture); } @@ -6187,7 +6187,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"); -@@ -1004,6 +1075,13 @@ +@@ -1002,6 +1073,13 @@ wined3d_texture_unload, wined3d_texture_load_location_invalidated, wined3d_texture_load_location, @@ -6201,7 +6201,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, -@@ -1020,7 +1098,9 @@ +@@ -1018,7 +1096,9 @@ if (WINED3DFMT_UNKNOWN >= desc->format) { WARN("(%p) : Texture cannot be created with a format of WINED3DFMT_UNKNOWN.\n", texture); @@ -6211,7 +6211,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c return WINED3DERR_INVALIDCALL; } -@@ -1030,6 +1110,7 @@ +@@ -1028,6 +1108,7 @@ if (!gl_info->supported[SGIS_GENERATE_MIPMAP]) { WARN("No mipmap generation support, returning D3DERR_INVALIDCALL.\n"); @@ -6219,7 +6219,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c HeapFree(GetProcessHeap(), 0, texture); return WINED3DERR_INVALIDCALL; } -@@ -1038,6 +1119,14 @@ +@@ -1036,6 +1117,14 @@ { WARN("WINED3DUSAGE_AUTOGENMIPMAP is set, and level count != 1, returning D3DERR_INVALIDCALL.\n"); HeapFree(GetProcessHeap(), 0, texture); @@ -6234,7 +6234,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c return WINED3DERR_INVALIDCALL; } } -@@ -1058,7 +1147,9 @@ +@@ -1056,7 +1145,9 @@ else { WARN("Attempted to create a NPOT cube texture (edge length %u) without GL support.\n", desc->width); @@ -6244,7 +6244,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c return WINED3DERR_INVALIDCALL; } } -@@ -1068,7 +1159,9 @@ +@@ -1066,7 +1157,9 @@ surface_flags, device, parent, parent_ops, &texture_resource_ops))) { WARN("Failed to initialize texture, returning %#x\n", hr); @@ -6254,7 +6254,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c return hr; } -@@ -1131,7 +1224,9 @@ +@@ -1129,7 +1222,9 @@ if (WINED3DFMT_UNKNOWN >= desc->format) { WARN("(%p) : Texture cannot be created with a format of WINED3DFMT_UNKNOWN.\n", texture); @@ -6264,7 +6264,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c return WINED3DERR_INVALIDCALL; } -@@ -1162,7 +1257,9 @@ +@@ -1160,7 +1255,9 @@ else { WARN("Attempted to create a mipmapped NPOT texture without unconditional NPOT support.\n"); @@ -6274,7 +6274,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c return WINED3DERR_INVALIDCALL; } } -@@ -1175,6 +1272,7 @@ +@@ -1173,6 +1270,7 @@ if (!gl_info->supported[SGIS_GENERATE_MIPMAP]) { WARN("No mipmap generation support, returning WINED3DERR_INVALIDCALL.\n"); @@ -6282,7 +6282,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c HeapFree(GetProcessHeap(), 0, texture); return WINED3DERR_INVALIDCALL; } -@@ -1183,6 +1281,14 @@ +@@ -1181,6 +1279,14 @@ { WARN("WINED3DUSAGE_AUTOGENMIPMAP is set, and level count != 1, returning WINED3DERR_INVALIDCALL.\n"); HeapFree(GetProcessHeap(), 0, texture); @@ -6297,7 +6297,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c return WINED3DERR_INVALIDCALL; } } -@@ -1191,7 +1297,9 @@ +@@ -1189,7 +1295,9 @@ surface_flags, device, parent, parent_ops, &texture_resource_ops))) { WARN("Failed to initialize texture, returning %#x.\n", hr); @@ -6307,7 +6307,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c return hr; } -@@ -1277,12 +1385,25 @@ +@@ -1275,12 +1383,25 @@ static void texture3d_sub_resource_invalidate_location(struct wined3d_resource *sub_resource, DWORD location) { @@ -6333,7 +6333,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, -@@ -1292,7 +1413,11 @@ +@@ -1290,7 +1411,11 @@ struct wined3d_const_bo_address addr; unsigned int row_pitch, slice_pitch; @@ -6345,7 +6345,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); -@@ -1317,7 +1442,11 @@ +@@ -1315,7 +1440,11 @@ void *mem = NULL; if (gl_info->supported[APPLE_CLIENT_STORAGE] && !format->convert @@ -6357,7 +6357,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); -@@ -1377,6 +1506,7 @@ +@@ -1375,6 +1504,7 @@ if (WINED3DFMT_UNKNOWN >= desc->format) { WARN("(%p) : Texture cannot be created with a format of WINED3DFMT_UNKNOWN.\n", texture); @@ -6365,7 +6365,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c HeapFree(GetProcessHeap(), 0, texture); return WINED3DERR_INVALIDCALL; } -@@ -1385,6 +1515,14 @@ +@@ -1383,6 +1513,14 @@ { WARN("(%p) : Texture cannot be created - no volume texture support.\n", texture); HeapFree(GetProcessHeap(), 0, texture); @@ -6380,7 +6380,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c return WINED3DERR_INVALIDCALL; } -@@ -1394,6 +1532,7 @@ +@@ -1392,6 +1530,7 @@ if (!gl_info->supported[SGIS_GENERATE_MIPMAP]) { WARN("No mipmap generation support, returning D3DERR_INVALIDCALL.\n"); @@ -6388,7 +6388,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c HeapFree(GetProcessHeap(), 0, texture); return WINED3DERR_INVALIDCALL; } -@@ -1402,6 +1541,14 @@ +@@ -1400,6 +1539,14 @@ { WARN("WINED3DUSAGE_AUTOGENMIPMAP is set, and level count != 1, returning D3DERR_INVALIDCALL.\n"); HeapFree(GetProcessHeap(), 0, texture); @@ -6403,7 +6403,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c return WINED3DERR_INVALIDCALL; } } -@@ -1429,7 +1576,9 @@ +@@ -1427,7 +1574,9 @@ { WARN("Attempted to create a NPOT volume texture (%u, %u, %u) without GL support.\n", desc->width, desc->height, desc->depth); @@ -6413,7 +6413,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c return WINED3DERR_INVALIDCALL; } } -@@ -1439,7 +1588,9 @@ +@@ -1437,7 +1586,9 @@ 0, device, parent, parent_ops, &texture_resource_ops))) { WARN("Failed to initialize texture, returning %#x.\n", hr); @@ -6423,7 +6423,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c return hr; } -@@ -1540,6 +1691,9 @@ +@@ -1538,6 +1689,9 @@ if (FAILED(hr)) { WARN("Failed to initialize texture, returning %#x.\n", hr); @@ -7830,7 +7830,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c surface->ds_current_size.cx = surface->resource.width; surface->ds_current_size.cy = surface->resource.height; return; -@@ -3650,9 +4469,13 @@ +@@ -3649,9 +4468,13 @@ context_invalidate_state(context, STATE_FRAMEBUFFER); @@ -7844,7 +7844,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c gl_info->gl_ops.gl.p_glFlush(); /* Flush to ensure ordering across contexts. */ } else if (location == WINED3D_LOCATION_DRAWABLE) -@@ -3668,9 +4491,13 @@ +@@ -3667,9 +4490,13 @@ context_invalidate_state(context, STATE_FRAMEBUFFER); @@ -7858,7 +7858,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c gl_info->gl_ops.gl.p_glFlush(); /* Flush to ensure ordering across contexts. */ } else -@@ -3678,6 +4505,7 @@ +@@ -3677,6 +4504,7 @@ ERR("Invalid location (%#x) specified.\n", location); } @@ -7866,7 +7866,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c surface->resource.locations |= location; surface->ds_current_size.cx = surface->resource.width; surface->ds_current_size.cy = surface->resource.height; -@@ -3710,6 +4538,124 @@ +@@ -3709,6 +4537,124 @@ FIXME("Can't load surface %p with location flags %s into sysmem.\n", surface, wined3d_debug_location(surface->resource.locations)); @@ -7991,7 +7991,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c } /* Context activation is done by the caller. */ -@@ -3718,12 +4664,14 @@ +@@ -3717,12 +4663,14 @@ { RECT r; @@ -8006,7 +8006,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c if (wined3d_settings.offscreen_rendering_mode == ORM_FBO && wined3d_resource_is_offscreen(&surface->container->resource)) { -@@ -3732,7 +4680,11 @@ +@@ -3731,7 +4679,11 @@ } surface_get_rect(surface, NULL, &r); @@ -8018,7 +8018,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c surface_blt_to_drawable(surface->resource.device, context, WINED3D_TEXF_POINT, FALSE, surface, &r, surface, &r); -@@ -3747,6 +4699,7 @@ +@@ -3746,6 +4698,7 @@ struct wined3d_device *device = surface->resource.device; const struct wined3d_color_key_conversion *conversion; struct wined3d_texture *texture = surface->container; @@ -8026,7 +8026,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c UINT width, src_row_pitch, src_slice_pitch, dst_pitch; struct wined3d_bo_address data; struct wined3d_format format; -@@ -3773,6 +4726,24 @@ +@@ -3772,6 +4725,24 @@ } if (surface->resource.locations & (WINED3D_LOCATION_TEXTURE_SRGB | WINED3D_LOCATION_TEXTURE_RGB) @@ -8051,7 +8051,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c && (surface->container->resource.format_flags & WINED3DFMT_FLAG_FBO_ATTACHABLE_SRGB) && fbo_blit_supported(gl_info, WINED3D_BLIT_OP_COLOR_BLIT, NULL, surface->resource.usage, surface->resource.pool, surface->resource.format, -@@ -3788,6 +4759,7 @@ +@@ -3787,6 +4758,7 @@ return WINED3D_OK; } @@ -8059,7 +8059,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c if (surface->resource.locations & (WINED3D_LOCATION_RB_MULTISAMPLE | WINED3D_LOCATION_RB_RESOLVED) && (!srgb || (surface->container->resource.format_flags & WINED3DFMT_FLAG_FBO_ATTACHABLE_SRGB)) && fbo_blit_supported(gl_info, WINED3D_BLIT_OP_COLOR_BLIT, -@@ -3795,6 +4767,15 @@ +@@ -3794,6 +4766,15 @@ NULL, surface->resource.usage, surface->resource.pool, surface->resource.format)) { DWORD src_location = surface->resource.locations & WINED3D_LOCATION_RB_RESOLVED ? @@ -8075,7 +8075,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c WINED3D_LOCATION_RB_RESOLVED : WINED3D_LOCATION_RB_MULTISAMPLE; DWORD dst_location = srgb ? WINED3D_LOCATION_TEXTURE_SRGB : WINED3D_LOCATION_TEXTURE_RGB; RECT rect = {0, 0, surface->resource.width, surface->resource.height}; -@@ -3809,6 +4790,7 @@ +@@ -3808,6 +4789,7 @@ if (srgb) { @@ -8083,7 +8083,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c if ((surface->resource.locations & (WINED3D_LOCATION_TEXTURE_RGB | surface->resource.map_binding)) == WINED3D_LOCATION_TEXTURE_RGB) { -@@ -3843,6 +4825,42 @@ +@@ -3842,6 +4824,42 @@ width = surface->resource.width; wined3d_resource_get_pitch(&surface->resource, &src_row_pitch, &src_slice_pitch); @@ -8126,7 +8126,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c format = *texture->resource.format; if ((conversion = wined3d_format_get_color_key_conversion(texture, TRUE))) -@@ -3851,7 +4869,11 @@ +@@ -3850,7 +4868,11 @@ /* Don't use PBOs for converted surfaces. During PBO conversion we look at * WINED3D_TEXTURE_CONVERTED but it isn't set (yet) in all cases it is * getting called. */ @@ -8138,7 +8138,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c { TRACE("Removing the pbo attached to surface %p.\n", surface); -@@ -3860,6 +4882,7 @@ +@@ -3859,6 +4881,7 @@ else surface->resource.map_binding = WINED3D_LOCATION_SYSMEM; @@ -8146,7 +8146,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c wined3d_resource_prepare_map_memory(&surface->resource, context); wined3d_resource_load_location(&surface->resource, context, surface->resource.map_binding); wined3d_resource_free_bo(&surface->resource); -@@ -3867,6 +4890,14 @@ +@@ -3866,6 +4889,14 @@ } wined3d_resource_get_memory(&surface->resource, surface->resource.locations, &data); @@ -8161,7 +8161,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c if (format.convert) { /* This code is entered for texture formats which need a fixup. */ -@@ -3881,9 +4912,15 @@ +@@ -3880,9 +4911,15 @@ context_release(context); return E_OUTOFMEMORY; } @@ -8177,7 +8177,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c data.addr = mem; } else if (conversion) -@@ -3903,6 +4940,7 @@ +@@ -3902,6 +4939,7 @@ } if (texture->swapchain && texture->swapchain->palette) palette = texture->swapchain->palette; @@ -8185,7 +8185,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c conversion->convert(data.addr, src_row_pitch, mem, dst_pitch, width, height, palette, &texture->async.gl_color_key); src_row_pitch = dst_pitch; -@@ -3911,6 +4949,16 @@ +@@ -3910,6 +4948,16 @@ wined3d_surface_upload_data(surface, gl_info, &format, &src_rect, src_row_pitch, &dst_point, srgb, wined3d_const_bo_address(&data)); @@ -8202,7 +8202,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c HeapFree(GetProcessHeap(), 0, mem); -@@ -3922,7 +4970,11 @@ +@@ -3921,7 +4969,11 @@ { RECT rect = {0, 0, surface->resource.width, surface->resource.height}; @@ -8214,7 +8214,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c ERR("Trying to resolve multisampled surface %p, but location WINED3D_LOCATION_RB_MULTISAMPLE not current.\n", surface); -@@ -3930,42 +4982,89 @@ +@@ -3929,42 +4981,89 @@ surface, WINED3D_LOCATION_RB_MULTISAMPLE, &rect, surface, WINED3D_LOCATION_RB_RESOLVED, &rect); } @@ -8314,7 +8314,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c } switch (location) -@@ -3979,7 +5078,11 @@ +@@ -3978,7 +5077,11 @@ case WINED3D_LOCATION_DRAWABLE: if (FAILED(hr = surface_load_drawable(surface, context))) @@ -8326,7 +8326,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c break; case WINED3D_LOCATION_RB_RESOLVED: -@@ -3990,7 +5093,11 @@ +@@ -3989,7 +5092,11 @@ case WINED3D_LOCATION_TEXTURE_SRGB: if (FAILED(hr = surface_load_texture(surface, context, location == WINED3D_LOCATION_TEXTURE_SRGB))) @@ -8338,7 +8338,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c break; default: -@@ -3998,12 +5105,21 @@ +@@ -3997,12 +5104,21 @@ break; } @@ -8360,7 +8360,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c } static HRESULT ffp_blit_alloc(struct wined3d_device *device) { return WINED3D_OK; } -@@ -4111,6 +5227,7 @@ +@@ -4110,6 +5226,7 @@ const RECT *dst_rect, const struct wined3d_color *color) { const RECT draw_rect = {0, 0, dst_surface->resource.width, dst_surface->resource.height}; @@ -8368,7 +8368,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c struct wined3d_rendertarget_view view, *view_ptr = &view; struct wined3d_fb_state fb = {&view_ptr, NULL, 1}; struct wined3d_texture *texture = dst_surface->container; -@@ -4131,6 +5248,21 @@ +@@ -4130,6 +5247,21 @@ view.sub_resource_idx = dst_surface->texture_layer * texture->level_count + dst_surface->texture_level; device_clear_render_targets(device, 1, &fb, 1, dst_rect, &draw_rect, WINED3DCLEAR_TARGET, color, 0.0f, 0); @@ -8390,7 +8390,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c return WINED3D_OK; } -@@ -4139,6 +5271,7 @@ +@@ -4138,6 +5270,7 @@ const RECT *dst_rect, float depth) { const RECT draw_rect = {0, 0, dst_surface->resource.width, dst_surface->resource.height}; @@ -8398,7 +8398,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c struct wined3d_rendertarget_view view; struct wined3d_fb_state fb = {NULL, &view}; struct wined3d_texture *texture = dst_surface->container; -@@ -4154,6 +5287,20 @@ +@@ -4153,6 +5286,20 @@ view.sub_resource_idx = dst_surface->texture_layer * texture->level_count + dst_surface->texture_level; device_clear_render_targets(device, 0, &fb, 1, dst_rect, &draw_rect, WINED3DCLEAR_ZBUFFER, 0, depth, 0); @@ -8419,7 +8419,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c return WINED3D_OK; } -@@ -4182,8 +5329,13 @@ +@@ -4181,8 +5328,13 @@ wined3d_texture_set_color_key(src_surface->container, WINED3D_CKEY_SRC_BLT, (old_color_key_flags & WINED3D_CKEY_SRC_BLT) ? &old_blt_key : NULL); @@ -8433,7 +8433,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c } const struct blit_shader ffp_blit = { -@@ -4339,6 +5491,7 @@ +@@ -4338,6 +5490,7 @@ struct wined3d_surface *src_surface, const RECT *src_rect, DWORD flags, const WINEDDBLTFX *fx, enum wined3d_texture_filter_type filter) { @@ -8441,7 +8441,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c int bpp, srcheight, srcwidth, dstheight, dstwidth, width; const struct wined3d_format *src_format, *dst_format; unsigned int src_fmt_flags, dst_fmt_flags; -@@ -4373,6 +5526,28 @@ +@@ -4372,6 +5525,28 @@ wined3d_resource_get_pitch(&dst_surface->resource, &dst_row_pitch, &dst_slice_pitch); src_data = dst_data; src_row_pitch = dst_row_pitch; @@ -8470,7 +8470,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c src_format = dst_surface->resource.format; dst_format = src_format; dst_fmt_flags = dst_surface->container->resource.format_flags; -@@ -4384,12 +5559,14 @@ +@@ -4383,12 +5558,14 @@ dst_fmt_flags = dst_surface->container->resource.format_flags; if (src_surface) { @@ -8485,7 +8485,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c if (dst_surface->resource.format->id != src_surface->resource.format->id) { if (!(src_texture = surface_convert_format(src_surface, dst_format->id))) -@@ -4400,9 +5577,13 @@ +@@ -4399,9 +5576,13 @@ } src_surface = surface_from_resource(wined3d_texture_get_sub_resource(src_texture, 0)); } @@ -8499,7 +8499,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c src_format = src_surface->resource.format; src_fmt_flags = src_surface->container->resource.format_flags; } -@@ -4412,8 +5593,12 @@ +@@ -4411,8 +5592,12 @@ src_fmt_flags = dst_fmt_flags; } @@ -8512,7 +8512,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c } bpp = dst_surface->resource.format->byte_count; -@@ -4424,12 +5609,24 @@ +@@ -4423,12 +5608,24 @@ width = (dst_rect->right - dst_rect->left) * bpp; if (src_surface) @@ -8537,7 +8537,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c if (src_fmt_flags & dst_fmt_flags & WINED3DFMT_FLAG_BLOCKS) { -@@ -4464,7 +5661,11 @@ +@@ -4463,7 +5660,11 @@ } hr = surface_cpu_blt_compressed(sbase, dbuf, @@ -8549,7 +8549,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c src_format, flags, fx); goto release; } -@@ -4472,7 +5673,11 @@ +@@ -4471,7 +5672,11 @@ /* First, all the 'source-less' blits */ if (flags & WINEDDBLT_COLORFILL) { @@ -8561,7 +8561,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c flags &= ~WINEDDBLT_COLORFILL; } -@@ -4521,6 +5726,7 @@ +@@ -4520,6 +5725,7 @@ for (y = 0; y < dstheight; ++y) { memcpy(dbuf, sbuf, width); @@ -8569,7 +8569,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c sbuf += src_row_pitch; dbuf += dst_row_pitch; } -@@ -4534,6 +5740,21 @@ +@@ -4533,6 +5739,21 @@ { sbuf -= src_row_pitch; dbuf -= dst_row_pitch; @@ -8591,7 +8591,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c memcpy(dbuf, sbuf, width); } } -@@ -4543,8 +5764,13 @@ +@@ -4542,8 +5763,13 @@ for (y = 0; y < dstheight; ++y) { memmove(dbuf, sbuf, width); @@ -8605,7 +8605,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c } } } -@@ -4553,9 +5779,15 @@ +@@ -4552,9 +5778,15 @@ /* Stretching in y direction only. */ for (y = sy = 0; y < dstheight; ++y, sy += yinc) { @@ -8621,7 +8621,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c } } } -@@ -4565,6 +5797,7 @@ +@@ -4564,6 +5796,7 @@ int last_sy = -1; for (y = sy = 0; y < dstheight; ++y, sy += yinc) { @@ -8629,7 +8629,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c sbuf = sbase + (sy >> 16) * src_row_pitch; if ((sy >> 16) == (last_sy >> 16)) -@@ -4572,6 +5805,15 @@ +@@ -4571,6 +5804,15 @@ /* This source row is the same as last source row - * Copy the already stretched row. */ memcpy(dbuf, dbuf - dst_row_pitch, width); @@ -8645,7 +8645,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c } else { -@@ -4618,6 +5860,7 @@ +@@ -4617,6 +5859,7 @@ } #undef STRETCH_ROW } @@ -8653,7 +8653,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c dbuf += dst_row_pitch; last_sy = sy; } -@@ -4626,6 +5869,16 @@ +@@ -4625,6 +5868,16 @@ else { LONG dstyinc = dst_row_pitch, dstxinc = bpp; @@ -8670,7 +8670,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c DWORD keylow = 0xffffffff, keyhigh = 0, keymask = 0xffffffff; DWORD destkeylow = 0x0, destkeyhigh = 0xffffffff, destkeymask = 0xffffffff; if (flags & (WINEDDBLT_KEYSRC | WINEDDBLT_KEYDEST | WINEDDBLT_KEYSRCOVERRIDE | WINEDDBLT_KEYDESTOVERRIDE)) -@@ -4675,7 +5928,11 @@ +@@ -4674,7 +5927,11 @@ LONG tmpxy; dTopLeft = dbuf; dTopRight = dbuf + ((dstwidth - 1) * bpp); @@ -8682,7 +8682,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c dBottomRight = dBottomLeft + ((dstwidth - 1) * bpp); if (fx->dwDDFX & WINEDDBLTFX_ARITHSTRETCHY) -@@ -4752,6 +6009,7 @@ +@@ -4751,6 +6008,7 @@ flags &= ~(WINEDDBLT_DDFX); } @@ -8690,7 +8690,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c #define COPY_COLORKEY_FX(type) \ do { \ const type *s; \ -@@ -4773,6 +6031,29 @@ +@@ -4772,6 +6030,29 @@ d = (type *)(((BYTE *)d) + dstyinc); \ } \ } while(0) @@ -8720,7 +8720,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c switch (bpp) { -@@ -4791,7 +6072,11 @@ +@@ -4790,7 +6071,11 @@ BYTE *d = dbuf, *dx; for (y = sy = 0; y < dstheight; ++y, sy += yinc) { @@ -8732,7 +8732,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c dx = d; for (x = sx = 0; x < dstwidth; ++x, sx+= xinc) { -@@ -4822,10 +6107,12 @@ +@@ -4821,10 +6106,12 @@ } } @@ -8745,7 +8745,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c error: if (flags && FIXME_ON(d3d_surface)) { -@@ -4833,6 +6120,7 @@ +@@ -4832,6 +6119,7 @@ } release: @@ -8753,7 +8753,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c if (dst_data) { wined3d_resource_release_map_ptr(&dst_surface->resource, context); -@@ -4851,6 +6139,14 @@ +@@ -4850,6 +6138,14 @@ wined3d_texture_decref(src_texture); if (context) context_release(context); @@ -8768,7 +8768,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c return hr; } -@@ -4895,6 +6191,7 @@ +@@ -4894,6 +6190,7 @@ cpu_blit_blit_surface, }; @@ -8776,7 +8776,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c void surface_blt_ugly(struct wined3d_surface *dst_surface, const RECT *dst_rect, struct wined3d_surface *src_surface, const RECT *src_rect, DWORD flags, const WINEDDBLTFX *fx, enum wined3d_texture_filter_type filter) -@@ -4902,6 +6199,16 @@ +@@ -4901,6 +6198,16 @@ struct wined3d_swapchain *src_swapchain, *dst_swapchain; struct wined3d_device *device = dst_surface->resource.device; DWORD src_ds_flags, dst_ds_flags; @@ -8793,7 +8793,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c BOOL scale, convert; static const DWORD simple_blit = WINEDDBLT_ASYNC -@@ -4912,6 +6219,106 @@ +@@ -4911,6 +6218,106 @@ | WINEDDBLT_DEPTHFILL | WINEDDBLT_DONOTWAIT; @@ -8900,7 +8900,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c if (!device->d3d_initialized) { WARN("D3D not initialized, using fallback.\n"); -@@ -4954,8 +6361,13 @@ +@@ -4953,8 +6360,13 @@ } scale = src_surface @@ -8914,7 +8914,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c convert = src_surface && src_surface->resource.format->id != dst_surface->resource.format->id; dst_ds_flags = dst_surface->container->resource.format_flags -@@ -4975,6 +6387,7 @@ +@@ -4974,6 +6386,7 @@ TRACE("Depth fill.\n"); if (!surface_convert_depth_to_float(dst_surface, fx->u5.dwFillDepth, &depth)) @@ -8922,7 +8922,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c return; if (SUCCEEDED(wined3d_surface_depth_fill(dst_surface, dst_rect, depth))) -@@ -4985,6 +6398,24 @@ +@@ -4984,6 +6397,24 @@ if (SUCCEEDED(wined3d_surface_depth_blt(src_surface, src_surface->container->resource.draw_binding, src_rect, dst_surface, dst_surface->container->resource.draw_binding, dst_rect))) return; @@ -8947,7 +8947,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c } } else -@@ -4993,8 +6424,13 @@ +@@ -4992,8 +6423,13 @@ /* In principle this would apply to depth blits as well, but we don't * implement those in the CPU blitter at the moment. */ @@ -8961,7 +8961,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c { if (scale) TRACE("Not doing sysmem blit because of scaling.\n"); -@@ -5015,8 +6451,13 @@ +@@ -5014,8 +6450,13 @@ palette, fx->u5.dwFillColor, &color)) goto fallback; @@ -8975,7 +8975,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c } else { -@@ -5034,8 +6475,13 @@ +@@ -5033,8 +6474,13 @@ color_key = &src_surface->container->async.src_blt_color_key; blit_op = WINED3D_BLIT_OP_COLOR_BLIT_CKEY; } @@ -8989,7 +8989,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c { /* Upload */ if (scale) -@@ -5044,6 +6490,7 @@ +@@ -5043,6 +6489,7 @@ TRACE("Not doing upload because of format conversion.\n"); else { @@ -8997,7 +8997,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c POINT dst_point = {dst_rect->left, dst_rect->top}; if (SUCCEEDED(surface_upload_from_surface(dst_surface, &dst_point, src_surface, src_rect))) -@@ -5056,6 +6503,19 @@ +@@ -5055,6 +6502,19 @@ context_release(context); } return; @@ -9017,7 +9017,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c } } } -@@ -5079,6 +6539,7 @@ +@@ -5078,6 +6538,7 @@ wined3d_swapchain_present(dst_swapchain, NULL, NULL, dst_swapchain->win_handle, NULL, 0); dst_swapchain->desc.swap_effect = swap_effect; @@ -9025,7 +9025,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c return; } -@@ -5284,6 +6745,53 @@ +@@ -5283,6 +6744,53 @@ wined3d_surface_location_invalidated, wined3d_surface_load_location, }; @@ -9079,7 +9079,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c static HRESULT surface_init(struct wined3d_surface *surface, struct wined3d_texture *container, const struct wined3d_resource_desc *desc, GLenum target, unsigned int level, unsigned int layer, DWORD flags) -@@ -5345,7 +6853,11 @@ +@@ -5344,7 +6852,11 @@ } surface->container = container; @@ -9091,7 +9091,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c list_init(&surface->renderbuffers); list_init(&surface->overlays); -@@ -5377,9 +6889,14 @@ +@@ -5376,9 +6888,14 @@ if (surface->resource.map_binding == WINED3D_LOCATION_DIB) { wined3d_resource_free_sysmem(&surface->resource); @@ -9106,7 +9106,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c } return hr; -@@ -5406,7 +6923,11 @@ +@@ -5405,7 +6922,11 @@ if (FAILED(hr = surface_init(object, container, desc, target, level, layer, flags))) { WARN("Failed to initialize surface, returning %#x.\n", hr); diff --git a/patches/ws2_32-TransmitFile/0001-ws2_32-Add-asynchronous-support-for-TransmitFile.-re.patch b/patches/ws2_32-TransmitFile/0001-ws2_32-Add-asynchronous-support-for-TransmitFile.-re.patch deleted file mode 100644 index 67d23786..00000000 --- a/patches/ws2_32-TransmitFile/0001-ws2_32-Add-asynchronous-support-for-TransmitFile.-re.patch +++ /dev/null @@ -1,348 +0,0 @@ -From 38e2c0d234e1d3615ac26eeb4808a0446a6c72de Mon Sep 17 00:00:00 2001 -From: "Erich E. Hoover" -Date: Wed, 7 Oct 2015 12:19:42 -0600 -Subject: ws2_32: Add asynchronous support for TransmitFile. - -Signed-off-by: Erich E. Hoover ---- - dlls/ws2_32/socket.c | 89 ++++++++++++++++++++++++++++++++++++++-------- - dlls/ws2_32/tests/sock.c | 91 ++++++++++++++++++++++++++++++++++++++++++++---- - 2 files changed, 160 insertions(+), 20 deletions(-) - -diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c -index bc29f6d..4531b81 100644 ---- a/dlls/ws2_32/socket.c -+++ b/dlls/ws2_32/socket.c -@@ -177,6 +177,8 @@ - #define TCP_KEEPIDLE TCP_KEEPALIVE - #endif - -+#define FILE_USE_FILE_POINTER_POSITION ((LONGLONG)-2) -+ - WINE_DEFAULT_DEBUG_CHANNEL(winsock); - WINE_DECLARE_DEBUG_CHANNEL(winediag); - -@@ -524,6 +526,7 @@ struct ws2_transmitfile_async - DWORD bytes_per_send; - TRANSMIT_FILE_BUFFERS buffers; - DWORD flags; -+ LARGE_INTEGER offset; - struct ws2_async write; - }; - -@@ -2742,9 +2745,10 @@ static BOOL WINAPI WS2_AcceptEx(SOCKET listener, SOCKET acceptor, PVOID dest, DW - * - * Perform an APC-safe ReadFile operation - */ --static NTSTATUS WS2_ReadFile(HANDLE hFile, PIO_STATUS_BLOCK io_status, char* buffer, ULONG length) -+static NTSTATUS WS2_ReadFile(HANDLE hFile, PIO_STATUS_BLOCK io_status, char* buffer, ULONG length, -+ PLARGE_INTEGER offset) - { -- int result, unix_handle; -+ int result = -1, unix_handle; - unsigned int options; - NTSTATUS status; - -@@ -2753,8 +2757,12 @@ static NTSTATUS WS2_ReadFile(HANDLE hFile, PIO_STATUS_BLOCK io_status, char* buf - status = wine_server_handle_to_fd( hFile, FILE_READ_DATA, &unix_handle, &options ); - if (status) return status; - -- while ((result = read( unix_handle, buffer, length )) == -1) -+ while (result == -1) - { -+ if (offset && offset->QuadPart != FILE_USE_FILE_POINTER_POSITION) -+ result = pread( unix_handle, buffer, length, offset->QuadPart ); -+ else -+ result = read( unix_handle, buffer, length ); - if (errno != EINTR) - break; - } -@@ -2772,6 +2780,8 @@ static NTSTATUS WS2_ReadFile(HANDLE hFile, PIO_STATUS_BLOCK io_status, char* buf - TRACE("= 0x%08x (%d)\n", status, result); - if (status == STATUS_SUCCESS || status == STATUS_END_OF_FILE) - { -+ if (offset && offset->QuadPart != FILE_USE_FILE_POINTER_POSITION) -+ offset->QuadPart += result; - io_status->u.Status = status; - io_status->Information = result; - } -@@ -2811,7 +2821,7 @@ static NTSTATUS WS2_transmitfile_getbuffer( int fd, struct ws2_transmitfile_asyn - /* when the size of the transfer is limited ensure that we don't go past that limit */ - if (wsa->file_bytes != 0) - bytes_per_send = min(bytes_per_send, wsa->file_bytes - wsa->file_read); -- status = WS2_ReadFile( wsa->file, &iosb, wsa->buffer, bytes_per_send ); -+ status = WS2_ReadFile( wsa->file, &iosb, wsa->buffer, bytes_per_send, &wsa->offset ); - if (status == STATUS_END_OF_FILE) - wsa->file = NULL; /* continue on to the footer */ - else if (status != STATUS_SUCCESS) -@@ -2860,10 +2870,15 @@ static NTSTATUS WS2_transmitfile_base( int fd, struct ws2_transmitfile_async *ws - status = WS2_transmitfile_getbuffer( fd, wsa ); - if (status == STATUS_PENDING) - { -+ IO_STATUS_BLOCK *iosb = (IO_STATUS_BLOCK *)wsa->write.user_overlapped; - int n; - - n = WS2_send( fd, &wsa->write, convert_flags(wsa->write.flags) ); -- if (n == -1 && errno != EAGAIN) -+ if (n >= 0) -+ { -+ if (iosb) iosb->Information += n; -+ } -+ else if (errno != EAGAIN) - return wsaErrStatus(); - } - -@@ -2871,26 +2886,46 @@ static NTSTATUS WS2_transmitfile_base( int fd, struct ws2_transmitfile_async *ws - } - - /*********************************************************************** -+ * WS2_async_transmitfile (INTERNAL) -+ * -+ * Asynchronous callback for overlapped TransmitFile operations. -+ */ -+static NTSTATUS WS2_async_transmitfile( void *user, IO_STATUS_BLOCK *iosb, -+ NTSTATUS status, void **apc, void **arg ) -+{ -+ struct ws2_transmitfile_async *wsa = user; -+ int fd; -+ -+ if (status == STATUS_ALERTED) -+ { -+ if (!(status = wine_server_handle_to_fd( wsa->write.hSocket, FILE_WRITE_DATA, &fd, NULL ))) -+ { -+ status = WS2_transmitfile_base( fd, wsa ); -+ wine_server_release_fd( wsa->write.hSocket, fd ); -+ } -+ if (status == STATUS_PENDING) -+ return status; -+ } -+ -+ iosb->u.Status = status; -+ release_async_io( &wsa->io ); -+ return status; -+} -+ -+/*********************************************************************** - * 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 ) - { -+ IO_STATUS_BLOCK *iosb = (IO_STATUS_BLOCK *)overlapped; - union generic_unix_sockaddr uaddr; - unsigned int uaddrlen = sizeof(uaddr); - struct ws2_transmitfile_async *wsa; - NTSTATUS status; - int fd; - -- if (overlapped) -- { -- FIXME("(%lx, %p, %d, %d, %p, %p, %d): stub !\n", s, h, file_bytes, bytes_per_send, -- overlapped, buffers, flags); -- WSASetLastError( WSAEOPNOTSUPP ); -- return FALSE; -- } -- - TRACE("(%lx, %p, %d, %d, %p, %p, %d)\n", s, h, file_bytes, bytes_per_send, overlapped, - buffers, flags ); - -@@ -2937,6 +2972,7 @@ static BOOL WINAPI WS2_TransmitFile( SOCKET s, HANDLE h, DWORD file_bytes, DWORD - wsa->file_bytes = file_bytes; - wsa->bytes_per_send = bytes_per_send; - wsa->flags = flags; -+ wsa->offset.QuadPart = FILE_USE_FILE_POINTER_POSITION; - wsa->write.hSocket = SOCKET2HANDLE(s); - wsa->write.addr = NULL; - wsa->write.addrlen.val = 0; -@@ -2945,7 +2981,32 @@ static BOOL WINAPI WS2_TransmitFile( SOCKET s, HANDLE h, DWORD file_bytes, DWORD - wsa->write.control = NULL; - wsa->write.n_iovecs = 0; - wsa->write.first_iovec = 0; -- wsa->write.user_overlapped = NULL; -+ wsa->write.user_overlapped = overlapped; -+ if (overlapped) -+ { -+ int status; -+ -+ wsa->offset.u.LowPart = overlapped->u.s.Offset; -+ wsa->offset.u.HighPart = overlapped->u.s.OffsetHigh; -+ iosb->u.Status = STATUS_PENDING; -+ iosb->Information = 0; -+ SERVER_START_REQ( register_async ) -+ { -+ req->type = ASYNC_TYPE_WRITE; -+ req->async.handle = wine_server_obj_handle( SOCKET2HANDLE(s) ); -+ req->async.event = wine_server_obj_handle( overlapped->hEvent ); -+ req->async.callback = wine_server_client_ptr( WS2_async_transmitfile ); -+ req->async.iosb = wine_server_client_ptr( iosb ); -+ req->async.arg = wine_server_client_ptr( wsa ); -+ status = wine_server_call( req ); -+ } -+ SERVER_END_REQ; -+ -+ if(status != STATUS_PENDING) HeapFree( GetProcessHeap(), 0, wsa ); -+ release_sock_fd( s, fd ); -+ WSASetLastError( NtStatusToWSAError(status) ); -+ return FALSE; -+ } - - do - { -diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c -index 3d20c89..29e20c3 100644 ---- a/dlls/ws2_32/tests/sock.c -+++ b/dlls/ws2_32/tests/sock.c -@@ -7429,15 +7429,15 @@ end: - closesocket(connector2); - } - --#define compare_file(h,s) compare_file2(h,s,__FILE__,__LINE__) -+#define compare_file(h,s,o) compare_file2(h,s,o,__FILE__,__LINE__) - --static void compare_file2(HANDLE handle, SOCKET sock, const char *file, int line) -+static void compare_file2(HANDLE handle, SOCKET sock, int offset, const char *file, int line) - { - char buf1[256], buf2[256]; - BOOL success; - int i = 0; - -- SetFilePointer(handle, 0, NULL, FILE_BEGIN); -+ SetFilePointer(handle, offset, NULL, FILE_BEGIN); - while (1) - { - DWORD n1 = 0, n2 = 0; -@@ -7457,6 +7457,7 @@ static void compare_file2(HANDLE handle, SOCKET sock, const char *file, int line - - static void test_TransmitFile(void) - { -+ DWORD num_bytes, err, file_size, total_sent; - GUID transmitFileGuid = WSAID_TRANSMITFILE; - LPFN_TRANSMITFILE pTransmitFile = NULL; - HANDLE file = INVALID_HANDLE_VALUE; -@@ -7466,11 +7467,13 @@ static void test_TransmitFile(void) - struct sockaddr_in bindAddress; - TRANSMIT_FILE_BUFFERS buffers; - SOCKET client, server, dest; -- DWORD num_bytes, err; -+ WSAOVERLAPPED ov; - char buf[256]; - int iret, len; - BOOL bret; - -+ memset( &ov, 0, sizeof(ov) ); -+ - /* Setup sockets for testing TransmitFile */ - client = socket(AF_INET, SOCK_STREAM, 0); - server = socket(AF_INET, SOCK_STREAM, 0); -@@ -7494,6 +7497,7 @@ static void test_TransmitFile(void) - skip("Unable to open a file to transmit.\n"); - goto cleanup; - } -+ file_size = GetFileSize(file, NULL); - - /* Test TransmitFile with an invalid socket */ - bret = pTransmitFile(INVALID_SOCKET, file, 0, 0, NULL, NULL, 0); -@@ -7567,7 +7571,7 @@ static void test_TransmitFile(void) - /* Test TransmitFile with only file data */ - bret = pTransmitFile(client, file, 0, 0, NULL, NULL, 0); - ok(bret, "TransmitFile failed unexpectedly.\n"); -- compare_file(file, dest); -+ compare_file(file, dest, 0); - - /* Test TransmitFile with both file and buffer data */ - buffers.Head = &header_msg[0]; -@@ -7580,7 +7584,81 @@ static void test_TransmitFile(void) - iret = recv(dest, buf, sizeof(header_msg)+1, 0); - ok(memcmp(buf, &header_msg[0], sizeof(header_msg)+1) == 0, - "TransmitFile header buffer did not match!\n"); -- compare_file(file, dest); -+ compare_file(file, dest, 0); -+ iret = recv(dest, buf, sizeof(footer_msg)+1, 0); -+ ok(memcmp(buf, &footer_msg[0], sizeof(footer_msg)+1) == 0, -+ "TransmitFile footer buffer did not match!\n"); -+ -+ /* Test overlapped TransmitFile */ -+ ov.hEvent = CreateEventW(NULL, FALSE, FALSE, NULL); -+ if (ov.hEvent == INVALID_HANDLE_VALUE) -+ { -+ skip("Could not create event object, some tests will be skipped. errno = %d\n", -+ GetLastError()); -+ goto cleanup; -+ } -+ SetFilePointer(file, 0, NULL, FILE_BEGIN); -+ bret = pTransmitFile(client, file, 0, 0, &ov, NULL, 0); -+ err = WSAGetLastError(); -+ ok(!bret, "TransmitFile succeeded unexpectedly.\n"); -+ ok(err == ERROR_IO_PENDING, "TransmitFile triggered unexpected errno (%d != %d)\n", -+ err, ERROR_IO_PENDING); -+ iret = WaitForSingleObject(ov.hEvent, 2000); -+ ok(iret == WAIT_OBJECT_0, "Overlapped TransmitFile failed.\n"); -+ WSAGetOverlappedResult(client, &ov, &total_sent, FALSE, NULL); -+ ok(total_sent == file_size, -+ "Overlapped TransmitFile sent an unexpected number of bytes (%d != %d).\n", -+ total_sent, file_size); -+ compare_file(file, dest, 0); -+ -+ /* Test overlapped TransmitFile w/ start offset */ -+ ov.hEvent = CreateEventW(NULL, FALSE, FALSE, NULL); -+ if (ov.hEvent == INVALID_HANDLE_VALUE) -+ { -+ skip("Could not create event object, some tests will be skipped. errno = %d\n", GetLastError()); -+ goto cleanup; -+ } -+ SetFilePointer(file, 0, NULL, FILE_BEGIN); -+ ov.Offset = 10; -+ bret = pTransmitFile(client, file, 0, 0, &ov, NULL, 0); -+ err = WSAGetLastError(); -+ ok(!bret, "TransmitFile succeeded unexpectedly.\n"); -+ ok(err == ERROR_IO_PENDING, "TransmitFile triggered unexpected errno (%d != %d)\n", err, ERROR_IO_PENDING); -+ iret = WaitForSingleObject(ov.hEvent, 2000); -+ ok(iret == WAIT_OBJECT_0, "Overlapped TransmitFile failed.\n"); -+ WSAGetOverlappedResult(client, &ov, &total_sent, FALSE, NULL); -+ ok(total_sent == (file_size - ov.Offset), -+ "Overlapped TransmitFile sent an unexpected number of bytes (%d != %d).\n", -+ total_sent, file_size - ov.Offset); -+ compare_file(file, dest, ov.Offset); -+ -+ /* Test overlapped TransmitFile w/ file and buffer data */ -+ ov.hEvent = CreateEventW(NULL, FALSE, FALSE, NULL); -+ if (ov.hEvent == INVALID_HANDLE_VALUE) -+ { -+ skip("Could not create event object, some tests will be skipped. errno = %d\n", GetLastError()); -+ goto cleanup; -+ } -+ buffers.Head = &header_msg[0]; -+ buffers.HeadLength = sizeof(header_msg)+1; -+ buffers.Tail = &footer_msg[0]; -+ buffers.TailLength = sizeof(footer_msg)+1; -+ SetFilePointer(file, 0, NULL, FILE_BEGIN); -+ ov.Offset = 0; -+ bret = pTransmitFile(client, file, 0, 0, &ov, &buffers, 0); -+ err = WSAGetLastError(); -+ ok(!bret, "TransmitFile succeeded unexpectedly.\n"); -+ ok(err == ERROR_IO_PENDING, "TransmitFile triggered unexpected errno (%d != %d)\n", err, ERROR_IO_PENDING); -+ iret = WaitForSingleObject(ov.hEvent, 2000); -+ ok(iret == WAIT_OBJECT_0, "Overlapped TransmitFile failed.\n"); -+ WSAGetOverlappedResult(client, &ov, &total_sent, FALSE, NULL); -+ ok(total_sent == (file_size + buffers.HeadLength + buffers.TailLength), -+ "Overlapped TransmitFile sent an unexpected number of bytes (%d != %d).\n", -+ total_sent, file_size + buffers.HeadLength + buffers.TailLength); -+ iret = recv(dest, buf, sizeof(header_msg)+1, 0); -+ ok(memcmp(buf, &header_msg[0], sizeof(header_msg)+1) == 0, -+ "TransmitFile header buffer did not match!\n"); -+ compare_file(file, dest, 0); - iret = recv(dest, buf, sizeof(footer_msg)+1, 0); - ok(memcmp(buf, &footer_msg[0], sizeof(footer_msg)+1) == 0, - "TransmitFile footer buffer did not match!\n"); -@@ -7595,6 +7673,7 @@ static void test_TransmitFile(void) - - cleanup: - CloseHandle(file); -+ CloseHandle(ov.hEvent); - closesocket(client); - closesocket(server); - } --- -2.6.1 - diff --git a/patches/ws2_32-TransmitFile/0002-ws2_32-Add-support-for-TF_DISCONNECT-to-TransmitFile.patch b/patches/ws2_32-TransmitFile/0001-ws2_32-Add-support-for-TF_DISCONNECT-to-TransmitFile.patch similarity index 90% rename from patches/ws2_32-TransmitFile/0002-ws2_32-Add-support-for-TF_DISCONNECT-to-TransmitFile.patch rename to patches/ws2_32-TransmitFile/0001-ws2_32-Add-support-for-TF_DISCONNECT-to-TransmitFile.patch index c33a9939..62ea7d46 100644 --- a/patches/ws2_32-TransmitFile/0002-ws2_32-Add-support-for-TF_DISCONNECT-to-TransmitFile.patch +++ b/patches/ws2_32-TransmitFile/0001-ws2_32-Add-support-for-TF_DISCONNECT-to-TransmitFile.patch @@ -1,4 +1,4 @@ -From 0a0a7b4793378c54346cd0e9e7feae6eb2a89dc3 Mon Sep 17 00:00:00 2001 +From 0a7427437a87557be853c5d27e11b62436a00848 Mon Sep 17 00:00:00 2001 From: "Erich E. Hoover" Date: Wed, 4 Mar 2015 13:16:20 -0700 Subject: ws2_32: Add support for TF_DISCONNECT to TransmitFile. @@ -9,10 +9,10 @@ Subject: ws2_32: Add support for TF_DISCONNECT to TransmitFile. 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c -index 4531b81..0f94a57 100644 +index b0cbb11..7deaeda 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c -@@ -2882,7 +2882,16 @@ static NTSTATUS WS2_transmitfile_base( int fd, struct ws2_transmitfile_async *ws +@@ -2883,7 +2883,16 @@ static NTSTATUS WS2_transmitfile_base( int fd, struct ws2_transmitfile_async *ws return wsaErrStatus(); } @@ -30,14 +30,14 @@ index 4531b81..0f94a57 100644 } /*********************************************************************** -@@ -2919,6 +2928,7 @@ static BOOL WINAPI WS2_TransmitFile( SOCKET s, HANDLE h, DWORD file_bytes, DWORD +@@ -2920,6 +2929,7 @@ static BOOL WINAPI WS2_TransmitFile( SOCKET s, HANDLE h, DWORD file_bytes, DWORD LPOVERLAPPED overlapped, LPTRANSMIT_FILE_BUFFERS buffers, DWORD flags ) { + DWORD unsupported_flags = flags & ~(TF_DISCONNECT); - IO_STATUS_BLOCK *iosb = (IO_STATUS_BLOCK *)overlapped; union generic_unix_sockaddr uaddr; unsigned int uaddrlen = sizeof(uaddr); + struct ws2_transmitfile_async *wsa; @@ -2941,8 +2951,8 @@ static BOOL WINAPI WS2_TransmitFile( SOCKET s, HANDLE h, DWORD file_bytes, DWORD WSASetLastError( WSAENOTCONN ); return FALSE; diff --git a/patches/ws2_32-TransmitFile/0003-ws2_32-Add-support-for-TF_REUSE_SOCKET-to-TransmitFi.patch b/patches/ws2_32-TransmitFile/0002-ws2_32-Add-support-for-TF_REUSE_SOCKET-to-TransmitFi.patch similarity index 88% rename from patches/ws2_32-TransmitFile/0003-ws2_32-Add-support-for-TF_REUSE_SOCKET-to-TransmitFi.patch rename to patches/ws2_32-TransmitFile/0002-ws2_32-Add-support-for-TF_REUSE_SOCKET-to-TransmitFi.patch index 8d6f361c..d375dbca 100644 --- a/patches/ws2_32-TransmitFile/0003-ws2_32-Add-support-for-TF_REUSE_SOCKET-to-TransmitFi.patch +++ b/patches/ws2_32-TransmitFile/0002-ws2_32-Add-support-for-TF_REUSE_SOCKET-to-TransmitFi.patch @@ -1,4 +1,4 @@ -From 0b55083552779d1148c04778f5479e5fc4e6d6e4 Mon Sep 17 00:00:00 2001 +From 58723ec84900590ae95a7abd688540d963372993 Mon Sep 17 00:00:00 2001 From: "Erich E. Hoover" Date: Thu, 16 Jan 2014 19:08:30 -0700 Subject: ws2_32: Add support for TF_REUSE_SOCKET to TransmitFile. @@ -12,10 +12,10 @@ Subject: ws2_32: Add support for TF_REUSE_SOCKET to TransmitFile. 5 files changed, 75 insertions(+), 11 deletions(-) diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c -index f530a94..bf33e25 100644 +index 7deaeda..258f121 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c -@@ -2810,6 +2810,17 @@ static NTSTATUS WS2_transmitfile_base( int fd, struct ws2_transmitfile_async *ws +@@ -2886,6 +2886,17 @@ static NTSTATUS WS2_transmitfile_base( int fd, struct ws2_transmitfile_async *ws if (status != STATUS_SUCCESS) return status; @@ -33,20 +33,20 @@ index f530a94..bf33e25 100644 if (wsa->flags & TF_DISCONNECT) { /* we can't use WS_closesocket because it modifies the last error */ -@@ -2853,7 +2864,7 @@ static BOOL WINAPI WS2_TransmitFile( SOCKET s, HANDLE h, DWORD file_bytes, DWORD +@@ -2929,7 +2940,7 @@ static BOOL WINAPI WS2_TransmitFile( SOCKET s, HANDLE h, DWORD file_bytes, DWORD LPOVERLAPPED overlapped, LPTRANSMIT_FILE_BUFFERS buffers, DWORD flags ) { - DWORD unsupported_flags = flags & ~(TF_DISCONNECT); + DWORD unsupported_flags = flags & ~(TF_DISCONNECT|TF_REUSE_SOCKET); - IO_STATUS_BLOCK *iosb = (IO_STATUS_BLOCK *)overlapped; union generic_unix_sockaddr uaddr; unsigned int uaddrlen = sizeof(uaddr); + struct ws2_transmitfile_async *wsa; diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c -index a8abdee..58d8db7 100644 +index d5c206c..4e1a432 100644 --- a/dlls/ws2_32/tests/sock.c +++ b/dlls/ws2_32/tests/sock.c -@@ -7566,7 +7566,6 @@ static void test_TransmitFile(void) +@@ -7675,7 +7675,6 @@ static void test_TransmitFile(void) err, WSAENOTSOCK); /* Test TransmitFile with a UDP datagram socket */ @@ -67,10 +67,10 @@ index 50237e8..e53aa1e 100644 #define FD_WINE_NONBLOCKING 0x20000000 #define FD_WINE_CONNECTED 0x40000000 diff --git a/server/protocol.def b/server/protocol.def -index 9c4dab4..0694f99 100644 +index c313006..5588f6a 100644 --- a/server/protocol.def +++ b/server/protocol.def -@@ -1230,6 +1230,12 @@ enum server_fd_type +@@ -1263,6 +1263,12 @@ enum server_fd_type @END @@ -84,7 +84,7 @@ index 9c4dab4..0694f99 100644 @REQ(set_socket_event) obj_handle_t handle; /* handle to the socket */ diff --git a/server/sock.c b/server/sock.c -index c4dcf6f..fb80bc7 100644 +index 1767dea..0f029bf 100644 --- a/server/sock.c +++ b/server/sock.c @@ -86,6 +86,7 @@ @@ -95,7 +95,7 @@ index c4dcf6f..fb80bc7 100644 #define FD_WINE_LISTENING 0x10000000 #define FD_WINE_NONBLOCKING 0x20000000 #define FD_WINE_CONNECTED 0x40000000 -@@ -134,6 +135,7 @@ static obj_handle_t sock_ioctl( struct fd *fd, ioctl_code_t code, const async_da +@@ -133,6 +134,7 @@ static obj_handle_t sock_ioctl( struct fd *fd, ioctl_code_t code, const async_da static void sock_queue_async( struct fd *fd, const async_data_t *data, int type, int count ); static void sock_reselect_async( struct fd *fd, struct async_queue *queue ); static int sock_cancel_async( struct fd *fd, struct process *process, struct thread *thread, client_ptr_t iosb ); @@ -103,7 +103,7 @@ index c4dcf6f..fb80bc7 100644 static int sock_get_ntstatus( int err ); static int sock_get_error( int err ); -@@ -155,7 +157,7 @@ static const struct object_ops sock_ops = +@@ -154,7 +156,7 @@ static const struct object_ops sock_ops = default_set_sd, /* set_sd */ no_lookup_name, /* lookup_name */ no_open_file, /* open_file */ @@ -112,7 +112,7 @@ index c4dcf6f..fb80bc7 100644 sock_destroy /* destroy */ }; -@@ -628,6 +630,47 @@ static struct fd *sock_get_fd( struct object *obj ) +@@ -626,6 +628,47 @@ static struct fd *sock_get_fd( struct object *obj ) return (struct fd *)grab_object( sock->fd ); } @@ -160,7 +160,7 @@ index c4dcf6f..fb80bc7 100644 static void sock_destroy( struct object *obj ) { struct sock *sock = (struct sock *)obj; -@@ -679,15 +722,8 @@ static struct object *create_socket( int family, int type, int protocol, unsigne +@@ -677,15 +720,8 @@ static struct object *create_socket( int family, int type, int protocol, unsigne struct sock *sock; int sockfd; @@ -177,7 +177,7 @@ index c4dcf6f..fb80bc7 100644 if (!(sock = alloc_object( &sock_ops ))) { close( sockfd ); -@@ -1286,6 +1322,17 @@ DECL_HANDLER(accept_into_socket) +@@ -1261,6 +1297,17 @@ DECL_HANDLER(accept_into_socket) release_object( sock ); } @@ -196,5 +196,5 @@ index c4dcf6f..fb80bc7 100644 DECL_HANDLER(set_socket_event) { -- -2.3.7 +2.6.1