diff --git a/README.md b/README.md index d0da328a..d98e8099 100644 --- a/README.md +++ b/README.md @@ -118,7 +118,7 @@ for more details.* * CreateProcess does not prioritize the working directory over the system search path ([Wine Bug #23934](https://bugs.winehq.org/show_bug.cgi?id=23934)) * D3DCompileShader should filter specific warning messages ([Wine Bug #33770](https://bugs.winehq.org/show_bug.cgi?id=33770)) * Do not allow to deallocate thread stack for current thread -* Do not check if object was signaled after user APC in server_select +* ~~Do not check if object was signaled after user APC in server_select~~ * Do not fail when a used context is passed to wglShareLists ([Wine Bug #11436](https://bugs.winehq.org/show_bug.cgi?id=11436)) * Do not signal threads until they are really gone * Do not use unixfs for devices without mountpoint @@ -190,7 +190,7 @@ for more details.* * Implement a Times New Roman replacement font ([Wine Bug #32342](https://bugs.winehq.org/show_bug.cgi?id=32342)) * Implement additional stub functions in authz.dll * Implement an Arial replacement font ([Wine Bug #32323](https://bugs.winehq.org/show_bug.cgi?id=32323)) -* Implement combase.WindowsSubstring function +* ~~Implement combase.WindowsSubstring function~~ * Implement default homepage button in inetcpl.cpl * Implement enumeration of sound devices and basic properties to dxdiagn ([Wine Bug #32613](https://bugs.winehq.org/show_bug.cgi?id=32613)) * Implement exclusive mode in PulseAudio backend ([Wine Bug #37042](https://bugs.winehq.org/show_bug.cgi?id=37042)) diff --git a/debian/changelog b/debian/changelog index 5838b65c..2761d00e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -17,6 +17,10 @@ wine-staging (1.7.54) UNRELEASED; urgency=low unwinding on x86_64 (accepted upstream). * Removed patch to release capture before sending WM_COMMAND (accepted upstream). + * Removed patch to avoid check for signaled object after user APC in + server_select (accepted upstream). + * Removed patch to implement combase.WindowsSubstring function (accepted + upstream). -- Sebastian Lackner Mon, 19 Oct 2015 21:56:22 +0200 wine-staging (1.7.53) unstable; urgency=low diff --git a/patches/combase-String/0001-combase-implement-WindowsSubstring-try-2.patch b/patches/combase-String/0001-combase-implement-WindowsSubstring-try-2.patch deleted file mode 100644 index d68106a2..00000000 --- a/patches/combase-String/0001-combase-implement-WindowsSubstring-try-2.patch +++ /dev/null @@ -1,181 +0,0 @@ -From 397611b845973e2418118ffcb4aee305b671d533 Mon Sep 17 00:00:00 2001 -From: Thomas Pointhuber -Date: Mon, 16 Mar 2015 09:45:21 +0100 -Subject: combase: implement WindowsSubstring (try 2) - ---- - .../api-ms-win-core-winrt-string-l1-1-0.spec | 2 +- - dlls/combase/combase.spec | 2 +- - dlls/combase/string.c | 19 +++++++ - dlls/combase/tests/string.c | 60 ++++++++++++++++++++++ - include/winerror.h | 1 + - 5 files changed, 82 insertions(+), 2 deletions(-) - -diff --git a/dlls/api-ms-win-core-winrt-string-l1-1-0/api-ms-win-core-winrt-string-l1-1-0.spec b/dlls/api-ms-win-core-winrt-string-l1-1-0/api-ms-win-core-winrt-string-l1-1-0.spec -index 2361a1d..825980d 100644 ---- a/dlls/api-ms-win-core-winrt-string-l1-1-0/api-ms-win-core-winrt-string-l1-1-0.spec -+++ b/dlls/api-ms-win-core-winrt-string-l1-1-0/api-ms-win-core-winrt-string-l1-1-0.spec -@@ -21,7 +21,7 @@ - @ stdcall WindowsPromoteStringBuffer(ptr ptr) combase.WindowsPromoteStringBuffer - @ stub WindowsReplaceString - @ stdcall WindowsStringHasEmbeddedNull(ptr ptr) combase.WindowsStringHasEmbeddedNull --@ stub WindowsSubstring -+@ stdcall WindowsSubstring(ptr long ptr) combase.WindowsSubstring - @ stub WindowsSubstringWithSpecifiedLength - @ stub WindowsTrimStringEnd - @ stub WindowsTrimStringStart -diff --git a/dlls/combase/combase.spec b/dlls/combase/combase.spec -index ac095ce..48c3a7e 100644 ---- a/dlls/combase/combase.spec -+++ b/dlls/combase/combase.spec -@@ -302,7 +302,7 @@ - @ stdcall WindowsPromoteStringBuffer(ptr ptr) - @ stub WindowsReplaceString - @ stdcall WindowsStringHasEmbeddedNull(ptr ptr) --@ stub WindowsSubstring -+@ stdcall WindowsSubstring(ptr long ptr) - @ stub WindowsSubstringWithSpecifiedLength - @ stub WindowsTrimStringEnd - @ stub WindowsTrimStringStart -diff --git a/dlls/combase/string.c b/dlls/combase/string.c -index 7054af6..33e5100 100644 ---- a/dlls/combase/string.c -+++ b/dlls/combase/string.c -@@ -255,6 +255,25 @@ HRESULT WINAPI WindowsStringHasEmbeddedNull(HSTRING str, BOOL *out) - } - - /*********************************************************************** -+ * WindowsSubstring (combase.@) -+ */ -+HRESULT WINAPI WindowsSubstring(HSTRING str, UINT32 start, HSTRING *out) -+{ -+ struct hstring_private *priv = impl_from_HSTRING(str); -+ UINT32 len = WindowsGetStringLen(str); -+ if (out == NULL) -+ return E_INVALIDARG; -+ if (start > len) -+ return E_BOUNDS; -+ if (start == len) -+ { -+ *out = NULL; -+ return S_OK; -+ } -+ return WindowsCreateString(&priv->buffer[start], len - start, out); -+} -+ -+/*********************************************************************** - * WindowsIsStringEmpty (combase.@) - */ - BOOL WINAPI WindowsIsStringEmpty(HSTRING str) -diff --git a/dlls/combase/tests/string.c b/dlls/combase/tests/string.c -index 72eaa84..c46d04e 100644 ---- a/dlls/combase/tests/string.c -+++ b/dlls/combase/tests/string.c -@@ -38,6 +38,7 @@ static BOOL (WINAPI *pWindowsIsStringEmpty)(HSTRING); - static HRESULT (WINAPI *pWindowsPreallocateStringBuffer)(UINT32, WCHAR **, HSTRING_BUFFER *); - static HRESULT (WINAPI *pWindowsPromoteStringBuffer)(HSTRING_BUFFER, HSTRING *); - static HRESULT (WINAPI *pWindowsStringHasEmbeddedNull)(HSTRING, BOOL *); -+static HRESULT (WINAPI *pWindowsSubstring)(HSTRING, UINT32, HSTRING *); - - #define SET(x) p##x = (void*)GetProcAddress(hmod, #x) - -@@ -60,6 +61,7 @@ static BOOL init_functions(void) - SET(WindowsPreallocateStringBuffer); - SET(WindowsPromoteStringBuffer); - SET(WindowsStringHasEmbeddedNull); -+ SET(WindowsSubstring); - return TRUE; - } - -@@ -92,6 +94,7 @@ static void _check_string(int line, HSTRING str, LPCWSTR content, UINT32 length, - static const WCHAR input_string[] = { 'a', 'b', 'c', 'd', 'e', 'f', '\0', '\0' }; - static const WCHAR input_empty_string[] = { '\0' }; - static const WCHAR input_embed_null[] = { 'a', '\0', 'c', '\0', 'e', 'f', '\0' }; -+static const WCHAR output_substring[] = { 'c', 'd', 'e', 'f', '\0' }; - - static void test_create_delete(void) - { -@@ -236,6 +239,62 @@ static void test_string_buffer(void) - ok(pWindowsDeleteString(str) == S_OK, "Failed to delete string\n"); - } - -+static void test_substring(void) -+{ -+ HSTRING str, substr; -+ HSTRING_HEADER header; -+ -+ /* Test substring of string buffers */ -+ ok(pWindowsCreateString(input_string, 6, &str) == S_OK, "Failed to create string\n"); -+ ok(pWindowsSubstring(str, 2, &substr) == S_OK, "Failed to create substring!\n"); -+ check_string(substr, output_substring, 4, FALSE); -+ ok(pWindowsDeleteString(substr) == S_OK, "Failed to delete string\n"); -+ ok(pWindowsDeleteString(str) == S_OK, "Failed to delete string\n"); -+ -+ /* Test duplication of string using substring */ -+ ok(pWindowsCreateString(input_string, 6, &str) == S_OK, "Failed to create string\n"); -+ ok(pWindowsSubstring(str, 0, &substr) == S_OK, "Failed to create substring!\n"); -+ ok(str != substr, "Duplicated string didn't create new string\n"); -+ check_string(substr, input_string, 6, FALSE); -+ ok(pWindowsDeleteString(substr) == S_OK, "Failed to delete string\n"); -+ ok(pWindowsDeleteString(str) == S_OK, "Failed to delete string\n"); -+ -+ /* Test substring of string reference */ -+ ok(pWindowsCreateStringReference(input_string, 6, &header, &str) == S_OK, "Failed to create string ref\n"); -+ ok(pWindowsSubstring(str, 2, &substr) == S_OK, "Failed to create substring of string ref!\n"); -+ check_string(substr, output_substring, 4, FALSE); -+ ok(pWindowsDeleteString(substr) == S_OK, "Failed to delete string\n"); -+ ok(pWindowsDeleteString(str) == S_OK, "Failed to delete string ref\n"); -+ -+ /* Test duplication of string reference using substring */ -+ ok(pWindowsCreateStringReference(input_string, 6, &header, &str) == S_OK, "Failed to create string ref\n"); -+ ok(pWindowsSubstring(str, 0, &substr) == S_OK, "Failed to create substring of string ref!\n"); -+ ok(str != substr, "Duplicated string ref didn't create new string\n"); -+ check_string(substr, input_string, 6, FALSE); -+ ok(pWindowsDeleteString(substr) == S_OK, "Failed to delete string\n"); -+ ok(pWindowsDeleteString(str) == S_OK, "Failed to delete string\n"); -+ -+ /* Test get Substring of empty string */ -+ ok(pWindowsSubstring(NULL, 0, &substr) == S_OK, "Failed to duplicate NULL string\n"); -+ ok(substr == NULL, "Substring created new string\n"); -+ -+ /* Test get empty Substring of string */ -+ ok(pWindowsCreateString(input_string, 6, &str) == S_OK, "Failed to create string\n"); -+ ok(pWindowsSubstring(str, 6, &substr) == S_OK, "Failed to create substring!\n"); -+ ok(substr == NULL, "Substring created new string\n"); -+ ok(pWindowsDeleteString(str) == S_OK, "Failed to delete string\n"); -+ -+ /* Test handling of using to high startIndex */ -+ ok(pWindowsCreateString(input_string, 6, &str) == S_OK, "Failed to create string\n"); -+ ok(pWindowsSubstring(str, 7, &substr) == E_BOUNDS, "Incorrect error handling\n"); -+ ok(pWindowsDeleteString(str) == S_OK, "Failed to delete string\n"); -+ -+ /* Test handling of a NULL string */ -+ ok(pWindowsCreateString(input_string, 6, &str) == S_OK, "Failed to create string\n"); -+ ok(pWindowsSubstring(str, 7, NULL) == E_INVALIDARG, "Incorrect error handling\n"); -+ ok(pWindowsDeleteString(str) == S_OK, "Failed to delete string\n"); -+} -+ - START_TEST(string) - { - if (!init_functions()) -@@ -244,4 +303,5 @@ START_TEST(string) - test_duplicate(); - test_access(); - test_string_buffer(); -+ test_substring(); - } -diff --git a/include/winerror.h b/include/winerror.h -index 2958cbd..9b9fb72 100644 ---- a/include/winerror.h -+++ b/include/winerror.h -@@ -2090,6 +2090,7 @@ static inline HRESULT HRESULT_FROM_WIN32(unsigned int x) - #define S_FALSE _HRESULT_TYPEDEF_(1) - - #define E_PENDING _HRESULT_TYPEDEF_(0x8000000A) -+#define E_BOUNDS _HRESULT_TYPEDEF_(0x8000000B) - - - #define E_NOTIMPL _HRESULT_TYPEDEF_(0x80004001) --- -2.3.2 - diff --git a/patches/combase-String/definition b/patches/combase-String/definition deleted file mode 100644 index 13a262b8..00000000 --- a/patches/combase-String/definition +++ /dev/null @@ -1,2 +0,0 @@ -Fixes: Implement combase.WindowsSubstring function -Category: stable diff --git a/patches/dxva2-Video_Decoder/0007-dxva2-Initial-implementation-of-MPEG2-decoder-using-.patch b/patches/dxva2-Video_Decoder/0007-dxva2-Initial-implementation-of-MPEG2-decoder-using-.patch index 0eaa563b..0b7aec3d 100644 --- a/patches/dxva2-Video_Decoder/0007-dxva2-Initial-implementation-of-MPEG2-decoder-using-.patch +++ b/patches/dxva2-Video_Decoder/0007-dxva2-Initial-implementation-of-MPEG2-decoder-using-.patch @@ -1,11 +1,11 @@ -From 6564e70be47d7eede39141f62290577272588655 Mon Sep 17 00:00:00 2001 +From aff30eb5ce44d1f62c9c0a1419a89ba076dd93b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Sun, 22 Feb 2015 01:25:20 +0100 Subject: dxva2: Initial implementation of MPEG2 decoder using vaapi backend. --- configure.ac | 16 + - dlls/dxva2/Makefile.in | 12 +- + dlls/dxva2/Makefile.in | 14 +- dlls/dxva2/backend.idl | 94 ++++++ dlls/dxva2/dxva2_private.h | 115 ++++++- dlls/dxva2/genericdecoder.c | 432 +++++++++++++++++++++++++ @@ -14,14 +14,14 @@ Subject: dxva2: Initial implementation of MPEG2 decoder using vaapi backend. dlls/dxva2/vaapi-mpeg2.c | 753 +++++++++++++++++++++++++++++++++++++++++++ dlls/dxva2/vaapi.c | 767 ++++++++++++++++++++++++++++++++++++++++++++ dlls/dxva2/videoservices.c | 74 ++--- - 10 files changed, 2290 insertions(+), 66 deletions(-) + 10 files changed, 2291 insertions(+), 67 deletions(-) create mode 100644 dlls/dxva2/backend.idl create mode 100644 dlls/dxva2/genericdecoder.c create mode 100644 dlls/dxva2/vaapi-mpeg2.c create mode 100644 dlls/dxva2/vaapi.c diff --git a/configure.ac b/configure.ac -index 22b46ae..db872d8 100644 +index fbcd3fb..324deba 100644 --- a/configure.ac +++ b/configure.ac @@ -99,6 +99,8 @@ AC_ARG_WITH(xxf86vm, AS_HELP_STRING([--without-xxf86vm],[do not use XFree vide @@ -33,7 +33,7 @@ index 22b46ae..db872d8 100644 AC_ARG_WITH(wine-tools,AS_HELP_STRING([--with-wine-tools=DIR],[use Wine tools from directory DIR])) AC_ARG_WITH(wine64, AS_HELP_STRING([--with-wine64=DIR],[use the 64-bit Wine in DIR for a Wow64 build])) -@@ -1261,6 +1263,20 @@ This probably prevents linking to OpenGL. Try deleting the file and restarting c +@@ -1265,6 +1267,20 @@ This probably prevents linking to OpenGL. Try deleting the file and restarting c WINE_WARNING_WITH(opengl,[test -n "$opengl_msg"],[$opengl_msg OpenGL and Direct3D won't be supported.]) @@ -55,7 +55,7 @@ index 22b46ae..db872d8 100644 else X_CFLAGS="" diff --git a/dlls/dxva2/Makefile.in b/dlls/dxva2/Makefile.in -index 4af9dc0..808173c 100644 +index 4af9dc0..afdefc3 100644 --- a/dlls/dxva2/Makefile.in +++ b/dlls/dxva2/Makefile.in @@ -1,8 +1,14 @@ @@ -67,15 +67,16 @@ index 4af9dc0..808173c 100644 + backend.idl C_SRCS = \ -+ devicemanager.c \ +- main.c \ +- videoservices.c \ + devicemanager.c \ +- softwareprocessor.c + genericdecoder.c \ - main.c \ ++ main.c \ + softwareprocessor.c \ + vaapi.c \ + vaapi-mpeg2.c \ - videoservices.c \ -- devicemanager.c \ -- softwareprocessor.c ++ videoservices.c diff --git a/dlls/dxva2/backend.idl b/dlls/dxva2/backend.idl new file mode 100644 index 0000000..dd37695 @@ -2632,5 +2633,5 @@ index 46e431a..84222dc 100644 return E_NOINTERFACE; } -- -2.3.0 +2.6.1 diff --git a/patches/dxva2-Video_Decoder/0008-dxva2-Implement-h264-decoder.patch b/patches/dxva2-Video_Decoder/0008-dxva2-Implement-h264-decoder.patch index d38ea34f..a3fa81c0 100644 --- a/patches/dxva2-Video_Decoder/0008-dxva2-Implement-h264-decoder.patch +++ b/patches/dxva2-Video_Decoder/0008-dxva2-Implement-h264-decoder.patch @@ -1,4 +1,4 @@ -From b4de3e81cdf0ba928d75455c871742d86920de13 Mon Sep 17 00:00:00 2001 +From 4ec62ff378a4051c25875bf620fa74170202256e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Sun, 22 Feb 2015 01:43:36 +0100 Subject: dxva2: Implement h264 decoder. @@ -12,7 +12,7 @@ Subject: dxva2: Implement h264 decoder. create mode 100644 dlls/dxva2/vaapi-h264.c diff --git a/dlls/dxva2/Makefile.in b/dlls/dxva2/Makefile.in -index 808173c..69ce4c8 100644 +index afdefc3..e527e96 100644 --- a/dlls/dxva2/Makefile.in +++ b/dlls/dxva2/Makefile.in @@ -10,5 +10,6 @@ C_SRCS = \ @@ -21,7 +21,7 @@ index 808173c..69ce4c8 100644 vaapi.c \ + vaapi-h264.c \ vaapi-mpeg2.c \ - videoservices.c \ + videoservices.c diff --git a/dlls/dxva2/dxva2_private.h b/dlls/dxva2/dxva2_private.h index f518637..5df59bd 100644 --- a/dlls/dxva2/dxva2_private.h @@ -37,7 +37,7 @@ index f518637..5df59bd 100644 #endif /* HAVE_VAAPI */ diff --git a/dlls/dxva2/vaapi-h264.c b/dlls/dxva2/vaapi-h264.c new file mode 100644 -index 0000000..1a5817e +index 0000000..08b6aed --- /dev/null +++ b/dlls/dxva2/vaapi-h264.c @@ -0,0 +1,890 @@ @@ -932,7 +932,7 @@ index 0000000..1a5817e + +#endif /* HAVE_VAAPI */ diff --git a/dlls/dxva2/vaapi.c b/dlls/dxva2/vaapi.c -index 3369a03..404f1ab 100644 +index 80e63bf..4c570f5 100644 --- a/dlls/dxva2/vaapi.c +++ b/dlls/dxva2/vaapi.c @@ -655,6 +655,8 @@ static HRESULT WINAPI WineVideoService_CreateVideoDecoder( IWineVideoService *if @@ -945,5 +945,5 @@ index 3369a03..404f1ab 100644 return E_FAIL; } -- -2.1.0 +2.6.1 diff --git a/patches/ntdll-Wait_User_APC/0001-kernel32-tests-Add-test-to-show-that-multiple-user-A.patch b/patches/ntdll-Wait_User_APC/0001-kernel32-tests-Add-test-to-show-that-multiple-user-A.patch deleted file mode 100644 index 7ddf5221..00000000 --- a/patches/ntdll-Wait_User_APC/0001-kernel32-tests-Add-test-to-show-that-multiple-user-A.patch +++ /dev/null @@ -1,70 +0,0 @@ -From 7284f98729206e3d28732a7640f53fe75fe17c5c Mon Sep 17 00:00:00 2001 -From: Sebastian Lackner -Date: Fri, 9 Oct 2015 20:51:23 +0200 -Subject: kernel32/tests: Add test to show that multiple user APCs are - processed at once. - ---- - dlls/kernel32/tests/sync.c | 27 ++++++++++++++++++++++++++- - 1 file changed, 26 insertions(+), 1 deletion(-) - -diff --git a/dlls/kernel32/tests/sync.c b/dlls/kernel32/tests/sync.c -index e842bf3..173793c 100644 ---- a/dlls/kernel32/tests/sync.c -+++ b/dlls/kernel32/tests/sync.c -@@ -2333,6 +2333,13 @@ static DWORD WINAPI alertable_wait_thread(void *param) - todo_wine - ok(status == STATUS_WAIT_0, "expected STATUS_WAIT_0, got %08x\n", status); - -+ ReleaseSemaphore(semaphores[0], 1, NULL); -+ timeout.QuadPart = -10000000; -+ status = pNtWaitForMultipleObjects(1, &semaphores[1], FALSE, TRUE, &timeout); -+ ok(status == STATUS_USER_APC, "expected STATUS_USER_APC, got %08x\n", status); -+ result = WaitForSingleObject(semaphores[0], 0); -+ ok(result == WAIT_TIMEOUT, "expected WAIT_TIMEOUT, got %u\n", result); -+ - return 0; - } - -@@ -2342,12 +2349,21 @@ static void CALLBACK alertable_wait_apc(ULONG_PTR userdata) - ReleaseSemaphore(semaphores[1], 1, NULL); - } - -+static void CALLBACK alertable_wait_apc2(ULONG_PTR userdata) -+{ -+ HANDLE *semaphores = (void *)userdata; -+ DWORD result; -+ -+ result = WaitForSingleObject(semaphores[0], 1000); -+ ok(result == WAIT_OBJECT_0, "expected WAIT_OBJECT_0, got %u\n", result); -+} -+ - static void test_alertable_wait(void) - { - HANDLE thread, semaphores[2]; - DWORD result; - -- semaphores[0] = CreateSemaphoreW(NULL, 0, 1, NULL); -+ semaphores[0] = CreateSemaphoreW(NULL, 0, 2, NULL); - ok(semaphores[0] != NULL, "CreateSemaphore failed with %u\n", GetLastError()); - semaphores[1] = CreateSemaphoreW(NULL, 0, 1, NULL); - ok(semaphores[1] != NULL, "CreateSemaphore failed with %u\n", GetLastError()); -@@ -2366,6 +2382,15 @@ static void test_alertable_wait(void) - result = QueueUserAPC(alertable_wait_apc, thread, (ULONG_PTR)semaphores); - ok(result != 0, "QueueUserAPC failed with %u\n", GetLastError()); - -+ result = WaitForSingleObject(semaphores[0], 1000); -+ ok(result == WAIT_OBJECT_0, "expected WAIT_OBJECT_0, got %u\n", result); -+ Sleep(100); /* ensure the thread is blocking in NtWaitForMultipleObjects */ -+ result = QueueUserAPC(alertable_wait_apc2, thread, (ULONG_PTR)semaphores); -+ ok(result != 0, "QueueUserAPC failed with %u\n", GetLastError()); -+ result = QueueUserAPC(alertable_wait_apc2, thread, (ULONG_PTR)semaphores); -+ ok(result != 0, "QueueUserAPC failed with %u\n", GetLastError()); -+ ReleaseSemaphore(semaphores[0], 2, NULL); -+ - result = WaitForSingleObject(thread, 1000); - ok(result == WAIT_OBJECT_0, "expected WAIT_OBJECT_0, got %u\n", result); - CloseHandle(thread); --- -2.6.0 - diff --git a/patches/ntdll-Wait_User_APC/0003-ntdll-Block-signals-while-executing-system-APCs.patch b/patches/ntdll-Wait_User_APC/0001-ntdll-Block-signals-while-executing-system-APCs.patch similarity index 94% rename from patches/ntdll-Wait_User_APC/0003-ntdll-Block-signals-while-executing-system-APCs.patch rename to patches/ntdll-Wait_User_APC/0001-ntdll-Block-signals-while-executing-system-APCs.patch index 41153ea2..08f3a837 100644 --- a/patches/ntdll-Wait_User_APC/0003-ntdll-Block-signals-while-executing-system-APCs.patch +++ b/patches/ntdll-Wait_User_APC/0001-ntdll-Block-signals-while-executing-system-APCs.patch @@ -1,4 +1,4 @@ -From 39f5ce02a6524f23dbc4d8ea6dc602e9e47e15c6 Mon Sep 17 00:00:00 2001 +From 67ccfc9b0fe9549fb20f2b752d98dd51baa08b8e Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Wed, 21 Oct 2015 18:53:58 +0200 Subject: ntdll: Block signals while executing system APCs. @@ -8,7 +8,7 @@ Subject: ntdll: Block signals while executing system APCs. 1 file changed, 40 insertions(+), 8 deletions(-) diff --git a/dlls/ntdll/server.c b/dlls/ntdll/server.c -index 7d8d1e9..1173f4d 100644 +index f6457db..0e97290 100644 --- a/dlls/ntdll/server.c +++ b/dlls/ntdll/server.c @@ -371,13 +371,30 @@ static int wait_select_reply( void *cookie ) @@ -107,8 +107,8 @@ index 7d8d1e9..1173f4d 100644 + invoke_apc( &call, &result ); + pthread_sigmask( SIG_BLOCK, &server_block_set, &old_set ); + - /* if we ran a user apc, we have to check once more if - * additional apcs are queued, but we don't want to wait */ + /* if we ran a user apc we have to check once more if additional apcs are queued, + * but we don't want to wait */ abs_timeout = 0; @@ -625,6 +656,7 @@ unsigned int server_select( const select_op_t *select_op, data_size_t size, UINT if (size >= sizeof(select_op->signal_and_wait) && select_op->op == SELECT_SIGNAL_AND_WAIT) diff --git a/patches/ntdll-Wait_User_APC/0002-ntdll-Do-not-check-if-object-was-signaled-after-user.patch b/patches/ntdll-Wait_User_APC/0002-ntdll-Do-not-check-if-object-was-signaled-after-user.patch deleted file mode 100644 index 6373fba6..00000000 --- a/patches/ntdll-Wait_User_APC/0002-ntdll-Do-not-check-if-object-was-signaled-after-user.patch +++ /dev/null @@ -1,57 +0,0 @@ -From e87ab2e2a235d7f70aa414bb7f103f9ecb214cec Mon Sep 17 00:00:00 2001 -From: Sebastian Lackner -Date: Fri, 9 Oct 2015 21:12:59 +0200 -Subject: ntdll: Do not check if object was signaled after user APC in - server_select. - ---- - dlls/kernel32/tests/sync.c | 4 ---- - dlls/ntdll/server.c | 5 +++-- - 2 files changed, 3 insertions(+), 6 deletions(-) - -diff --git a/dlls/kernel32/tests/sync.c b/dlls/kernel32/tests/sync.c -index 173793c..1065d5e 100644 ---- a/dlls/kernel32/tests/sync.c -+++ b/dlls/kernel32/tests/sync.c -@@ -2317,20 +2317,16 @@ static DWORD WINAPI alertable_wait_thread(void *param) - - ReleaseSemaphore(semaphores[0], 1, NULL); - result = WaitForMultipleObjectsEx(1, &semaphores[1], TRUE, 1000, TRUE); -- todo_wine - ok(result == WAIT_IO_COMPLETION, "expected WAIT_IO_COMPLETION, got %u\n", result); - result = WaitForMultipleObjectsEx(1, &semaphores[1], TRUE, 200, TRUE); -- todo_wine - ok(result == WAIT_OBJECT_0, "expected WAIT_OBJECT_0, got %u\n", result); - - ReleaseSemaphore(semaphores[0], 1, NULL); - timeout.QuadPart = -10000000; - status = pNtWaitForMultipleObjects(1, &semaphores[1], FALSE, TRUE, &timeout); -- todo_wine - ok(status == STATUS_USER_APC, "expected STATUS_USER_APC, got %08x\n", status); - timeout.QuadPart = -2000000; - status = pNtWaitForMultipleObjects(1, &semaphores[1], FALSE, TRUE, &timeout); -- todo_wine - ok(status == STATUS_WAIT_0, "expected STATUS_WAIT_0, got %08x\n", status); - - ReleaseSemaphore(semaphores[0], 1, NULL); -diff --git a/dlls/ntdll/server.c b/dlls/ntdll/server.c -index 95111ad..7d8d1e9 100644 ---- a/dlls/ntdll/server.c -+++ b/dlls/ntdll/server.c -@@ -614,10 +614,11 @@ unsigned int server_select( const select_op_t *select_op, data_size_t size, UINT - if (ret != STATUS_USER_APC) break; - if (invoke_apc( &call, &result )) - { -- /* if we ran a user apc we have to check once more if an object got signaled, -- * but we don't want to wait */ -+ /* if we ran a user apc, we have to check once more if -+ * additional apcs are queued, but we don't want to wait */ - abs_timeout = 0; - user_apc = TRUE; -+ size = 0; - } - - /* don't signal multiple times */ --- -2.6.0 - diff --git a/patches/ntdll-Wait_User_APC/definition b/patches/ntdll-Wait_User_APC/definition index ea1520a8..34e24838 100644 --- a/patches/ntdll-Wait_User_APC/definition +++ b/patches/ntdll-Wait_User_APC/definition @@ -1,2 +1 @@ -Fixes: Do not check if object was signaled after user APC in server_select Fixes: [14697] Do not allow interruption of system APC in server_select diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index feef6338..5f10887c 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -52,7 +52,7 @@ usage() # Get the upstream commit sha upstream_commit() { - echo "4fb840b614691a787c76659f02c163d922f88fba" + echo "f8d78b0d927c1cae4c5075c64d980c306fb3ed87" } # Show version information @@ -92,7 +92,6 @@ patch_enable_all () enable_api_ms_win_crt_Stub_DLLs="$1" enable_authz_Stub_Functions="$1" enable_browseui_Progress_Dialog="$1" - enable_combase_String="$1" enable_comctl32_Button_Theming="$1" enable_comctl32_PROPSHEET_InsertPage="$1" enable_comctl32_TVM_GETITEM="$1" @@ -372,9 +371,6 @@ patch_enable () category-stable) enable_category_stable="$2" ;; - combase-String) - enable_combase_String="$2" - ;; comctl32-Button_Theming) enable_comctl32_Button_Theming="$2" ;; @@ -1439,9 +1435,6 @@ if test "$enable_category_stable" -eq 1; then if test "$enable_Staging" -gt 1; then abort "Patchset Staging disabled, but category-stable depends on that." fi - if test "$enable_combase_String" -gt 1; then - abort "Patchset combase-String disabled, but category-stable depends on that." - fi if test "$enable_configure_Absolute_RPATH" -gt 1; then abort "Patchset configure-Absolute_RPATH disabled, but category-stable depends on that." fi @@ -1651,7 +1644,6 @@ if test "$enable_category_stable" -eq 1; then fi enable_Compiler_Warnings=1 enable_Staging=1 - enable_combase_String=1 enable_configure_Absolute_RPATH=1 enable_d3d9_Skip_Tests=1 enable_d3d9_Surface_Refcount=1 @@ -2330,19 +2322,6 @@ if test "$enable_browseui_Progress_Dialog" -eq 1; then ) >> "$patchlist" fi -# Patchset combase-String -# | -# | Modified files: -# | * dlls/api-ms-win-core-winrt-string-l1-1-0/api-ms-win-core-winrt-string-l1-1-0.spec, dlls/combase/combase.spec, -# | dlls/combase/string.c, dlls/combase/tests/string.c, include/winerror.h -# | -if test "$enable_combase_String" -eq 1; then - patch_apply combase-String/0001-combase-implement-WindowsSubstring-try-2.patch - ( - echo '+ { "Thomas Pointhuber", "combase: implement WindowsSubstring.", 2 },'; - ) >> "$patchlist" -fi - # Patchset comctl32-Button_Theming # | # | This patchset fixes the following Wine bugs: @@ -4362,15 +4341,11 @@ fi # | * [#14697] Do not allow interruption of system APC in server_select # | # | Modified files: -# | * dlls/kernel32/tests/sync.c, dlls/ntdll/server.c +# | * dlls/ntdll/server.c # | if test "$enable_ntdll_Wait_User_APC" -eq 1; then - patch_apply ntdll-Wait_User_APC/0001-kernel32-tests-Add-test-to-show-that-multiple-user-A.patch - patch_apply ntdll-Wait_User_APC/0002-ntdll-Do-not-check-if-object-was-signaled-after-user.patch - patch_apply ntdll-Wait_User_APC/0003-ntdll-Block-signals-while-executing-system-APCs.patch + patch_apply ntdll-Wait_User_APC/0001-ntdll-Block-signals-while-executing-system-APCs.patch ( - echo '+ { "Sebastian Lackner", "kernel32/tests: Add test to show that multiple user APCs are processed at once.", 1 },'; - echo '+ { "Sebastian Lackner", "ntdll: Do not check if object was signaled after user APC in server_select.", 1 },'; echo '+ { "Sebastian Lackner", "ntdll: Block signals while executing system APCs.", 1 },'; ) >> "$patchlist" fi diff --git a/patches/wined3d-CSMT_Main/0031-wined3d-Use-resource-facilities-to-destroy-PBOs.patch b/patches/wined3d-CSMT_Main/0031-wined3d-Use-resource-facilities-to-destroy-PBOs.patch index 63e1b944..dc6616e3 100644 --- a/patches/wined3d-CSMT_Main/0031-wined3d-Use-resource-facilities-to-destroy-PBOs.patch +++ b/patches/wined3d-CSMT_Main/0031-wined3d-Use-resource-facilities-to-destroy-PBOs.patch @@ -1,4 +1,4 @@ -From a0d7057a64862170f97d4c99d15d58323681efe4 Mon Sep 17 00:00:00 2001 +From 42b6ba4bb832d0191cda985e2701c61626c103b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20D=C3=B6singer?= Date: Tue, 21 Jan 2014 16:49:21 +0100 Subject: wined3d: Use resource facilities to destroy PBOs. @@ -10,10 +10,10 @@ Subject: wined3d: Use resource facilities to destroy PBOs. 3 files changed, 4 insertions(+), 16 deletions(-) diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c -index c6b3945..9783b78 100644 +index 882491c..e10ba41 100644 --- a/dlls/wined3d/resource.c +++ b/dlls/wined3d/resource.c -@@ -142,7 +142,7 @@ HRESULT resource_init(struct wined3d_resource *resource, struct wined3d_device * +@@ -223,7 +223,7 @@ HRESULT resource_init(struct wined3d_resource *resource, struct wined3d_device * return WINED3D_OK; } @@ -23,11 +23,11 @@ index c6b3945..9783b78 100644 struct wined3d_context *context = context_acquire(resource->device, NULL); const struct wined3d_gl_info *gl_info = context->gl_info; diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c -index e5edd34..b197655 100644 +index 273da13..8ae36af 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c -@@ -1029,16 +1029,6 @@ HRESULT CDECL wined3d_surface_get_render_target_data(struct wined3d_surface *sur - return wined3d_surface_blt(surface, NULL, render_target, NULL, 0, NULL, WINED3D_TEXF_POINT); +@@ -958,16 +958,6 @@ static HRESULT wined3d_surface_depth_blt(struct wined3d_surface *src_surface, DW + return WINED3D_OK; } -/* Context activation is done by the caller. */ @@ -43,7 +43,7 @@ index e5edd34..b197655 100644 static ULONG surface_resource_incref(struct wined3d_resource *resource) { return wined3d_surface_incref(surface_from_resource(resource)); -@@ -1084,10 +1074,6 @@ static void surface_unload(struct wined3d_resource *resource) +@@ -1013,10 +1003,6 @@ static void surface_unload(struct wined3d_resource *resource) wined3d_resource_invalidate_location(&surface->resource, ~surface->resource.map_binding); } @@ -54,7 +54,7 @@ index e5edd34..b197655 100644 /* Destroy fbo render buffers. This is needed for implicit render targets, for * all application-created targets the application has to release the surface * before calling _Reset -@@ -4225,7 +4211,8 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface, +@@ -3949,7 +3935,8 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface, wined3d_resource_prepare_map_memory(&surface->resource, context); wined3d_resource_load_location(&surface->resource, context, surface->resource.map_binding); @@ -65,10 +65,10 @@ index e5edd34..b197655 100644 wined3d_resource_get_memory(&surface->resource, surface->resource.locations, &data); diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h -index beaf9bc..5e6d5d3 100644 +index 4fd8b62..50fc36b 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h -@@ -2126,6 +2126,7 @@ DWORD wined3d_resource_access_from_location(DWORD location) DECLSPEC_HIDDEN; +@@ -2216,6 +2216,7 @@ DWORD wined3d_resource_access_from_location(DWORD location) DECLSPEC_HIDDEN; BOOL wined3d_resource_allocate_sysmem(struct wined3d_resource *resource) DECLSPEC_HIDDEN; BOOL wined3d_resource_check_block_align(const struct wined3d_resource *resource, const struct wined3d_box *box) DECLSPEC_HIDDEN; @@ -77,5 +77,5 @@ index beaf9bc..5e6d5d3 100644 BYTE *wined3d_resource_get_map_ptr(const struct wined3d_resource *resource, const struct wined3d_context *context, DWORD flags) DECLSPEC_HIDDEN; -- -2.2.1 +2.6.1 diff --git a/patches/wined3d-CSMT_Main/9999-IfDefined.patch b/patches/wined3d-CSMT_Main/9999-IfDefined.patch index dd6a1df6..a19d4fef 100644 --- a/patches/wined3d-CSMT_Main/9999-IfDefined.patch +++ b/patches/wined3d-CSMT_Main/9999-IfDefined.patch @@ -433,7 +433,7 @@ diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c diff --git a/dlls/d3d8/tests/visual.c b/dlls/d3d8/tests/visual.c --- a/dlls/d3d8/tests/visual.c +++ b/dlls/d3d8/tests/visual.c -@@ -5475,7 +5475,11 @@ +@@ -5480,7 +5480,11 @@ fill_surface(surface_managed, 0x0000ff00, D3DLOCK_NO_DIRTY_UPDATE); add_dirty_rect_test_draw(device); color = getPixelColor(device, 320, 240); @@ -1675,7 +1675,7 @@ diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c --- a/dlls/d3d9/tests/visual.c +++ b/dlls/d3d9/tests/visual.c -@@ -1195,7 +1195,11 @@ +@@ -1200,7 +1200,11 @@ * result on Wine. * {D3DFMT_YUY2, "D3DFMT_YUY2", BLOCKS, 0}, * {D3DFMT_UYVY, "D3DFMT_UYVY", BLOCKS, 0}, */ @@ -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. */ -@@ -17372,7 +17376,11 @@ +@@ -17377,7 +17381,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) -@@ -419,10 +434,16 @@ +@@ -422,10 +437,16 @@ if (!refcount) { @@ -6051,7 +6051,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c } return refcount; -@@ -494,8 +515,15 @@ +@@ -497,8 +518,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) -@@ -524,6 +552,7 @@ +@@ -527,6 +555,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; -@@ -531,6 +560,7 @@ +@@ -534,6 +563,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; -@@ -649,10 +679,14 @@ +@@ -652,10 +682,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; -@@ -787,11 +821,19 @@ +@@ -790,11 +824,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) -@@ -803,12 +845,25 @@ +@@ -806,12 +848,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, -@@ -887,6 +942,7 @@ +@@ -890,6 +945,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) { -@@ -895,12 +951,26 @@ +@@ -898,12 +954,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; -@@ -983,6 +1053,7 @@ +@@ -986,6 +1056,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"); -@@ -1002,6 +1073,13 @@ +@@ -1005,6 +1076,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, -@@ -1018,7 +1096,9 @@ +@@ -1021,7 +1099,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; } -@@ -1028,6 +1108,7 @@ +@@ -1031,6 +1111,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; } -@@ -1036,6 +1117,14 @@ +@@ -1039,6 +1120,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; } } -@@ -1056,7 +1145,9 @@ +@@ -1059,7 +1148,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; } } -@@ -1066,7 +1157,9 @@ +@@ -1069,7 +1160,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; } -@@ -1129,7 +1222,9 @@ +@@ -1132,7 +1225,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; } -@@ -1160,7 +1255,9 @@ +@@ -1163,7 +1258,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; } } -@@ -1173,6 +1270,7 @@ +@@ -1176,6 +1273,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; } -@@ -1181,6 +1279,14 @@ +@@ -1184,6 +1282,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; } } -@@ -1189,7 +1295,9 @@ +@@ -1192,7 +1298,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; } -@@ -1275,12 +1383,25 @@ +@@ -1278,12 +1386,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, -@@ -1290,7 +1411,11 @@ +@@ -1293,7 +1414,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); -@@ -1315,7 +1440,11 @@ +@@ -1318,7 +1443,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); -@@ -1375,6 +1504,7 @@ +@@ -1378,6 +1507,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; } -@@ -1383,6 +1513,14 @@ +@@ -1386,6 +1516,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; } -@@ -1392,6 +1530,7 @@ +@@ -1395,6 +1533,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; } -@@ -1400,6 +1539,14 @@ +@@ -1403,6 +1542,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; } } -@@ -1427,7 +1574,9 @@ +@@ -1430,7 +1577,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; } } -@@ -1437,7 +1586,9 @@ +@@ -1440,7 +1589,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; } -@@ -1538,6 +1689,9 @@ +@@ -1541,6 +1692,9 @@ if (FAILED(hr)) { WARN("Failed to initialize texture, returning %#x.\n", hr); @@ -6837,8 +6837,8 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c if (src_location == WINED3D_LOCATION_DRAWABLE) required_rt = src_surface; else if (dst_location == WINED3D_LOCATION_DRAWABLE) required_rt = dst_surface; -@@ -964,6 +1222,18 @@ - return wined3d_surface_blt(surface, NULL, render_target, NULL, 0, NULL, WINED3D_TEXF_POINT); +@@ -951,6 +1209,18 @@ + return WINED3D_OK; } +#if !defined(STAGING_CSMT) @@ -6856,7 +6856,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c static ULONG surface_resource_incref(struct wined3d_resource *resource) { return wined3d_surface_incref(surface_from_resource(resource)); -@@ -989,12 +1259,28 @@ +@@ -976,12 +1246,28 @@ if (resource->pool == WINED3D_POOL_DEFAULT) { @@ -6885,7 +6885,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c /* We also get here when the ddraw swapchain is destroyed, for example * for a mode switch. In this case this surface won't necessarily be -@@ -1004,10 +1290,21 @@ +@@ -991,10 +1277,21 @@ } else { @@ -6907,7 +6907,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c /* Destroy fbo render buffers. This is needed for implicit render targets, for * all application-created targets the application has to release the surface -@@ -1038,6 +1335,7 @@ +@@ -1025,6 +1322,7 @@ resource_unload(resource); } @@ -6915,7 +6915,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c static void wined3d_surface_location_invalidated(struct wined3d_resource *resource, DWORD location) { struct wined3d_surface *surface = surface_from_resource(resource); -@@ -1053,6 +1351,19 @@ +@@ -1040,6 +1338,19 @@ { surface_private_setup, surface_frontbuffer_updated, @@ -6935,7 +6935,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c }; /***************************************************************************** -@@ -1096,6 +1407,7 @@ +@@ -1083,6 +1394,7 @@ return WINED3D_OK; } @@ -6943,7 +6943,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c static void gdi_surface_frontbuffer_updated(struct wined3d_surface *surface) { x11_copy_to_screen(surface->container->swapchain, &surface->lockedRect); -@@ -1105,6 +1417,23 @@ +@@ -1092,6 +1404,23 @@ { gdi_surface_private_setup, gdi_surface_frontbuffer_updated, @@ -6967,7 +6967,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c }; /* This call just downloads data, the caller is responsible for binding the -@@ -1123,7 +1452,11 @@ +@@ -1110,7 +1439,11 @@ return; } @@ -6979,7 +6979,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c if (surface->container->resource.format_flags & WINED3DFMT_FLAG_COMPRESSED) { -@@ -1151,6 +1484,7 @@ +@@ -1138,6 +1471,7 @@ void *mem; GLenum gl_format = format->glFormat; GLenum gl_type = format->glType; @@ -6987,7 +6987,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c UINT src_pitch = 0; UINT dst_row_pitch, dst_slice_pitch; -@@ -1159,6 +1493,16 @@ +@@ -1146,6 +1480,16 @@ unsigned char alignment = surface->resource.device->surface_alignment; src_pitch = format->byte_count * surface->pow2Width; wined3d_resource_get_pitch(&surface->resource, &dst_row_pitch, &dst_slice_pitch); @@ -7004,7 +7004,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c src_pitch = (src_pitch + alignment - 1) & ~(alignment - 1); mem = HeapAlloc(GetProcessHeap(), 0, src_pitch * surface->pow2Height); } -@@ -1245,12 +1589,21 @@ +@@ -1232,12 +1576,21 @@ * won't be released, and doesn't have to be re-read. */ src_data = mem; dst_data = data.addr; @@ -7026,7 +7026,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c } HeapFree(GetProcessHeap(), 0, mem); -@@ -1374,10 +1727,33 @@ +@@ -1361,10 +1714,33 @@ static BOOL surface_check_block_align(struct wined3d_surface *surface, const struct wined3d_box *box) { @@ -7060,7 +7060,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c { struct wined3d_box box = {rect->left, rect->top, rect->right, rect->bottom, 0, 1}; -@@ -1396,7 +1772,11 @@ +@@ -1383,7 +1759,11 @@ UINT update_w, update_h; UINT dst_w, dst_h; RECT r, dst_rect; @@ -7072,7 +7072,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c POINT p; TRACE("dst_surface %p, dst_point %s, src_surface %p, src_rect %s.\n", -@@ -1467,11 +1847,17 @@ +@@ -1454,11 +1834,17 @@ return WINED3DERR_INVALIDCALL; } @@ -7090,7 +7090,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c context = context_acquire(dst_surface->resource.device, NULL); gl_info = context->gl_info; -@@ -1482,6 +1868,7 @@ +@@ -1469,6 +1855,7 @@ if (update_w == dst_w && update_h == dst_h) wined3d_texture_prepare_texture(dst_surface->container, context, FALSE); else @@ -7098,7 +7098,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c wined3d_resource_load_location(&dst_surface->resource, context, WINED3D_LOCATION_TEXTURE_RGB); wined3d_texture_bind_and_dirtify(dst_surface->container, context, FALSE); -@@ -1495,6 +1882,21 @@ +@@ -1482,6 +1869,21 @@ wined3d_resource_validate_location(&dst_surface->resource, WINED3D_LOCATION_TEXTURE_RGB); wined3d_resource_invalidate_location(&dst_surface->resource, ~WINED3D_LOCATION_TEXTURE_RGB); @@ -7120,7 +7120,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c return WINED3D_OK; } -@@ -1608,6 +2010,7 @@ +@@ -1595,6 +1997,7 @@ if (surface->resource.pool == WINED3D_POOL_SCRATCH) ERR("Not supported on scratch surfaces.\n"); @@ -7128,7 +7128,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c if (surface->resource.locations & location) { TRACE("surface is already in texture\n"); -@@ -1616,6 +2019,16 @@ +@@ -1603,6 +2006,16 @@ TRACE("Reloading because surface is dirty.\n"); wined3d_resource_load_location(&surface->resource, context, location); @@ -7145,7 +7145,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c surface_evict_sysmem(surface); } -@@ -1698,6 +2111,7 @@ +@@ -1685,6 +2098,7 @@ void CDECL wined3d_surface_preload(struct wined3d_surface *surface) { @@ -7153,7 +7153,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c const struct wined3d_device *device = surface->resource.device; TRACE("surface %p.\n", surface); -@@ -1708,6 +2122,17 @@ +@@ -1695,6 +2109,17 @@ } wined3d_cs_emit_surface_preload(device->cs, surface); @@ -7171,7 +7171,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c } void * CDECL wined3d_surface_get_parent(const struct wined3d_surface *surface) -@@ -1742,10 +2167,28 @@ +@@ -1729,10 +2154,28 @@ DWORD CDECL wined3d_surface_get_pitch(const struct wined3d_surface *surface) { @@ -7200,7 +7200,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c } HRESULT CDECL wined3d_surface_set_overlay_position(struct wined3d_surface *surface, LONG x, LONG y) -@@ -1870,6 +2313,7 @@ +@@ -1857,6 +2300,7 @@ { DeleteDC(surface->hDC); DeleteObject(surface->dib.DIBsection); @@ -7208,7 +7208,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c surface->resource.bitmap_data = NULL; surface->flags &= ~SFLAG_DIBSECTION; create_dib = TRUE; -@@ -1878,6 +2322,15 @@ +@@ -1865,6 +2309,15 @@ surface->resource.locations = 0; wined3d_resource_free_sysmem(&surface->resource); surface->resource.map_heap_memory = NULL; @@ -7224,7 +7224,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c width = texture_resource->width; height = texture_resource->height; -@@ -1903,6 +2356,7 @@ +@@ -1890,6 +2343,7 @@ else surface->flags &= ~SFLAG_NONPOW2; @@ -7232,7 +7232,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c if ((surface->resource.user_memory = mem)) { surface->resource.map_binding = WINED3D_LOCATION_USER_MEMORY; -@@ -1923,6 +2377,27 @@ +@@ -1910,6 +2364,27 @@ surface->resource.size = wined3d_format_calculate_size(texture_resource->format, 1, width, height, 1); surface->resource.custom_row_pitch = wined3d_format_calculate_pitch(texture_resource->format, width); @@ -7260,7 +7260,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c } /* The format might be changed to a format that needs conversion. -@@ -1945,11 +2420,19 @@ +@@ -1932,11 +2407,19 @@ if (!valid_location) { @@ -7280,7 +7280,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c return WINED3D_OK; } -@@ -2308,6 +2791,7 @@ +@@ -2295,6 +2778,7 @@ static struct wined3d_texture *surface_convert_format(struct wined3d_surface *source, enum wined3d_format_id to_fmt) { @@ -7288,7 +7288,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c void *dst_data = NULL, *src_data = NULL; UINT src_row_pitch, src_slice_pitch, dst_row_pitch, dst_slice_pitch; const struct d3dfmt_converter_desc *conv; -@@ -2316,6 +2800,13 @@ +@@ -2303,6 +2787,13 @@ struct wined3d_surface *dst; struct wined3d_context *context = NULL; struct wined3d_device *device = source->resource.device; @@ -7302,7 +7302,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c conv = find_converter(source->resource.format->id, to_fmt); if (!conv) -@@ -2339,6 +2830,7 @@ +@@ -2326,6 +2817,7 @@ } dst = surface_from_resource(wined3d_texture_get_sub_resource(ret, 0)); @@ -7310,7 +7310,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c wined3d_resource_get_pitch(&source->resource, &src_row_pitch, &src_slice_pitch); wined3d_resource_get_pitch(&ret->resource, &dst_row_pitch, &dst_slice_pitch); -@@ -2379,6 +2871,32 @@ +@@ -2366,6 +2858,32 @@ if (context) context_release(context); return NULL; @@ -7343,7 +7343,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c } static HRESULT _Blt_ColorFill(BYTE *buf, unsigned int width, unsigned int height, -@@ -2446,6 +2964,7 @@ +@@ -2433,6 +2951,7 @@ HRESULT CDECL wined3d_surface_unmap(struct wined3d_surface *surface) { @@ -7351,7 +7351,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c HRESULT hr; TRACE("surface %p.\n", surface); -@@ -2456,6 +2975,20 @@ +@@ -2443,6 +2962,20 @@ memset(&surface->lockedRect, 0, sizeof(surface->lockedRect)); return hr; @@ -7372,7 +7372,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c } HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface, -@@ -2463,6 +2996,21 @@ +@@ -2450,6 +2983,21 @@ { const struct wined3d_format *format = surface->resource.format; unsigned int fmt_flags = surface->container->resource.format_flags; @@ -7394,7 +7394,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c if ((fmt_flags & WINED3DFMT_FLAG_BLOCKS) && box && !surface_check_block_align(surface, box)) -@@ -2474,6 +3022,13 @@ +@@ -2461,6 +3009,13 @@ return WINED3DERR_INVALIDCALL; } @@ -7408,7 +7408,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c /* Performance optimization: Count how often a surface is mapped, if it is * mapped regularly do not throw away the system memory copy. This avoids * the need to download the surface from OpenGL all the time. The surface -@@ -2489,6 +3044,7 @@ +@@ -2476,6 +3031,7 @@ } } @@ -7416,7 +7416,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c if (box) { surface->lockedRect.left = box->left; -@@ -2570,6 +3126,179 @@ +@@ -2557,6 +3113,179 @@ void wined3d_surface_releasedc_cs(struct wined3d_surface *surface) { if (surface->resource.map_binding == WINED3D_LOCATION_USER_MEMORY || (surface->container->flags & WINED3D_TEXTURE_PIN_SYSMEM @@ -7596,7 +7596,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c && surface->resource.map_binding != WINED3D_LOCATION_DIB)) { /* The game Salammbo modifies the surface contents without mapping the surface between -@@ -2585,6 +3314,7 @@ +@@ -2572,6 +3301,7 @@ if (device->d3d_initialized) context = context_acquire(device, NULL); @@ -7604,7 +7604,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c wined3d_resource_load_location(&surface->resource, context, surface->resource.map_binding); wined3d_resource_invalidate_location(&surface->resource, WINED3D_LOCATION_DIB); if (context) -@@ -2610,6 +3340,13 @@ +@@ -2597,6 +3327,13 @@ surface->flags &= ~SFLAG_DCINUSE; wined3d_cs_emit_releasedc(surface->resource.device->cs, surface); @@ -7618,7 +7618,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c return WINED3D_OK; } -@@ -2626,9 +3363,14 @@ +@@ -2613,9 +3350,14 @@ int i; BOOL srcIsUpsideDown; struct wined3d_bo_address data; @@ -7633,7 +7633,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c if (surface != old_ctx->current_rt) { -@@ -2668,8 +3410,13 @@ +@@ -2655,8 +3397,13 @@ } /* Setup pixel store pack state -- to glReadPixels into the correct place */ @@ -7647,7 +7647,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c checkGLcall("glPixelStorei"); gl_info->gl_ops.gl.p_glReadPixels(0, 0, -@@ -2686,6 +3433,10 @@ +@@ -2673,6 +3420,10 @@ { /* glReadPixels returns the image upside down, and there is no way to prevent this. * Flip the lines in software. */ @@ -7658,7 +7658,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c if (!(row = HeapAlloc(GetProcessHeap(), 0, pitch))) goto error; -@@ -2912,8 +3663,13 @@ +@@ -2899,8 +3650,13 @@ /* The texture is now most up to date - If the surface is a render target * and has a drawable, this path is never entered. */ @@ -7672,7 +7672,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c } /* Uses the hardware to stretch and flip the image */ -@@ -2981,7 +3737,11 @@ +@@ -2968,7 +3724,11 @@ checkGLcall("glEnable(texture_target)"); /* For now invalidate the texture copy of the back buffer. Drawable and sysmem copy are untouched */ @@ -7684,7 +7684,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c } /* Make sure that the top pixel is always above the bottom pixel, and keep a separate upside down flag -@@ -3178,6 +3938,7 @@ +@@ -3165,6 +3925,7 @@ checkGLcall("glDeleteTextures(1, &backup)"); } @@ -7692,7 +7692,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c if (wined3d_settings.cs_multithreaded) gl_info->gl_ops.gl.p_glFinish(); else if (wined3d_settings.strict_draw_ordering) -@@ -3189,6 +3950,17 @@ +@@ -3176,6 +3937,17 @@ * and has a drawable, this path is never entered. */ wined3d_resource_validate_location(&dst_surface->resource, WINED3D_LOCATION_TEXTURE_RGB); wined3d_resource_invalidate_location(&dst_surface->resource, ~WINED3D_LOCATION_TEXTURE_RGB); @@ -7710,7 +7710,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c } /* Front buffer coordinates are always full screen coordinates, but our GL -@@ -3243,9 +4015,15 @@ +@@ -3230,9 +4002,15 @@ gl_info = context->gl_info; @@ -7726,7 +7726,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c wined3d_texture_load(src_surface->container, context, FALSE); /* Activate the destination context, set it up for blitting */ -@@ -3288,9 +4066,13 @@ +@@ -3275,9 +4053,13 @@ /* Leave the opengl state valid for blitting */ device->blitter->unset_shader(context->gl_info); @@ -7740,7 +7740,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c || (dst_surface->container->swapchain && dst_surface->container->swapchain->front_buffer == dst_surface->container)) gl_info->gl_ops.gl.p_glFlush(); /* Flush to ensure ordering across contexts. */ -@@ -3320,8 +4102,13 @@ +@@ -3307,8 +4089,13 @@ enum wined3d_texture_filter_type filter) { struct wined3d_device *device = dst_surface->resource.device; @@ -7754,7 +7754,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c TRACE("dst_surface %p, dst_rect %s, src_surface %p, src_rect %s, flags %#x, blt_fx %p, filter %s.\n", dst_surface, wine_dbgstr_rect(dst_rect), src_surface, wine_dbgstr_rect(src_rect), -@@ -3512,6 +4299,7 @@ +@@ -3499,6 +4286,7 @@ { TRACE("surface %p, new location %#x, w %u, h %u.\n", surface, location, w, h); @@ -7762,7 +7762,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c if (((surface->resource.locations & WINED3D_LOCATION_TEXTURE_RGB) && !(location & WINED3D_LOCATION_TEXTURE_RGB)) || (!(surface->resource.locations & WINED3D_LOCATION_TEXTURE_RGB) && (location & WINED3D_LOCATION_TEXTURE_RGB))) -@@ -3520,6 +4308,15 @@ +@@ -3507,6 +4295,15 @@ surface->ds_current_size.cx = w; surface->ds_current_size.cy = h; surface->resource.locations = location; @@ -7778,7 +7778,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c } /* Context activation is done by the caller. */ -@@ -3534,7 +4331,11 @@ +@@ -3521,7 +4318,11 @@ /* TODO: Make this work for modes other than FBO */ if (wined3d_settings.offscreen_rendering_mode != ORM_FBO) return; @@ -7790,7 +7790,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c { w = surface->ds_current_size.cx; h = surface->ds_current_size.cy; -@@ -3560,7 +4361,11 @@ +@@ -3547,7 +4348,11 @@ return; } @@ -7802,7 +7802,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c { TRACE("Surface was discarded, no need copy data.\n"); switch (location) -@@ -3580,6 +4385,7 @@ +@@ -3567,6 +4372,7 @@ default: FIXME("Unhandled location %#x\n", location); } @@ -7810,7 +7810,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c surface->resource.locations &= ~WINED3D_LOCATION_DISCARDED; surface->resource.locations |= location; surface->ds_current_size.cx = surface->resource.width; -@@ -3591,6 +4397,19 @@ +@@ -3578,6 +4384,19 @@ { FIXME("No up to date depth stencil location.\n"); surface->resource.locations |= location; @@ -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; -@@ -3654,9 +4473,13 @@ +@@ -3641,9 +4460,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) -@@ -3672,9 +4495,13 @@ +@@ -3659,9 +4482,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 -@@ -3682,6 +4509,7 @@ +@@ -3669,6 +4496,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; -@@ -3714,6 +4542,124 @@ +@@ -3701,6 +4529,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. */ -@@ -3722,12 +4668,14 @@ +@@ -3709,12 +4655,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)) { -@@ -3736,7 +4684,11 @@ +@@ -3723,7 +4671,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); -@@ -3751,6 +4703,7 @@ +@@ -3738,6 +4690,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; -@@ -3777,6 +4730,24 @@ +@@ -3764,6 +4717,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, -@@ -3792,6 +4763,7 @@ +@@ -3779,6 +4750,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, -@@ -3799,6 +4771,15 @@ +@@ -3786,6 +4758,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}; -@@ -3813,6 +4794,7 @@ +@@ -3800,6 +4781,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) { -@@ -3847,6 +4829,42 @@ +@@ -3834,6 +4816,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))) -@@ -3855,7 +4873,11 @@ +@@ -3842,7 +4860,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); -@@ -3864,6 +4886,7 @@ +@@ -3851,6 +4873,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); -@@ -3871,6 +4894,14 @@ +@@ -3858,6 +4881,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. */ -@@ -3885,9 +4916,15 @@ +@@ -3872,9 +4903,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) -@@ -3907,6 +4944,7 @@ +@@ -3894,6 +4931,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; -@@ -3915,6 +4953,16 @@ +@@ -3902,6 +4940,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); -@@ -3926,7 +4974,11 @@ +@@ -3913,7 +4961,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); -@@ -3934,42 +4986,89 @@ +@@ -3921,42 +4973,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) -@@ -3983,7 +5082,11 @@ +@@ -3970,7 +5069,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: -@@ -3994,7 +5097,11 @@ +@@ -3981,7 +5084,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: -@@ -4002,12 +5109,21 @@ +@@ -3989,12 +5096,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; } -@@ -4115,6 +5231,7 @@ +@@ -4102,6 +5218,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; -@@ -4135,6 +5252,21 @@ +@@ -4122,6 +5239,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; } -@@ -4143,6 +5275,7 @@ +@@ -4130,6 +5262,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; -@@ -4158,6 +5291,20 @@ +@@ -4145,6 +5278,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; } -@@ -4186,8 +5333,13 @@ +@@ -4173,8 +5320,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 = { -@@ -4343,6 +5495,7 @@ +@@ -4330,6 +5482,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; -@@ -4377,6 +5530,28 @@ +@@ -4364,6 +5517,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; -@@ -4388,12 +5563,14 @@ +@@ -4375,12 +5550,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))) -@@ -4404,9 +5581,13 @@ +@@ -4391,9 +5568,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; } -@@ -4416,8 +5597,12 @@ +@@ -4403,8 +5584,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; -@@ -4428,12 +5613,24 @@ +@@ -4415,12 +5600,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) { -@@ -4468,7 +5665,11 @@ +@@ -4455,7 +5652,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; } -@@ -4476,7 +5677,11 @@ +@@ -4463,7 +5664,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; } -@@ -4525,6 +5730,7 @@ +@@ -4512,6 +5717,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; } -@@ -4538,6 +5744,21 @@ +@@ -4525,6 +5731,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); } } -@@ -4547,8 +5768,13 @@ +@@ -4534,8 +5755,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 } } } -@@ -4557,9 +5783,15 @@ +@@ -4544,9 +5770,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 } } } -@@ -4569,6 +5801,7 @@ +@@ -4556,6 +5788,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)) -@@ -4576,6 +5809,15 @@ +@@ -4563,6 +5796,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 { -@@ -4622,6 +5864,7 @@ +@@ -4609,6 +5851,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; } -@@ -4630,6 +5873,16 @@ +@@ -4617,6 +5860,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)) -@@ -4679,7 +5932,11 @@ +@@ -4666,7 +5919,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) -@@ -4756,6 +6013,7 @@ +@@ -4743,6 +6000,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; \ -@@ -4777,6 +6035,29 @@ +@@ -4764,6 +6022,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) { -@@ -4795,7 +6076,11 @@ +@@ -4782,7 +6063,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) { -@@ -4826,10 +6111,12 @@ +@@ -4813,10 +6098,12 @@ } } @@ -8745,7 +8745,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c error: if (flags && FIXME_ON(d3d_surface)) { -@@ -4837,6 +6124,7 @@ +@@ -4824,6 +6111,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); -@@ -4855,6 +6143,14 @@ +@@ -4842,6 +6130,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; } -@@ -4899,6 +6195,7 @@ +@@ -4886,6 +6182,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) -@@ -4906,6 +6203,16 @@ +@@ -4893,6 +6190,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 -@@ -4916,6 +6223,106 @@ +@@ -4903,6 +6210,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"); -@@ -4958,8 +6365,13 @@ +@@ -4945,8 +6352,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 -@@ -4979,6 +6391,7 @@ +@@ -4966,6 +6378,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))) -@@ -4989,6 +6402,24 @@ +@@ -4976,6 +6389,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 -@@ -4997,8 +6428,13 @@ +@@ -4984,8 +6415,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"); -@@ -5019,8 +6455,13 @@ +@@ -5006,8 +6442,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 { -@@ -5038,8 +6479,13 @@ +@@ -5025,8 +6466,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) -@@ -5048,6 +6494,7 @@ +@@ -5035,6 +6481,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))) -@@ -5060,6 +6507,19 @@ +@@ -5047,6 +6494,19 @@ context_release(context); } return; @@ -9017,7 +9017,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c } } } -@@ -5083,6 +6543,7 @@ +@@ -5070,6 +6530,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; } -@@ -5288,6 +6749,53 @@ +@@ -5275,6 +6736,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) -@@ -5349,7 +6857,11 @@ +@@ -5336,7 +6844,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); -@@ -5381,9 +6893,14 @@ +@@ -5368,9 +6880,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; -@@ -5410,7 +6927,11 @@ +@@ -5397,7 +6914,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/winepulse-PulseAudio_Support/0001-winepulse-Add-initial-stub-for-pulseaudio-support.patch b/patches/winepulse-PulseAudio_Support/0001-winepulse-Add-initial-stub-for-pulseaudio-support.patch index 9813fcda..352b8b4a 100644 --- a/patches/winepulse-PulseAudio_Support/0001-winepulse-Add-initial-stub-for-pulseaudio-support.patch +++ b/patches/winepulse-PulseAudio_Support/0001-winepulse-Add-initial-stub-for-pulseaudio-support.patch @@ -29,8 +29,8 @@ index d23227a..76aed78 100644 fi +dnl **** Check for PulseAudio **** -+AC_SUBST(PULSELIBS,"") -+AC_SUBST(PULSEINCL,"") ++AC_SUBST(PULSE_LIBS,"") ++AC_SUBST(PULSE_CFLAGS,"") +if test "x$with_pulse" != "xno"; +then + ac_save_CPPFLAGS="$CPPFLAGS" @@ -43,8 +43,8 @@ index d23227a..76aed78 100644 + AC_CHECK_HEADERS(pulse/pulseaudio.h, + [AC_CHECK_LIB(pulse, pa_stream_is_corked, + [AC_DEFINE(HAVE_PULSEAUDIO, 1, [Define if you have pulseaudio]) -+ PULSELIBS="$ac_pulse_libs" -+ PULSEINCL="$ac_pulse_cflags"],,$ac_pulse_libs) ++ PULSE_LIBS="$ac_pulse_libs" ++ PULSE_CFLAGS="$ac_pulse_cflags"],,$ac_pulse_libs) + ]) + fi + CPPFLAGS="$ac_save_CPPFLAGS" @@ -59,13 +59,13 @@ index d23227a..76aed78 100644 dnl **** Disable unsupported winmm drivers **** test -n "$ALSA_LIBS" || enable_winealsa_drv=${enable_winealsa_drv:-no} test -n "$COREAUDIO_LIBS" || enable_winecoreaudio_drv=${enable_winecoreaudio_drv:-no} -+test -n "$PULSELIBS" || enable_winepulse_drv=${enable_winepulse_drv:-no} ++test -n "$PULSE_LIBS" || enable_winepulse_drv=${enable_winepulse_drv:-no} test "x$ac_cv_member_oss_sysinfo_numaudioengines" = xyes || enable_wineoss_drv=${enable_wineoss_drv:-no} test "$ac_cv_header_linux_joystick_h" = "yes" -o "$ac_cv_header_IOKit_hid_IOHIDLib_h" = "yes" || enable_winejoystick_drv=${enable_winejoystick_drv:-no} dnl **** Check for any sound system **** -if test "x$ALSA_LIBS$COREAUDIO_LIBS" = "x" -a \ -+if test "x$ALSA_LIBS$COREAUDIO_LIBS$PULSELIBS" = "x" -a \ ++if test "x$ALSA_LIBS$COREAUDIO_LIBS$PULSE_LIBS" = "x" -a \ "x$ac_cv_member_oss_sysinfo_numaudioengines" != xyes -a \ - "x$with_alsa$with_coreaudio$with_oss" != xnonono + "x$with_alsa$with_coreaudio$with_oss$with_pulse" != xnononono @@ -101,8 +101,8 @@ index 0000000..158bbc0 @@ -0,0 +1,7 @@ +MODULE = winepulse.drv +IMPORTS = dxguid uuid winmm user32 advapi32 ole32 -+EXTRALIBS = @PULSELIBS@ $(PTHREAD_LIBS) -+EXTRAINCL = @PULSEINCL@ ++EXTRALIBS = $(PULSE_LIBS) $(PTHREAD_LIBS) ++EXTRAINCL = $(PULSE_CFLAGS) + +C_SRCS = \ + mmdevdrv.c diff --git a/patches/winepulse-PulseAudio_Support/0032-winepulse-Forward-winmm-functions-to-winealsa.patch b/patches/winepulse-PulseAudio_Support/0032-winepulse-Forward-winmm-functions-to-winealsa.patch index eec3e69f..7a6d550d 100644 --- a/patches/winepulse-PulseAudio_Support/0032-winepulse-Forward-winmm-functions-to-winealsa.patch +++ b/patches/winepulse-PulseAudio_Support/0032-winepulse-Forward-winmm-functions-to-winealsa.patch @@ -26,8 +26,8 @@ index 158bbc0..3428329 100644 MODULE = winepulse.drv IMPORTS = dxguid uuid winmm user32 advapi32 ole32 +DELAYIMPORTS = winealsa.drv - EXTRALIBS = @PULSELIBS@ $(PTHREAD_LIBS) - EXTRAINCL = @PULSEINCL@ + EXTRALIBS = $(PULSE_LIBS) $(PTHREAD_LIBS) + EXTRAINCL = $(PULSE_CFLAGS) diff --git a/dlls/winepulse.drv/winepulse.drv.spec b/dlls/winepulse.drv/winepulse.drv.spec index 612bf46..288de87 100644 diff --git a/patches/winepulse-PulseAudio_Support/0037-winepulse-fetch-actual-program-name-if-possible.patch b/patches/winepulse-PulseAudio_Support/0037-winepulse-fetch-actual-program-name-if-possible.patch index 0a509d89..6d7b225a 100644 --- a/patches/winepulse-PulseAudio_Support/0037-winepulse-fetch-actual-program-name-if-possible.patch +++ b/patches/winepulse-PulseAudio_Support/0037-winepulse-fetch-actual-program-name-if-possible.patch @@ -22,8 +22,8 @@ index 3428329..1112575 100644 -IMPORTS = dxguid uuid winmm user32 advapi32 ole32 +IMPORTS = dxguid uuid winmm user32 advapi32 ole32 version DELAYIMPORTS = winealsa.drv - EXTRALIBS = @PULSELIBS@ $(PTHREAD_LIBS) - EXTRAINCL = @PULSEINCL@ + EXTRALIBS = $(PULSE_LIBS) $(PTHREAD_LIBS) + EXTRAINCL = $(PULSE_CFLAGS) diff --git a/dlls/winepulse.drv/mmdevdrv.c b/dlls/winepulse.drv/mmdevdrv.c index 63b9786..356677c 100644 --- a/dlls/winepulse.drv/mmdevdrv.c