From d3067e60ff0ee92612cbb11a074a9ae1112ea431 Mon Sep 17 00:00:00 2001 From: Alistair Leslie-Hughes Date: Tue, 5 Mar 2019 08:05:01 +1100 Subject: [PATCH] Rebase against 6d35c10a7b7155dd552a3ad1a266d205e38f8765 --- ...3d8-Improve-ValidatePixelShader-stub.patch | 140 --------- patches/d3d8-ValidateShader/definition | 1 - patches/patchinstall.sh | 69 +---- ...ate-syscall-thunks-for-ntdll-exports.patch | 70 ++--- ...ltipass-label-system-to-generate-fak.patch | 46 +-- ...ebuild-Add-syscall-thunks-for-64-bit.patch | 50 ++-- ...ned3d-Implement-dual-source-blending.patch | 59 ++-- ...wmvcore-Implement-WMCreateSyncReader.patch | 280 ------------------ patches/wmvcore-WMCreateSyncReader/definition | 1 - ...ore-Implement-WMCreateSyncReaderPriv.patch | 43 --- .../wmvcore-WMCreateSyncReaderPriv/definition | 2 - patches/xaudio2-revert/definition | 2 +- 12 files changed, 115 insertions(+), 648 deletions(-) delete mode 100644 patches/d3d8-ValidateShader/0002-d3d8-Improve-ValidatePixelShader-stub.patch delete mode 100644 patches/d3d8-ValidateShader/definition delete mode 100644 patches/wmvcore-WMCreateSyncReader/0001-wmvcore-Implement-WMCreateSyncReader.patch delete mode 100644 patches/wmvcore-WMCreateSyncReader/definition delete mode 100644 patches/wmvcore-WMCreateSyncReaderPriv/0001-wmvcore-Implement-WMCreateSyncReaderPriv.patch delete mode 100644 patches/wmvcore-WMCreateSyncReaderPriv/definition diff --git a/patches/d3d8-ValidateShader/0002-d3d8-Improve-ValidatePixelShader-stub.patch b/patches/d3d8-ValidateShader/0002-d3d8-Improve-ValidatePixelShader-stub.patch deleted file mode 100644 index 46b635c2..00000000 --- a/patches/d3d8-ValidateShader/0002-d3d8-Improve-ValidatePixelShader-stub.patch +++ /dev/null @@ -1,140 +0,0 @@ -From a26d43a10fb5de70732970b20a29ce4437b33076 Mon Sep 17 00:00:00 2001 -From: Sebastian Lackner -Date: Sat, 14 Jan 2017 07:54:39 +0100 -Subject: [PATCH] d3d8: Improve ValidatePixelShader stub. - ---- - dlls/d3d8/d3d8_main.c | 37 +++++++++++++++++-------------------- - dlls/d3d8/tests/device.c | 34 ++++++++++++++++++++-------------- - 2 files changed, 37 insertions(+), 34 deletions(-) - -diff --git a/dlls/d3d8/d3d8_main.c b/dlls/d3d8/d3d8_main.c -index 17f35c90..7b28bdf1 100644 ---- a/dlls/d3d8/d3d8_main.c -+++ b/dlls/d3d8/d3d8_main.c -@@ -105,39 +105,36 @@ done: - - /*********************************************************************** - * ValidatePixelShader (D3D8.@) -- * -- * PARAMS -- * toto result? - */ --HRESULT WINAPI ValidatePixelShader(DWORD* pixelshader, DWORD* reserved1, BOOL boolean, DWORD* toto) -+HRESULT WINAPI ValidatePixelShader(DWORD *pixelshader, DWORD *reserved1, BOOL return_error, char **errors) - { -- HRESULT ret; -- static BOOL warned; -- -- if (TRACE_ON(d3d8) || !warned) { -- FIXME("(%p %p %d %p): stub\n", pixelshader, reserved1, boolean, toto); -- warned = TRUE; -- } -+ const char *message = ""; -+ HRESULT hr = E_FAIL; - -- if (!pixelshader) -- return E_FAIL; -+ TRACE("(%p %p %d %p): semi-stub\n", pixelshader, reserved1, return_error, errors); - -- if (reserved1) -- return E_FAIL; -+ if (!pixelshader) -+ return E_FAIL; - -- switch(*pixelshader) { -+ switch (*pixelshader) -+ { - case 0xFFFF0100: - case 0xFFFF0101: - case 0xFFFF0102: - case 0xFFFF0103: - case 0xFFFF0104: -- ret=S_OK; -+ hr = S_OK; - break; - default: - WARN("Invalid shader version token %#x.\n", *pixelshader); -- ret=E_FAIL; -- } -- return ret; -+ message = "(Global Validation Error) Version Token: Unsupported pixel shader version.\n"; -+ } -+ -+ if (!return_error) message = ""; -+ if (errors && (*errors = HeapAlloc(GetProcessHeap(), 0, strlen(message) + 1))) -+ strcpy(*errors, message); -+ -+ return hr; - } - - void d3d8_resource_cleanup(struct d3d8_resource *resource) -diff --git a/dlls/d3d8/tests/device.c b/dlls/d3d8/tests/device.c -index 315640d3..6f8354f4 100644 ---- a/dlls/d3d8/tests/device.c -+++ b/dlls/d3d8/tests/device.c -@@ -53,7 +53,7 @@ struct device_desc - static DEVMODEW registry_mode; - - static HRESULT (WINAPI *ValidateVertexShader)(const DWORD *, const DWORD *, const D3DCAPS8 *, BOOL, char **); --static HRESULT (WINAPI *ValidatePixelShader)(DWORD *, DWORD *, int, DWORD *); -+static HRESULT (WINAPI *ValidatePixelShader)(DWORD *, DWORD *, BOOL, char **); - - static BOOL (WINAPI *pGetCursorInfo)(PCURSORINFO); - -@@ -4474,33 +4474,39 @@ static void test_validate_ps(void) - 0x00000005, 0x800f0000, 0xb0e40000, 0x80e40000, /* mul r0, t0, r0 */ - 0x0000ffff, /* end */ - }; -+ char *errors; - HRESULT hr; - - hr = ValidatePixelShader(0, 0, 0, 0); - ok(hr == E_FAIL, "Got unexpected hr %#x.\n", hr); - hr = ValidatePixelShader(0, 0, 1, 0); - ok(hr == E_FAIL, "Got unexpected hr %#x.\n", hr); -+ -+ errors = (void *)0xdeadbeef; -+ hr = ValidatePixelShader(0, 0, 1, &errors); -+ ok(hr == E_FAIL, "Got unexpected hr %#x.\n", hr); -+ ok(errors == (void *)0xdeadbeef, "Expected 0xdeadbeef, got %p.\n", errors); -+ - hr = ValidatePixelShader(ps, 0, 0, 0); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); -- - hr = ValidatePixelShader(ps, 0, 1, 0); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); -- /* Seems to do some version checking. */ -+ - *ps = 0xffff0105; /* bogus version */ - hr = ValidatePixelShader(ps, 0, 1, 0); - ok(hr == E_FAIL, "Got unexpected hr %#x.\n", hr); -- /* I've seen that applications always pass the 2nd parameter as 0. -- * Simple test with a non-zero parameter. */ -- *ps = 0xffff0101; /* ps_1_1 */ -- hr = ValidatePixelShader(ps, ps, 1, 0); -+ -+ errors = (void *)0xdeadbeef; -+ hr = ValidatePixelShader(ps, 0, 0, &errors); - ok(hr == E_FAIL, "Got unexpected hr %#x.\n", hr); -- /* I've seen the 3rd parameter always passed as either 0 or 1, but passing -- * other values doesn't seem to hurt. */ -- hr = ValidatePixelShader(ps, 0, 12345, 0); -- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); -- /* What is the 4th parameter? The following seems to work ok. */ -- hr = ValidatePixelShader(ps, 0, 1, ps); -- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); -+ ok(!strcmp(errors, ""), "Got unexpected string '%s'.\n", errors); -+ HeapFree(GetProcessHeap(), 0, errors); -+ -+ errors = (void *)0xdeadbeef; -+ hr = ValidatePixelShader(ps, 0, 1, &errors); -+ ok(hr == E_FAIL, "Got unexpected hr %#x.\n", hr); -+ ok(strstr(errors, "Validation Error") != NULL, "Got unexpected string '%s'.\n", errors); -+ HeapFree(GetProcessHeap(), 0, errors); - } - - static void test_volume_get_container(void) --- -2.20.1 - diff --git a/patches/d3d8-ValidateShader/definition b/patches/d3d8-ValidateShader/definition deleted file mode 100644 index 8e8378da..00000000 --- a/patches/d3d8-ValidateShader/definition +++ /dev/null @@ -1 +0,0 @@ -Fixes: [40036] Improve stubs for Validate{Vertex,Pixel}Shader diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index b1d8e337..2188c6c0 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -52,7 +52,7 @@ usage() # Get the upstream commit sha upstream_commit() { - echo "9422b844b59282db04af533451f50661de56b9ca" + echo "6d35c10a7b7155dd552a3ad1a266d205e38f8765" } # Show version information @@ -105,7 +105,6 @@ patch_enable_all () enable_crypt32_MS_Root_Certs="$1" enable_d2d1_ID2D1Factory1="$1" enable_d3d11_Deferred_Context="$1" - enable_d3d8_ValidateShader="$1" enable_d3d9_DesktopWindow="$1" enable_d3d9_Tests="$1" enable_d3dx9_36_32bpp_Alpha_Channel="$1" @@ -382,8 +381,6 @@ patch_enable_all () enable_wintab32_improvements="$1" enable_wintrust_WTHelperGetProvCertFromChain="$1" enable_wintrust_WinVerifyTrust="$1" - enable_wmvcore_WMCreateSyncReader="$1" - enable_wmvcore_WMCreateSyncReaderPriv="$1" enable_wow64cpu_Wow64Transition="$1" enable_wpcap_Dynamic_Linking="$1" enable_ws2_32_APC_Performance="$1" @@ -471,9 +468,6 @@ patch_enable () d3d11-Deferred_Context) enable_d3d11_Deferred_Context="$2" ;; - d3d8-ValidateShader) - enable_d3d8_ValidateShader="$2" - ;; d3d9-DesktopWindow) enable_d3d9_DesktopWindow="$2" ;; @@ -1302,12 +1296,6 @@ patch_enable () wintrust-WinVerifyTrust) enable_wintrust_WinVerifyTrust="$2" ;; - wmvcore-WMCreateSyncReader) - enable_wmvcore_WMCreateSyncReader="$2" - ;; - wmvcore-WMCreateSyncReaderPriv) - enable_wmvcore_WMCreateSyncReaderPriv="$2" - ;; wow64cpu-Wow64Transition) enable_wow64cpu_Wow64Transition="$2" ;; @@ -1743,13 +1731,6 @@ if test "$enable_ws2_32_TransmitFile" -eq 1; then enable_server_Desktop_Refcount=1 fi -if test "$enable_wmvcore_WMCreateSyncReaderPriv" -eq 1; then - if test "$enable_wmvcore_WMCreateSyncReader" -gt 1; then - abort "Patchset wmvcore-WMCreateSyncReader disabled, but wmvcore-WMCreateSyncReaderPriv depends on that." - fi - enable_wmvcore_WMCreateSyncReader=1 -fi - if test "$enable_wintrust_WTHelperGetProvCertFromChain" -eq 1; then if test "$enable_wintrust_WinVerifyTrust" -gt 1; then abort "Patchset wintrust-WinVerifyTrust disabled, but wintrust-WTHelperGetProvCertFromChain depends on that." @@ -2803,21 +2784,6 @@ if test "$enable_d3d11_Deferred_Context" -eq 1; then ) >> "$patchlist" fi -# Patchset d3d8-ValidateShader -# | -# | This patchset fixes the following Wine bugs: -# | * [#40036] Improve stubs for Validate{Vertex,Pixel}Shader -# | -# | Modified files: -# | * dlls/d3d8/d3d8_main.c, dlls/d3d8/tests/device.c -# | -if test "$enable_d3d8_ValidateShader" -eq 1; then - patch_apply d3d8-ValidateShader/0002-d3d8-Improve-ValidatePixelShader-stub.patch - ( - printf '%s\n' '+ { "Sebastian Lackner", "d3d8: Improve ValidatePixelShader stub.", 1 },'; - ) >> "$patchlist" -fi - # Patchset d3d9-DesktopWindow # | # | This patchset fixes the following Wine bugs: @@ -7553,39 +7519,6 @@ if test "$enable_wintrust_WTHelperGetProvCertFromChain" -eq 1; then ) >> "$patchlist" fi -# Patchset wmvcore-WMCreateSyncReader -# | -# | This patchset fixes the following Wine bugs: -# | * [#35841] wmvcore: Implement WMCreateSyncReader -# | -# | Modified files: -# | * dlls/wmvcore/wmvcore_main.c -# | -if test "$enable_wmvcore_WMCreateSyncReader" -eq 1; then - patch_apply wmvcore-WMCreateSyncReader/0001-wmvcore-Implement-WMCreateSyncReader.patch - ( - printf '%s\n' '+ { "Andrey Gusev", "wmvcore: Implement WMCreateSyncReader.", 1 },'; - ) >> "$patchlist" -fi - -# Patchset wmvcore-WMCreateSyncReaderPriv -# | -# | This patchset has the following (direct or indirect) dependencies: -# | * wmvcore-WMCreateSyncReader -# | -# | This patchset fixes the following Wine bugs: -# | * [#37327] wmvcore: Implement WMCreateSyncReaderPriv -# | -# | Modified files: -# | * dlls/wmvcore/wmvcore.spec, dlls/wmvcore/wmvcore_main.c -# | -if test "$enable_wmvcore_WMCreateSyncReaderPriv" -eq 1; then - patch_apply wmvcore-WMCreateSyncReaderPriv/0001-wmvcore-Implement-WMCreateSyncReaderPriv.patch - ( - printf '%s\n' '+ { "Andrey Gusev", "wmvcore: Implement WMCreateSyncReaderPriv.", 1 },'; - ) >> "$patchlist" -fi - # Patchset wow64cpu-Wow64Transition # | # | This patchset fixes the following Wine bugs: diff --git a/patches/winebuild-Fake_Dlls/0003-winebuild-Generate-syscall-thunks-for-ntdll-exports.patch b/patches/winebuild-Fake_Dlls/0003-winebuild-Generate-syscall-thunks-for-ntdll-exports.patch index 5e012c40..30306de7 100644 --- a/patches/winebuild-Fake_Dlls/0003-winebuild-Generate-syscall-thunks-for-ntdll-exports.patch +++ b/patches/winebuild-Fake_Dlls/0003-winebuild-Generate-syscall-thunks-for-ntdll-exports.patch @@ -1,4 +1,4 @@ -From ace0554b58cca60956b36f1161c9c0c2a8df5510 Mon Sep 17 00:00:00 2001 +From a3072f7d1387b22f73e947631a1b8d452e944976 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Thu, 11 May 2017 05:32:55 +0200 Subject: [PATCH] winebuild: Generate syscall thunks for ntdll exports. @@ -8,16 +8,16 @@ Based on a patch by Erich E. Hoover. dlls/ntdll/signal_i386.c | 6 ++- dlls/ntdll/tests/exception.c | 2 + include/winternl.h | 2 +- - tools/winebuild/build.h | 8 ++- - tools/winebuild/import.c | 10 ++-- - tools/winebuild/parser.c | 59 ++++++++++++++++++++++ - tools/winebuild/spec16.c | 22 +-------- - tools/winebuild/spec32.c | 94 ++++++++++++++++++++++++++++++++++++ - tools/winebuild/utils.c | 21 ++++++++ + tools/winebuild/build.h | 8 +++- + tools/winebuild/import.c | 10 +++-- + tools/winebuild/parser.c | 59 +++++++++++++++++++++++++++ + tools/winebuild/spec16.c | 22 +---------- + tools/winebuild/spec32.c | 94 ++++++++++++++++++++++++++++++++++++++++++++ + tools/winebuild/utils.c | 21 ++++++++++ 9 files changed, 196 insertions(+), 28 deletions(-) diff --git a/dlls/ntdll/signal_i386.c b/dlls/ntdll/signal_i386.c -index daf9ae23..8dfcd0b5 100644 +index e62a3c3..b504074 100644 --- a/dlls/ntdll/signal_i386.c +++ b/dlls/ntdll/signal_i386.c @@ -427,6 +427,9 @@ static size_t signal_stack_size; @@ -30,7 +30,7 @@ index daf9ae23..8dfcd0b5 100644 enum i386_trap_code { TRAP_x86_UNKNOWN = -1, /* Unknown fault (TRAP_sig not defined) */ -@@ -1430,7 +1433,7 @@ NTSTATUS CDECL DECLSPEC_HIDDEN __regs_NtGetContextThread( DWORD edi, DWORD esi, +@@ -1448,7 +1451,7 @@ NTSTATUS CDECL DECLSPEC_HIDDEN __regs_NtGetContextThread( DWORD edi, DWORD esi, { context->Ebp = ebp; context->Esp = (DWORD)&retaddr; @@ -39,7 +39,7 @@ index daf9ae23..8dfcd0b5 100644 context->SegCs = wine_get_cs(); context->SegSs = wine_get_ss(); context->EFlags = eflags; -@@ -2317,6 +2320,7 @@ NTSTATUS signal_alloc_thread( TEB **teb ) +@@ -2348,6 +2351,7 @@ NTSTATUS signal_alloc_thread( TEB **teb ) *teb = addr; (*teb)->Tib.Self = &(*teb)->Tib; (*teb)->Tib.ExceptionList = (void *)~0UL; @@ -48,10 +48,10 @@ index daf9ae23..8dfcd0b5 100644 if (!(thread_data->fs = wine_ldt_alloc_fs())) { diff --git a/dlls/ntdll/tests/exception.c b/dlls/ntdll/tests/exception.c -index b8bd1866..e795ab14 100644 +index 78cf355..b68fe58 100644 --- a/dlls/ntdll/tests/exception.c +++ b/dlls/ntdll/tests/exception.c -@@ -1618,6 +1618,8 @@ static void test_thread_context(void) +@@ -1632,6 +1632,8 @@ static void test_thread_context(void) ok( (char *)context.Eip >= (char *)pNtGetContextThread - 0x10000 && (char *)context.Eip <= (char *)pNtGetContextThread + 0x10000, "wrong Eip %08x/%08x\n", context.Eip, (DWORD)pNtGetContextThread ); @@ -61,10 +61,10 @@ index b8bd1866..e795ab14 100644 ok( context.SegCs == LOWORD(expect.SegCs), "wrong SegCs %08x/%08x\n", context.SegCs, expect.SegCs ); ok( context.SegDs == LOWORD(expect.SegDs), "wrong SegDs %08x/%08x\n", context.SegDs, expect.SegDs ); diff --git a/include/winternl.h b/include/winternl.h -index 12edd637..5d128b46 100644 +index 2d487ea..8e8b629 100644 --- a/include/winternl.h +++ b/include/winternl.h -@@ -357,7 +357,7 @@ typedef struct _TEB +@@ -358,7 +358,7 @@ typedef struct _TEB PVOID CsrClientThread; /* 03c/0070 */ PVOID Win32ThreadInfo; /* 040/0078 */ ULONG Win32ClientInfo[31]; /* 044/0080 used for user32 private data in Wine */ @@ -74,7 +74,7 @@ index 12edd637..5d128b46 100644 ULONG FpSoftwareStatusRegister; /* 0c8/010c */ PVOID SystemReserved1[54]; /* 0cc/0110 used for krnl386.exe16 private data in Wine */ diff --git a/tools/winebuild/build.h b/tools/winebuild/build.h -index eee98ebe..e883420c 100644 +index d7b46a6..b8ab56e 100644 --- a/tools/winebuild/build.h +++ b/tools/winebuild/build.h @@ -102,6 +102,7 @@ typedef struct @@ -112,7 +112,7 @@ index eee98ebe..e883420c 100644 #define FLAG_CPU_MASK (FLAG_CPU(CPU_LAST + 1) - FLAG_CPU(0)) #define FLAG_CPU_WIN64 (FLAG_CPU(CPU_x86_64) | FLAG_CPU(CPU_ARM64)) #define FLAG_CPU_WIN32 (FLAG_CPU_MASK & ~FLAG_CPU_WIN64) -@@ -314,6 +318,8 @@ extern void add_16bit_exports( DLLSPEC *spec32, DLLSPEC *spec16 ); +@@ -317,6 +321,8 @@ extern void add_16bit_exports( DLLSPEC *spec32, DLLSPEC *spec16 ); extern int parse_spec_file( FILE *file, DLLSPEC *spec ); extern int parse_def_file( FILE *file, DLLSPEC *spec ); @@ -122,7 +122,7 @@ index eee98ebe..e883420c 100644 extern int byte_swapped; diff --git a/tools/winebuild/import.c b/tools/winebuild/import.c -index 893691ea..c39d9b53 100644 +index 6ab7765..628b817 100644 --- a/tools/winebuild/import.c +++ b/tools/winebuild/import.c @@ -451,6 +451,7 @@ static void check_undefined_forwards( DLLSPEC *spec ) @@ -162,7 +162,7 @@ index 893691ea..c39d9b53 100644 } } diff --git a/tools/winebuild/parser.c b/tools/winebuild/parser.c -index dfb7f6f8..b758ca0d 100644 +index dfb7f6f..b758ca0 100644 --- a/tools/winebuild/parser.c +++ b/tools/winebuild/parser.c @@ -547,6 +547,24 @@ static const char *parse_spec_flags( DLLSPEC *spec, ORDDEF *odp ) @@ -253,14 +253,13 @@ index dfb7f6f8..b758ca0d 100644 } diff --git a/tools/winebuild/spec16.c b/tools/winebuild/spec16.c -index 85bcf099..54aad5d9 100644 +index 027580b..6163407 100644 --- a/tools/winebuild/spec16.c +++ b/tools/winebuild/spec16.c -@@ -493,27 +493,6 @@ static int relay_type_compare( const void *e1, const void *e2 ) - } +@@ -494,27 +494,6 @@ static int relay_type_compare( const void *e1, const void *e2 ) --/******************************************************************* + /******************************************************************* - * sort_func_list - * - * Sort a list of functions, removing duplicates. @@ -281,9 +280,10 @@ index 85bcf099..54aad5d9 100644 -} - - - /******************************************************************* +-/******************************************************************* * output_module16 * + * Output code for a 16-bit module. @@ -542,6 +521,7 @@ static void output_module16( DLLSPEC *spec ) entry_point->flags = FLAG_REGISTER; entry_point->name = NULL; @@ -293,14 +293,13 @@ index 85bcf099..54aad5d9 100644 entry_point->u.func.nb_args = 0; assert( !spec->ordinals[0] ); diff --git a/tools/winebuild/spec32.c b/tools/winebuild/spec32.c -index 44d1c2c4..9727601f 100644 +index 89f33c8..dc63c39 100644 --- a/tools/winebuild/spec32.c +++ b/tools/winebuild/spec32.c -@@ -342,6 +342,99 @@ static void output_relay_debug( DLLSPEC *spec ) - } +@@ -357,6 +357,99 @@ static void output_relay_debug( DLLSPEC *spec ) } -+/******************************************************************* + /******************************************************************* + * output_syscall_thunks + * + * Output entry points for system call functions @@ -393,11 +392,12 @@ index 44d1c2c4..9727601f 100644 + output_function_size( "__wine_syscall_dispatcher" ); +} + - /******************************************************************* ++/******************************************************************* * output_exports * -@@ -691,6 +784,7 @@ void BuildSpec32File( DLLSPEC *spec ) - resolve_imports( spec ); + * Output the export table for a Win32 module. +@@ -706,6 +799,7 @@ void BuildSpec32File( DLLSPEC *spec ) + open_output_file(); output_standard_file_header(); output_module( spec ); + output_syscall_thunks( spec ); @@ -405,10 +405,10 @@ index 44d1c2c4..9727601f 100644 output_exports( spec ); output_imports( spec ); diff --git a/tools/winebuild/utils.c b/tools/winebuild/utils.c -index 78e96454..bb9e8ac3 100644 +index 06c3d39..f331903 100644 --- a/tools/winebuild/utils.c +++ b/tools/winebuild/utils.c -@@ -795,6 +795,7 @@ void free_dll_spec( DLLSPEC *spec ) +@@ -839,6 +839,7 @@ void free_dll_spec( DLLSPEC *spec ) free( odp->name ); free( odp->export_name ); free( odp->link_name ); @@ -416,7 +416,7 @@ index 78e96454..bb9e8ac3 100644 } free( spec->file_name ); free( spec->dll_name ); -@@ -804,6 +805,7 @@ void free_dll_spec( DLLSPEC *spec ) +@@ -848,6 +849,7 @@ void free_dll_spec( DLLSPEC *spec ) free( spec->names ); free( spec->ordinals ); free( spec->resources ); @@ -424,7 +424,7 @@ index 78e96454..bb9e8ac3 100644 free( spec ); } -@@ -1131,3 +1133,22 @@ const char *get_asm_string_section(void) +@@ -1175,3 +1177,22 @@ const char *get_asm_string_section(void) default: return ".section .rodata"; } } @@ -448,5 +448,5 @@ index 78e96454..bb9e8ac3 100644 + return j + 1; +} -- -2.20.1 +1.9.1 diff --git a/patches/winebuild-Fake_Dlls/0004-winebuild-Use-multipass-label-system-to-generate-fak.patch b/patches/winebuild-Fake_Dlls/0004-winebuild-Use-multipass-label-system-to-generate-fak.patch index d5157109..ab57a8c7 100644 --- a/patches/winebuild-Fake_Dlls/0004-winebuild-Use-multipass-label-system-to-generate-fak.patch +++ b/patches/winebuild-Fake_Dlls/0004-winebuild-Use-multipass-label-system-to-generate-fak.patch @@ -1,7 +1,7 @@ -From 135039777d3d6a79580661221cf4f394d390d5fb Mon Sep 17 00:00:00 2001 +From 86345de0628fe7d467f25797c532a3a11e5b61eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Mon, 15 May 2017 02:05:49 +0200 -Subject: winebuild: Use multipass label system to generate fake dlls. +Subject: [PATCH] winebuild: Use multipass label system to generate fake dlls. --- tools/winebuild/build.h | 6 ++ @@ -11,10 +11,10 @@ Subject: winebuild: Use multipass label system to generate fake dlls. 4 files changed, 180 insertions(+), 64 deletions(-) diff --git a/tools/winebuild/build.h b/tools/winebuild/build.h -index e338c9c8024..3434cfe9c90 100644 +index b8ab56e..218b721 100644 --- a/tools/winebuild/build.h +++ b/tools/winebuild/build.h -@@ -328,6 +328,7 @@ extern size_t input_buffer_pos; +@@ -332,6 +332,7 @@ extern size_t input_buffer_pos; extern size_t input_buffer_size; extern unsigned char *output_buffer; extern size_t output_buffer_pos; @@ -22,7 +22,7 @@ index e338c9c8024..3434cfe9c90 100644 extern size_t output_buffer_size; extern void init_input_buffer( const char *file ); -@@ -343,6 +344,11 @@ extern void put_dword( unsigned int val ); +@@ -347,6 +348,11 @@ extern void put_dword( unsigned int val ); extern void put_qword( unsigned int val ); extern void put_pword( unsigned int val ); extern void align_output( unsigned int align ); @@ -35,7 +35,7 @@ index e338c9c8024..3434cfe9c90 100644 /* global variables */ diff --git a/tools/winebuild/res32.c b/tools/winebuild/res32.c -index 1686f567185..8db3213fbbd 100644 +index b20dfb4..2f35918 100644 --- a/tools/winebuild/res32.c +++ b/tools/winebuild/res32.c @@ -534,7 +534,6 @@ void output_bin_resources( DLLSPEC *spec, unsigned int start_rva ) @@ -47,10 +47,10 @@ index 1686f567185..8db3213fbbd 100644 /* output the resource directories */ diff --git a/tools/winebuild/spec32.c b/tools/winebuild/spec32.c -index dde1bd0704d..c01ff6d7746 100644 +index dc63c39..59cced1 100644 --- a/tools/winebuild/spec32.c +++ b/tools/winebuild/spec32.c -@@ -702,11 +702,11 @@ void BuildSpec32File( DLLSPEC *spec ) +@@ -811,11 +811,11 @@ void BuildSpec32File( DLLSPEC *spec ) /******************************************************************* @@ -65,7 +65,7 @@ index dde1bd0704d..c01ff6d7746 100644 { static const unsigned char dll_code_section[] = { 0x31, 0xc0, /* xor %eax,%eax */ 0xc2, 0x0c, 0x00 }; /* ret $12 */ -@@ -718,22 +718,8 @@ void output_fake_module( DLLSPEC *spec ) +@@ -827,22 +827,8 @@ void output_fake_module( DLLSPEC *spec ) const unsigned int page_size = get_page_size(); const unsigned int section_align = page_size; const unsigned int file_align = 0x200; @@ -88,7 +88,7 @@ index dde1bd0704d..c01ff6d7746 100644 put_word( 0x5a4d ); /* e_magic */ put_word( 0x40 ); /* e_cblp */ -@@ -761,7 +747,7 @@ void output_fake_module( DLLSPEC *spec ) +@@ -870,7 +856,7 @@ void output_fake_module( DLLSPEC *spec ) put_dword( lfanew ); put_data( fakedll_signature, sizeof(fakedll_signature) ); @@ -97,7 +97,7 @@ index dde1bd0704d..c01ff6d7746 100644 put_dword( 0x4550 ); /* Signature */ switch(target_cpu) -@@ -785,11 +771,11 @@ void output_fake_module( DLLSPEC *spec ) +@@ -894,11 +880,11 @@ void output_fake_module( DLLSPEC *spec ) IMAGE_NT_OPTIONAL_HDR32_MAGIC ); /* Magic */ put_byte( 7 ); /* MajorLinkerVersion */ put_byte( 10 ); /* MinorLinkerVersion */ @@ -112,7 +112,7 @@ index dde1bd0704d..c01ff6d7746 100644 if (get_ptr_size() == 4) put_dword( 0 ); /* BaseOfData */ put_pword( 0x10000000 ); /* ImageBase */ put_dword( section_align ); /* SectionAlignment */ -@@ -801,8 +787,8 @@ void output_fake_module( DLLSPEC *spec ) +@@ -910,8 +896,8 @@ void output_fake_module( DLLSPEC *spec ) put_word( spec->subsystem_major ); /* MajorSubsystemVersion */ put_word( spec->subsystem_minor ); /* MinorSubsystemVersion */ put_dword( 0 ); /* Win32VersionValue */ @@ -123,7 +123,7 @@ index dde1bd0704d..c01ff6d7746 100644 put_dword( 0 ); /* CheckSum */ put_word( spec->subsystem ); /* Subsystem */ put_word( spec->dll_characteristics ); /* DllCharacteristics */ -@@ -815,10 +801,10 @@ void output_fake_module( DLLSPEC *spec ) +@@ -924,10 +910,10 @@ void output_fake_module( DLLSPEC *spec ) put_dword( 0 ); put_dword( 0 ); /* DataDirectory[IMAGE_DIRECTORY_ENTRY_EXPORT] */ put_dword( 0 ); put_dword( 0 ); /* DataDirectory[IMAGE_DIRECTORY_ENTRY_IMPORT] */ @@ -137,7 +137,7 @@ index dde1bd0704d..c01ff6d7746 100644 } else { -@@ -828,8 +814,8 @@ void output_fake_module( DLLSPEC *spec ) +@@ -937,8 +923,8 @@ void output_fake_module( DLLSPEC *spec ) put_dword( 0 ); put_dword( 0 ); /* DataDirectory[IMAGE_DIRECTORY_ENTRY_EXCEPTION] */ put_dword( 0 ); put_dword( 0 ); /* DataDirectory[IMAGE_DIRECTORY_ENTRY_SECURITY] */ @@ -148,7 +148,7 @@ index dde1bd0704d..c01ff6d7746 100644 put_dword( 0 ); put_dword( 0 ); /* DataDirectory[IMAGE_DIRECTORY_ENTRY_DEBUG] */ put_dword( 0 ); put_dword( 0 ); /* DataDirectory[IMAGE_DIRECTORY_ENTRY_COPYRIGHT] */ put_dword( 0 ); put_dword( 0 ); /* DataDirectory[IMAGE_DIRECTORY_ENTRY_GLOBALPTR] */ -@@ -842,62 +828,95 @@ void output_fake_module( DLLSPEC *spec ) +@@ -951,62 +937,95 @@ void output_fake_module( DLLSPEC *spec ) put_dword( 0 ); put_dword( 0 ); /* DataDirectory[15] */ /* .text section */ @@ -280,7 +280,7 @@ index dde1bd0704d..c01ff6d7746 100644 } diff --git a/tools/winebuild/utils.c b/tools/winebuild/utils.c -index 925054b8bb7..eada46604ec 100644 +index f331903..7188d10 100644 --- a/tools/winebuild/utils.c +++ b/tools/winebuild/utils.c @@ -37,6 +37,7 @@ @@ -291,7 +291,7 @@ index 925054b8bb7..eada46604ec 100644 #include "build.h" #if defined(_WIN32) && !defined(__CYGWIN__) -@@ -518,8 +519,86 @@ size_t input_buffer_pos; +@@ -522,8 +523,86 @@ size_t input_buffer_pos; size_t input_buffer_size; unsigned char *output_buffer; size_t output_buffer_pos; @@ -378,7 +378,7 @@ index 925054b8bb7..eada46604ec 100644 static void check_output_buffer_space( size_t size ) { if (output_buffer_pos + size >= output_buffer_size) -@@ -556,7 +635,9 @@ void init_output_buffer(void) +@@ -560,7 +639,9 @@ void init_output_buffer(void) { output_buffer_size = 1024; output_buffer_pos = 0; @@ -388,15 +388,15 @@ index 925054b8bb7..eada46604ec 100644 } void flush_output_buffer(void) -@@ -564,6 +645,7 @@ void flush_output_buffer(void) - if (fwrite( output_buffer, 1, output_buffer_pos, output_file ) != output_buffer_pos) +@@ -570,6 +651,7 @@ void flush_output_buffer(void) fatal_error( "Error writing to %s\n", output_file_name ); + close_output_file(); free( output_buffer ); + free_labels(); } unsigned char get_byte(void) -@@ -603,12 +685,14 @@ void put_data( const void *data, size_t size ) +@@ -609,12 +691,14 @@ void put_data( const void *data, size_t size ) check_output_buffer_space( size ); memcpy( output_buffer + output_buffer_pos, data, size ); output_buffer_pos += size; @@ -411,7 +411,7 @@ index 925054b8bb7..eada46604ec 100644 } void put_word( unsigned short val ) -@@ -655,6 +739,14 @@ void align_output( unsigned int align ) +@@ -661,6 +745,14 @@ void align_output( unsigned int align ) output_buffer_pos += size; } @@ -427,5 +427,5 @@ index 925054b8bb7..eada46604ec 100644 void output_standard_file_header(void) { -- -2.12.2 +1.9.1 diff --git a/patches/winebuild-Fake_Dlls/0010-tools-winebuild-Add-syscall-thunks-for-64-bit.patch b/patches/winebuild-Fake_Dlls/0010-tools-winebuild-Add-syscall-thunks-for-64-bit.patch index f77e8e40..4d27a2e4 100644 --- a/patches/winebuild-Fake_Dlls/0010-tools-winebuild-Add-syscall-thunks-for-64-bit.patch +++ b/patches/winebuild-Fake_Dlls/0010-tools-winebuild-Add-syscall-thunks-for-64-bit.patch @@ -1,4 +1,4 @@ -From 41b39da1e8fe850985da5f90bee3df26742bf2fc Mon Sep 17 00:00:00 2001 +From d7aefc52dbb93e36fb89acec49a349cb039fb7e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Thu, 7 Sep 2017 00:38:09 +0200 Subject: [PATCH] tools/winebuild: Add syscall thunks for 64 bit. @@ -6,17 +6,17 @@ Subject: [PATCH] tools/winebuild: Add syscall thunks for 64 bit. --- dlls/kernel32/tests/loader.c | 7 +- dlls/ntdll/signal_x86_64.c | 3 + - dlls/ntdll/thread.c | 6 + + dlls/ntdll/thread.c | 6 ++ libs/wine/loader.c | 4 + tools/winebuild/parser.c | 2 +- - tools/winebuild/spec32.c | 209 ++++++++++++++++++++++++++++++++++- + tools/winebuild/spec32.c | 209 +++++++++++++++++++++++++++++++++++++++++-- 6 files changed, 223 insertions(+), 8 deletions(-) diff --git a/dlls/kernel32/tests/loader.c b/dlls/kernel32/tests/loader.c -index 3908fc75a0a..5154db69dcc 100644 +index 028a187..c97ee75 100644 --- a/dlls/kernel32/tests/loader.c +++ b/dlls/kernel32/tests/loader.c -@@ -1563,7 +1563,7 @@ static void test_filenames(void) +@@ -1564,7 +1564,7 @@ static void test_filenames(void) static void test_FakeDLL(void) { @@ -25,7 +25,7 @@ index 3908fc75a0a..5154db69dcc 100644 NTSTATUS (WINAPI *pNtSetEvent)(HANDLE, ULONG *) = NULL; IMAGE_EXPORT_DIRECTORY *dir; HMODULE module = GetModuleHandleA("ntdll.dll"); -@@ -1605,8 +1605,13 @@ static void test_FakeDLL(void) +@@ -1606,8 +1606,13 @@ static void test_FakeDLL(void) dll_func = (BYTE *)GetProcAddress(module, func_name); ok(dll_func != NULL, "%s: GetProcAddress returned NULL\n", func_name); @@ -40,7 +40,7 @@ index 3908fc75a0a..5154db69dcc 100644 todo_wine ok(0, "%s: Export is a stub-function, skipping\n", func_name); continue; diff --git a/dlls/ntdll/signal_x86_64.c b/dlls/ntdll/signal_x86_64.c -index ea55388f4b2..a5d4364dfa5 100644 +index 54871b8..0ce0c22 100644 --- a/dlls/ntdll/signal_x86_64.c +++ b/dlls/ntdll/signal_x86_64.c @@ -328,6 +328,8 @@ static inline struct amd64_thread_data *amd64_thread_data(void) @@ -61,7 +61,7 @@ index ea55388f4b2..a5d4364dfa5 100644 return status; } diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c -index 56c68e5e891..85c4cf52721 100644 +index 1c09344..afe5731 100644 --- a/dlls/ntdll/thread.c +++ b/dlls/ntdll/thread.c @@ -60,6 +60,8 @@ struct _KUSER_SHARED_DATA *user_shared_data_external; @@ -73,7 +73,7 @@ index 56c68e5e891..85c4cf52721 100644 void (WINAPI *kernel32_start_process)(LPTHREAD_START_ROUTINE,void*) = NULL; /* info passed to a starting thread */ -@@ -494,6 +496,10 @@ void thread_init(void) +@@ -301,6 +303,10 @@ void thread_init(void) InitializeListHead( &ldr.InInitializationOrderModuleList ); *(ULONG_PTR *)peb->Reserved = get_image_addr(); @@ -85,7 +85,7 @@ index 56c68e5e891..85c4cf52721 100644 * Starting with Vista, the first user to log on has session id 1. * Session id 0 is for processes that don't interact with the user (like services). diff --git a/libs/wine/loader.c b/libs/wine/loader.c -index 162c94d2921..87eb5a85ad4 100644 +index 162c94d..87eb5a8 100644 --- a/libs/wine/loader.c +++ b/libs/wine/loader.c @@ -468,7 +468,11 @@ static void *map_dll( const IMAGE_NT_HEADERS *nt_descr ) @@ -101,10 +101,10 @@ index 162c94d2921..87eb5a85ad4 100644 sec++; diff --git a/tools/winebuild/parser.c b/tools/winebuild/parser.c -index c4b9abfc9fc..064019c4404 100644 +index b758ca0..3e69540 100644 --- a/tools/winebuild/parser.c +++ b/tools/winebuild/parser.c -@@ -521,7 +521,7 @@ static const char *parse_spec_flags( DLLSPEC *spec, ORDDEF *odp ) +@@ -549,7 +549,7 @@ static const char *parse_spec_flags( DLLSPEC *spec, ORDDEF *odp ) static int needs_syscall( ORDDEF *odp, DLLSPEC *spec ) { @@ -114,10 +114,10 @@ index c4b9abfc9fc..064019c4404 100644 if (odp->flags & (FLAG_FORWARD | FLAG_REGISTER)) return 0; diff --git a/tools/winebuild/spec32.c b/tools/winebuild/spec32.c -index d2fd6a6bfa7..403aad5560d 100644 +index 3b18b6f..77bc8b4 100644 --- a/tools/winebuild/spec32.c +++ b/tools/winebuild/spec32.c -@@ -342,11 +342,11 @@ static void output_relay_debug( DLLSPEC *spec ) +@@ -357,11 +357,11 @@ static void output_relay_debug( DLLSPEC *spec ) } /******************************************************************* @@ -131,11 +131,10 @@ index d2fd6a6bfa7..403aad5560d 100644 { const unsigned int page_size = get_page_size(); int i; -@@ -444,6 +444,90 @@ static void output_syscall_thunks( DLLSPEC *spec ) - output_function_size( "__wine_syscall_dispatcher" ); +@@ -460,6 +460,90 @@ static void output_syscall_thunks( DLLSPEC *spec ) } -+/******************************************************************* + /******************************************************************* + * output_syscall_thunks_x64 + * + * Output entry points for system call functions @@ -219,11 +218,12 @@ index d2fd6a6bfa7..403aad5560d 100644 + output_function_size( "__wine_syscall_dispatcher" ); +} + - /******************************************************************* ++/******************************************************************* * output_exports * -@@ -801,7 +885,10 @@ void BuildSpec32File( DLLSPEC *spec ) - resolve_imports( spec ); + * Output the export table for a Win32 module. +@@ -816,7 +900,10 @@ void BuildSpec32File( DLLSPEC *spec ) + open_output_file(); output_standard_file_header(); output_module( spec ); - output_syscall_thunks( spec ); @@ -234,7 +234,7 @@ index d2fd6a6bfa7..403aad5560d 100644 output_stubs( spec ); output_exports( spec ); output_imports( spec ); -@@ -813,7 +900,7 @@ void BuildSpec32File( DLLSPEC *spec ) +@@ -829,7 +916,7 @@ void BuildSpec32File( DLLSPEC *spec ) static int needs_stub_exports( DLLSPEC *spec ) { @@ -243,7 +243,7 @@ index d2fd6a6bfa7..403aad5560d 100644 return 0; if (!(spec->characteristics & IMAGE_FILE_DLL)) return 0; -@@ -823,7 +910,7 @@ static int needs_stub_exports( DLLSPEC *spec ) +@@ -839,7 +926,7 @@ static int needs_stub_exports( DLLSPEC *spec ) } @@ -252,7 +252,7 @@ index d2fd6a6bfa7..403aad5560d 100644 { int i, nr_exports = spec->base <= spec->limit ? spec->limit - spec->base + 1 : 0; size_t rva, thunk; -@@ -985,6 +1072,113 @@ static void create_stub_exports_text( DLLSPEC *spec ) +@@ -1001,6 +1088,113 @@ static void create_stub_exports_text( DLLSPEC *spec ) } @@ -366,7 +366,7 @@ index d2fd6a6bfa7..403aad5560d 100644 static void create_stub_exports_data( DLLSPEC *spec ) { int i; -@@ -1184,7 +1378,10 @@ static void output_fake_module_pass( DLLSPEC *spec ) +@@ -1200,7 +1394,10 @@ static void output_fake_module_pass( DLLSPEC *spec ) if (needs_stub_exports( spec )) { put_label( "text_start" ); @@ -379,5 +379,5 @@ index d2fd6a6bfa7..403aad5560d 100644 } else -- -2.20.1 +1.9.1 diff --git a/patches/wined3d-Dual_Source_Blending/0003-wined3d-Implement-dual-source-blending.patch b/patches/wined3d-Dual_Source_Blending/0003-wined3d-Implement-dual-source-blending.patch index e7c5adfd..29b5aa06 100644 --- a/patches/wined3d-Dual_Source_Blending/0003-wined3d-Implement-dual-source-blending.patch +++ b/patches/wined3d-Dual_Source_Blending/0003-wined3d-Implement-dual-source-blending.patch @@ -1,4 +1,4 @@ -From 06902c666a0d67d2d32e584b5b2a6c9e4215f55d Mon Sep 17 00:00:00 2001 +From 79fcdb0aa1f8d873eb807fda571559c9788508af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Fri, 18 Aug 2017 23:51:59 +0200 Subject: [PATCH] wined3d: Implement dual source blending. @@ -6,18 +6,18 @@ Subject: [PATCH] wined3d: Implement dual source blending. --- dlls/d3d11/tests/d3d11.c | 2 +- dlls/wined3d/adapter_gl.c | 10 ++++++++++ - dlls/wined3d/context.c | 11 ++++++++++- + dlls/wined3d/context.c | 12 +++++++++++- dlls/wined3d/glsl_shader.c | 20 +++++++++++++++++--- dlls/wined3d/shader.c | 2 ++ dlls/wined3d/state.c | 14 ++++++++++++-- dlls/wined3d/wined3d_private.h | 24 ++++++++++++++++++++++-- - 7 files changed, 74 insertions(+), 9 deletions(-) + 7 files changed, 75 insertions(+), 9 deletions(-) diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c -index 435320b7..5bb3aaaf 100644 +index 14ffa4e..2047bb8 100644 --- a/dlls/d3d11/tests/d3d11.c +++ b/dlls/d3d11/tests/d3d11.c -@@ -29281,7 +29281,7 @@ static void test_dual_blending(void) +@@ -29294,7 +29294,7 @@ static void test_dual_blending(void) ID3D11DeviceContext_ClearRenderTargetView(context, rtv[1], white); ID3D11DeviceContext_Draw(context, 3, 0); @@ -27,10 +27,10 @@ index 435320b7..5bb3aaaf 100644 ID3D11BlendState_Release(blend_state); diff --git a/dlls/wined3d/adapter_gl.c b/dlls/wined3d/adapter_gl.c -index acfed24b..a1ba405b 100644 +index da7574f..8dd04f7 100644 --- a/dlls/wined3d/adapter_gl.c +++ b/dlls/wined3d/adapter_gl.c -@@ -2910,6 +2910,12 @@ static void wined3d_adapter_init_limits(struct wined3d_gl_info *gl_info, struct +@@ -2926,6 +2926,12 @@ static void wined3d_adapter_init_limits(struct wined3d_gl_info *gl_info, struct gl_info->limits.buffers = min(MAX_RENDER_TARGET_VIEWS, gl_max); TRACE("Max draw buffers: %u.\n", gl_max); } @@ -43,9 +43,9 @@ index acfed24b..a1ba405b 100644 if (gl_info->supported[ARB_MULTITEXTURE]) { if (gl_info->supported[WINED3D_GL_LEGACY_CONTEXT]) -@@ -3736,6 +3742,10 @@ static BOOL wined3d_adapter_init_gl_caps(struct wined3d_adapter *adapter, - for (i = 0; i < gl_info->limits.buffers; ++i) - d3d_info->valid_rt_mask |= (1u << i); +@@ -3755,6 +3761,10 @@ static BOOL wined3d_adapter_init_gl_caps(struct wined3d_adapter *adapter, + + TRACE("Max texture stages: %u.\n", d3d_info->limits.ffp_blend_stages); + d3d_info->valid_dual_rt_mask = 0; + for (i = 0; i < gl_info->limits.dual_buffers; ++i) @@ -55,10 +55,10 @@ index acfed24b..a1ba405b 100644 { /* We do not want to deal with re-creating immutable texture storage diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c -index 393b336c..927729ad 100644 +index 267238d..6b687b3 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c -@@ -3159,10 +3159,19 @@ static DWORD find_draw_buffers_mask(const struct wined3d_context *context, const +@@ -3160,10 +3160,20 @@ static unsigned int find_draw_buffers_mask(const struct wined3d_context *context else if (!context->render_offscreen) return context_generate_rt_mask_from_resource(rts[0]->resource); @@ -68,11 +68,12 @@ index 393b336c..927729ad 100644 + * DX11 does not treat this configuration as invalid, so disable the unused ones. + */ rt_mask = ps ? ps->reg_maps.rt_mask : 1; -- rt_mask &= context->d3d_info->valid_rt_mask; +- rt_mask &= (1u << gl_info->limits.buffers) - 1; ++ + if (wined3d_dualblend_enabled(state, context->gl_info)) + rt_mask &= context->d3d_info->valid_dual_rt_mask; + else -+ rt_mask &= context->d3d_info->valid_rt_mask; ++ rt_mask &= (1u << gl_info->limits.buffers) - 1; mask = rt_mask; + i = 0; @@ -80,10 +81,10 @@ index 393b336c..927729ad 100644 { i = wined3d_bit_scan(&mask); diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c -index 660005f5..470cb0c3 100644 +index fa6e302..2e8a45f 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c -@@ -3064,6 +3064,7 @@ static void shader_glsl_get_register_name(const struct wined3d_shader_register * +@@ -3067,6 +3067,7 @@ static void shader_glsl_get_register_name(const struct wined3d_shader_register * break; case WINED3DSPR_COLOROUT: @@ -91,7 +92,7 @@ index 660005f5..470cb0c3 100644 if (reg->idx[0].offset >= gl_info->limits.buffers) WARN("Write to render target %u, only %d supported.\n", reg->idx[0].offset, gl_info->limits.buffers); -@@ -7972,7 +7973,10 @@ static GLuint shader_glsl_generate_pshader(const struct wined3d_context *context +@@ -7975,7 +7976,10 @@ static GLuint shader_glsl_generate_pshader(const struct wined3d_context *context { const struct wined3d_shader_signature *output_signature = &shader->output_signature; @@ -103,7 +104,7 @@ index 660005f5..470cb0c3 100644 if (output_signature->element_count) { for (i = 0; i < output_signature->element_count; ++i) -@@ -7987,7 +7991,12 @@ static GLuint shader_glsl_generate_pshader(const struct wined3d_context *context +@@ -7990,7 +7994,12 @@ static GLuint shader_glsl_generate_pshader(const struct wined3d_context *context continue; } if (shader_glsl_use_explicit_attrib_location(gl_info)) @@ -117,7 +118,7 @@ index 660005f5..470cb0c3 100644 shader_addline(buffer, "out %s4 color_out%u;\n", component_type_info[output->component_type].glsl_vector_type, output->semantic_idx); } -@@ -8000,7 +8009,12 @@ static GLuint shader_glsl_generate_pshader(const struct wined3d_context *context +@@ -8003,7 +8012,12 @@ static GLuint shader_glsl_generate_pshader(const struct wined3d_context *context { i = wined3d_bit_scan(&mask); if (shader_glsl_use_explicit_attrib_location(gl_info)) @@ -132,7 +133,7 @@ index 660005f5..470cb0c3 100644 } } diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c -index 83a793d5..2db4a3cb 100644 +index 83a793d..2db4a3c 100644 --- a/dlls/wined3d/shader.c +++ b/dlls/wined3d/shader.c @@ -4147,6 +4147,8 @@ void find_ps_compile_args(const struct wined3d_state *state, const struct wined3 @@ -145,7 +146,7 @@ index 83a793d5..2db4a3cb 100644 static HRESULT pixel_shader_init(struct wined3d_shader *shader, struct wined3d_device *device, diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c -index f049ad9e..68bad2c6 100644 +index f071f30..2d44e68 100644 --- a/dlls/wined3d/state.c +++ b/dlls/wined3d/state.c @@ -533,12 +533,14 @@ static void state_blend(struct wined3d_context *context, const struct wined3d_st @@ -188,18 +189,18 @@ index f049ad9e..68bad2c6 100644 state->render_states[WINED3D_RS_SRCBLEND], state->render_states[WINED3D_RS_DESTBLEND], rt_format); diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h -index cd49789c..a95b1a42 100644 +index 8f23a01..c417a6e 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h -@@ -196,6 +196,7 @@ struct wined3d_d3d_info +@@ -195,6 +195,7 @@ struct wined3d_d3d_info + { struct wined3d_d3d_limits limits; struct wined3d_ffp_attrib_ops ffp_attrib_ops; - DWORD valid_rt_mask; + DWORD valid_dual_rt_mask; DWORD wined3d_creation_flags; unsigned int xyzrhw : 1; unsigned int emulated_flatshading : 1; -@@ -1361,7 +1362,8 @@ struct ps_compile_args +@@ -1372,7 +1373,8 @@ struct ps_compile_args DWORD alpha_test_func : 3; DWORD render_offscreen : 1; DWORD rt_alpha_swizzle : 8; /* MAX_RENDER_TARGET_VIEWS, 8 */ @@ -209,7 +210,7 @@ index cd49789c..a95b1a42 100644 }; enum fog_src_type -@@ -1923,7 +1925,8 @@ struct wined3d_context +@@ -1934,7 +1936,8 @@ struct wined3d_context DWORD shader_update_mask : 6; /* WINED3D_SHADER_TYPE_COUNT, 6 */ DWORD clip_distance_mask : 8; /* WINED3D_MAX_CLIP_DISTANCES, 8 */ DWORD num_untracked_materials : 2; /* Max value 2 */ @@ -219,7 +220,7 @@ index cd49789c..a95b1a42 100644 DWORD constant_update_mask; DWORD numbered_array_mask; -@@ -2552,6 +2555,7 @@ struct wined3d_fbo_ops +@@ -2564,6 +2567,7 @@ struct wined3d_fbo_ops struct wined3d_gl_limits { UINT buffers; @@ -227,7 +228,7 @@ index cd49789c..a95b1a42 100644 UINT lights; UINT textures; UINT texture_coords; -@@ -2954,6 +2958,22 @@ struct wined3d_state +@@ -2966,6 +2970,22 @@ struct wined3d_state struct wined3d_rasterizer_state *rasterizer_state; }; @@ -251,5 +252,5 @@ index cd49789c..a95b1a42 100644 { GLuint tex_1d; -- -2.20.1 +1.9.1 diff --git a/patches/wmvcore-WMCreateSyncReader/0001-wmvcore-Implement-WMCreateSyncReader.patch b/patches/wmvcore-WMCreateSyncReader/0001-wmvcore-Implement-WMCreateSyncReader.patch deleted file mode 100644 index 25a317a6..00000000 --- a/patches/wmvcore-WMCreateSyncReader/0001-wmvcore-Implement-WMCreateSyncReader.patch +++ /dev/null @@ -1,280 +0,0 @@ -From acfe1f58e910c7cf5ec6f953ad7459fff04bad42 Mon Sep 17 00:00:00 2001 -From: Andrey Gusev -Date: Mon, 18 Feb 2019 10:45:17 +1100 -Subject: [PATCH] wmvcore: Implement WMCreateSyncReader - -Wine-bug: https://bugs.winehq.org/show_bug.cgi?id=35841 ---- - dlls/wmvcore/wmvcore_main.c | 250 +++++++++++++++++++++++++++++++++++++++++++- - 1 file changed, 247 insertions(+), 3 deletions(-) - -diff --git a/dlls/wmvcore/wmvcore_main.c b/dlls/wmvcore/wmvcore_main.c -index 690885e..be90318 100644 ---- a/dlls/wmvcore/wmvcore_main.c -+++ b/dlls/wmvcore/wmvcore_main.c -@@ -2103,15 +2103,259 @@ HRESULT WINAPI WMCreateReaderPriv(IWMReader **ret_reader) - return WMCreateReader(NULL, 0, ret_reader); - } - --HRESULT WINAPI WMCreateSyncReader(IUnknown *pcert, DWORD rights, IWMSyncReader **syncreader) -+typedef struct { -+ IWMSyncReader IWMSyncReader_iface; -+ LONG ref; -+} WMSyncReader; -+ -+static inline WMSyncReader *impl_from_IWMSyncReader(IWMSyncReader *iface) -+{ -+ return CONTAINING_RECORD(iface, WMSyncReader, IWMSyncReader_iface); -+} -+ -+static HRESULT WINAPI WMSyncReader_QueryInterface(IWMSyncReader *iface, REFIID riid, void **ppv) -+{ -+ WMSyncReader *This = impl_from_IWMSyncReader(iface); -+ -+ if(IsEqualGUID(riid, &IID_IUnknown)) { -+ TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv); -+ *ppv = &This->IWMSyncReader_iface; -+ }else if(IsEqualGUID(riid, &IID_IWMSyncReader)) { -+ TRACE("(%p)->(IID_IWMSyncReader %p)\n", This, ppv); -+ *ppv = &This->IWMSyncReader_iface; -+ }else { -+ *ppv = NULL; -+ FIXME("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv); -+ return E_NOINTERFACE; -+ } -+ -+ IUnknown_AddRef((IUnknown*)*ppv); -+ return S_OK; -+} -+ -+static ULONG WINAPI WMSyncReader_AddRef(IWMSyncReader *iface) -+{ -+ WMSyncReader *This = impl_from_IWMSyncReader(iface); -+ LONG ref = InterlockedIncrement(&This->ref); -+ -+ TRACE("(%p) ref=%d\n", This, ref); -+ -+ return ref; -+} -+ -+static ULONG WINAPI WMSyncReader_Release(IWMSyncReader *iface) -+{ -+ WMSyncReader *This = impl_from_IWMSyncReader(iface); -+ LONG ref = InterlockedDecrement(&This->ref); -+ -+ TRACE("(%p) ref=%d\n", This, ref); -+ -+ if(!ref) -+ heap_free(This); -+ -+ return ref; -+} -+ -+static HRESULT WINAPI WMSyncReader_Close(IWMSyncReader *iface) -+{ -+ WMSyncReader *This = impl_from_IWMSyncReader(iface); -+ FIXME("(%p): stub!\n", This); -+ return E_NOTIMPL; -+} -+ -+static HRESULT WINAPI WMSyncReader_GetMaxOutputSampleSize(IWMSyncReader *iface, DWORD output, DWORD *max) -+{ -+ WMSyncReader *This = impl_from_IWMSyncReader(iface); -+ FIXME("(%p)->(%d %p): stub!\n", This, output, max); -+ return E_NOTIMPL; -+} -+ -+static HRESULT WINAPI WMSyncReader_GetMaxStreamSampleSize(IWMSyncReader *iface, WORD stream, DWORD *max) -+{ -+ WMSyncReader *This = impl_from_IWMSyncReader(iface); -+ FIXME("(%p)->(%d %p): stub!\n", This, stream, max); -+ return E_NOTIMPL; -+} -+ -+static HRESULT WINAPI WMSyncReader_GetNextSample(IWMSyncReader *iface, WORD stream, INSSBuffer **sample, -+ QWORD *sample_time, QWORD *sample_duration, DWORD *flags, DWORD *output_num, WORD *stream_num) - { -- FIXME("(%p, %x, %p): stub\n", pcert, rights, syncreader); -+ WMSyncReader *This = impl_from_IWMSyncReader(iface); -+ FIXME("(%p)->(%d %p %p %p %p %p %p): stub!\n", This, stream, sample, sample_time, -+ sample_duration, flags, output_num, stream_num); -+ return E_NOTIMPL; -+} - -- *syncreader = NULL; -+static HRESULT WINAPI WMSyncReader_GetOutputCount(IWMSyncReader *iface, DWORD *outputs) -+{ -+ WMSyncReader *This = impl_from_IWMSyncReader(iface); -+ FIXME("(%p)->(%p): stub!\n", This, outputs); -+ return E_NOTIMPL; -+} - -+static HRESULT WINAPI WMSyncReader_GetOutputFormat(IWMSyncReader *iface, DWORD output_num, DWORD format_num, -+ IWMOutputMediaProps **props) -+{ -+ WMSyncReader *This = impl_from_IWMSyncReader(iface); -+ FIXME("(%p)->(%u %u %p): stub!\n", This, output_num, format_num, props); - return E_NOTIMPL; - } - -+static HRESULT WINAPI WMSyncReader_GetOutputFormatCount(IWMSyncReader *iface, DWORD output_num, DWORD *formats) -+{ -+ WMSyncReader *This = impl_from_IWMSyncReader(iface); -+ FIXME("(%p)->(%u %p): stub!\n", This, output_num, formats); -+ return E_NOTIMPL; -+} -+ -+static HRESULT WINAPI WMSyncReader_GetOutputNumberForStream(IWMSyncReader *iface, WORD stream_num, DWORD *output_num) -+{ -+ WMSyncReader *This = impl_from_IWMSyncReader(iface); -+ FIXME("(%p)->(%u %p): stub!\n", This, stream_num, output_num); -+ return E_NOTIMPL; -+} -+ -+static HRESULT WINAPI WMSyncReader_GetOutputProps(IWMSyncReader *iface, DWORD output_num, IWMOutputMediaProps **output) -+{ -+ WMSyncReader *This = impl_from_IWMSyncReader(iface); -+ FIXME("(%p)->(%u %p): stub!\n", This, output_num, output); -+ return E_NOTIMPL; -+} -+ -+static HRESULT WINAPI WMSyncReader_GetOutputSetting(IWMSyncReader *iface, DWORD output_num, const WCHAR *name, -+ WMT_ATTR_DATATYPE *type, BYTE *value, WORD *length) -+{ -+ WMSyncReader *This = impl_from_IWMSyncReader(iface); -+ FIXME("(%p)->(%u %s %p %p %p): stub!\n", This, output_num, debugstr_w(name), type, value, length); -+ return E_NOTIMPL; -+} -+ -+static HRESULT WINAPI WMSyncReader_GetReadStreamSamples(IWMSyncReader *iface, WORD stream_num, BOOL *compressed) -+{ -+ WMSyncReader *This = impl_from_IWMSyncReader(iface); -+ FIXME("(%p)->(%d %p): stub!\n", This, stream_num, compressed); -+ return E_NOTIMPL; -+} -+ -+static HRESULT WINAPI WMSyncReader_GetStreamNumberForOutput(IWMSyncReader *iface, DWORD output, WORD *stream_num) -+{ -+ WMSyncReader *This = impl_from_IWMSyncReader(iface); -+ FIXME("(%p)->(%u %p): stub!\n", This, output, stream_num); -+ return S_OK; -+} -+ -+static HRESULT WINAPI WMSyncReader_GetStreamSelected(IWMSyncReader *iface, WORD stream_num, WMT_STREAM_SELECTION *selection) -+{ -+ WMSyncReader *This = impl_from_IWMSyncReader(iface); -+ FIXME("(%p)->(%d %p): stub!\n", This, stream_num, selection); -+ return E_NOTIMPL; -+} -+ -+static HRESULT WINAPI WMSyncReader_Open(IWMSyncReader *iface, const WCHAR *filename) -+{ -+ WMSyncReader *This = impl_from_IWMSyncReader(iface); -+ FIXME("(%p)->(%s): stub!\n", This, debugstr_w(filename)); -+ return E_NOTIMPL; -+} -+ -+static HRESULT WINAPI WMSyncReader_OpenStream(IWMSyncReader *iface, IStream *stream) -+{ -+ WMSyncReader *This = impl_from_IWMSyncReader(iface); -+ FIXME("(%p)->(%p): stub!\n", This, stream); -+ return E_NOTIMPL; -+} -+ -+static HRESULT WINAPI WMSyncReader_SetOutputProps(IWMSyncReader *iface, DWORD output_num, IWMOutputMediaProps *output) -+{ -+ WMSyncReader *This = impl_from_IWMSyncReader(iface); -+ FIXME("(%p)->(%u %p): stub!\n", This, output_num, output); -+ return E_NOTIMPL; -+} -+ -+static HRESULT WINAPI WMSyncReader_SetOutputSetting(IWMSyncReader *iface, DWORD output_num, const WCHAR *name, -+ WMT_ATTR_DATATYPE type, const BYTE *value, WORD length) -+{ -+ WMSyncReader *This = impl_from_IWMSyncReader(iface); -+ FIXME("(%p)->(%d %s %d %p %d): stub!\n", This, output_num, debugstr_w(name), type, value, length); -+ return E_NOTIMPL; -+} -+ -+static HRESULT WINAPI WMSyncReader_SetRange(IWMSyncReader *iface, QWORD start, LONGLONG duration) -+{ -+ WMSyncReader *This = impl_from_IWMSyncReader(iface); -+ FIXME("(%p)->(%s %s): stub!\n", This, wine_dbgstr_longlong(start), wine_dbgstr_longlong(duration)); -+ return E_NOTIMPL; -+} -+ -+static HRESULT WINAPI WMSyncReader_SetRangeByFrame(IWMSyncReader *iface, WORD stream_num, QWORD frame_num, -+ LONGLONG frames) -+{ -+ WMSyncReader *This = impl_from_IWMSyncReader(iface); -+ FIXME("(%p)->(%d %s %s): stub!\n", This, stream_num, wine_dbgstr_longlong(frame_num), wine_dbgstr_longlong(frames)); -+ return E_NOTIMPL; -+} -+ -+static HRESULT WINAPI WMSyncReader_SetReadStreamSamples(IWMSyncReader *iface, WORD stream_num, BOOL compressed) -+{ -+ WMSyncReader *This = impl_from_IWMSyncReader(iface); -+ FIXME("(%p)->(%u %x): stub!\n", This, stream_num, compressed); -+ return E_NOTIMPL; -+} -+ -+static HRESULT WINAPI WMSyncReader_SetStreamsSelected(IWMSyncReader *iface, WORD stream_count, -+ WORD *stream_numbers, WMT_STREAM_SELECTION *selections) -+{ -+ WMSyncReader *This = impl_from_IWMSyncReader(iface); -+ FIXME("(%p)->(%d %p %p): stub!\n", This, stream_count, stream_numbers, selections); -+ return S_OK; -+} -+ -+static const IWMSyncReaderVtbl WMSyncReaderVtbl = { -+ WMSyncReader_QueryInterface, -+ WMSyncReader_AddRef, -+ WMSyncReader_Release, -+ WMSyncReader_Open, -+ WMSyncReader_Close, -+ WMSyncReader_SetRange, -+ WMSyncReader_SetRangeByFrame, -+ WMSyncReader_GetNextSample, -+ WMSyncReader_SetStreamsSelected, -+ WMSyncReader_GetStreamSelected, -+ WMSyncReader_SetReadStreamSamples, -+ WMSyncReader_GetReadStreamSamples, -+ WMSyncReader_GetOutputSetting, -+ WMSyncReader_SetOutputSetting, -+ WMSyncReader_GetOutputCount, -+ WMSyncReader_GetOutputProps, -+ WMSyncReader_SetOutputProps, -+ WMSyncReader_GetOutputFormatCount, -+ WMSyncReader_GetOutputFormat, -+ WMSyncReader_GetOutputNumberForStream, -+ WMSyncReader_GetStreamNumberForOutput, -+ WMSyncReader_GetMaxOutputSampleSize, -+ WMSyncReader_GetMaxStreamSampleSize, -+ WMSyncReader_OpenStream -+}; -+ -+HRESULT WINAPI WMCreateSyncReader(IUnknown *pcert, DWORD rights, IWMSyncReader **syncreader) -+{ -+ WMSyncReader *sync; -+ -+ TRACE("(%p, %x, %p)\n", pcert, rights, syncreader); -+ -+ sync = heap_alloc(sizeof(*sync)); -+ -+ if (!sync) -+ return E_OUTOFMEMORY; -+ -+ sync->IWMSyncReader_iface.lpVtbl = &WMSyncReaderVtbl; -+ sync->ref = 1; -+ -+ *syncreader = &sync->IWMSyncReader_iface; -+ -+ return S_OK; -+} -+ - typedef struct { - IWMProfileManager IWMProfileManager_iface; - LONG ref; --- -1.9.1 - diff --git a/patches/wmvcore-WMCreateSyncReader/definition b/patches/wmvcore-WMCreateSyncReader/definition deleted file mode 100644 index 467191f5..00000000 --- a/patches/wmvcore-WMCreateSyncReader/definition +++ /dev/null @@ -1 +0,0 @@ -Fixes: [35841] wmvcore: Implement WMCreateSyncReader diff --git a/patches/wmvcore-WMCreateSyncReaderPriv/0001-wmvcore-Implement-WMCreateSyncReaderPriv.patch b/patches/wmvcore-WMCreateSyncReaderPriv/0001-wmvcore-Implement-WMCreateSyncReaderPriv.patch deleted file mode 100644 index 0fe361cb..00000000 --- a/patches/wmvcore-WMCreateSyncReaderPriv/0001-wmvcore-Implement-WMCreateSyncReaderPriv.patch +++ /dev/null @@ -1,43 +0,0 @@ -From e27526b76229023c211e5541a2db7fef356b74f2 Mon Sep 17 00:00:00 2001 -From: Andrey Gusev -Date: Mon, 12 Nov 2018 14:54:32 +1100 -Subject: [PATCH] wmvcore: Implement WMCreateSyncReaderPriv - -Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=37327 ---- - dlls/wmvcore/wmvcore.spec | 2 +- - dlls/wmvcore/wmvcore_main.c | 5 +++++ - 2 files changed, 6 insertions(+), 1 deletion(-) - -diff --git a/dlls/wmvcore/wmvcore.spec b/dlls/wmvcore/wmvcore.spec -index 61c3c08..23d8caf 100644 ---- a/dlls/wmvcore/wmvcore.spec -+++ b/dlls/wmvcore/wmvcore.spec -@@ -1,7 +1,7 @@ - @ stdcall WMCheckURLExtension(wstr) - @ stdcall WMCheckURLScheme(wstr) - @ stub WMCreateBackupRestorerPrivate --@ stub WMCreateSyncReaderPriv -+@ stdcall WMCreateSyncReaderPriv(ptr) - @ stub WMIsAvailableOffline - @ stub WMValidateData - @ stdcall -private DllRegisterServer() -diff --git a/dlls/wmvcore/wmvcore_main.c b/dlls/wmvcore/wmvcore_main.c -index 951a1ec..511a66f 100644 ---- a/dlls/wmvcore/wmvcore_main.c -+++ b/dlls/wmvcore/wmvcore_main.c -@@ -2366,6 +2366,11 @@ HRESULT WINAPI WMCreateSyncReader(IUnknown *pcert, DWORD rights, IWMSyncReader * - return S_OK; - } - -+HRESULT WINAPI WMCreateSyncReaderPriv(IWMSyncReader **syncreader) -+{ -+ return WMCreateSyncReader(NULL, 0, syncreader); -+} -+ - typedef struct { - IWMProfileManager IWMProfileManager_iface; - LONG ref; --- -1.9.1 - diff --git a/patches/wmvcore-WMCreateSyncReaderPriv/definition b/patches/wmvcore-WMCreateSyncReaderPriv/definition deleted file mode 100644 index eff06a84..00000000 --- a/patches/wmvcore-WMCreateSyncReaderPriv/definition +++ /dev/null @@ -1,2 +0,0 @@ -Fixes: [37327] wmvcore: Implement WMCreateSyncReaderPriv -Depends: wmvcore-WMCreateSyncReader diff --git a/patches/xaudio2-revert/definition b/patches/xaudio2-revert/definition index 74b87575..cd0ffbda 100644 --- a/patches/xaudio2-revert/definition +++ b/patches/xaudio2-revert/definition @@ -1 +1 @@ -Fixes: Revert FAduio patches to package isssue with faudio not being availabe for most distro's. +Fixes: Revert FAudio patches to avoid package issues with FAudio not being available for most distro's.