From ea079c4c16e22523139fccdb181fd269f65bd18e Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Mon, 10 Oct 2016 23:27:30 +0200 Subject: [PATCH] Rebase against b1387f9b18cd7e1ca1ddf54ff8ff6fe32c286f44. [kernel32-CompareStringEx] Removed patch to silence repeated CompareStringEx FIXME (fixed upstream). [kernel32-QT_Environment_Variables] Removed patch to avoid inheriting QT_* environment variables (accepted upstream). [services-SERVICE_FILE_SYSTEM_DRIVER] Removed patch to start SERVICE_FILE_SYSTEM_DRIVER services with winedevice (accepted upstream). [winspool.drv-SetPrinterW] Removed patch to handle case 8 in SetPrinterW (fixed upstream). --- ...lence-repeated-CompareStringEx-FIXME.patch | 50 ------ patches/kernel32-CompareStringEx/definition | 1 - ...inherit-QT_-environment-variables-to.patch | 29 ---- .../definition | 1 - ...-Implement-loader-redirection-scheme.patch | 44 ++--- patches/patchinstall.sh | 76 +-------- ...ERVICE_FILE_SYSTEM_DRIVER-services-w.patch | 26 --- .../definition | 1 - ...-surface-locations-into-the-resource.patch | 88 ++++++---- ...d3d-Remove-surface_validate_location.patch | 64 +++++--- ...d-Remove-surface_invalidate_location.patch | 72 +++++---- ...surface_load_location-with-resource_.patch | 79 +++++---- ...-resource-updates-to-finish-when-usi.patch | 40 ++--- .../wined3d-CSMT_Main/9999-IfDefined.patch | 152 +++++++++++------- ...spool.drv-Add-case-8-for-SetPrinterW.patch | 45 ------ patches/winspool.drv-SetPrinterW/definition | 1 - 16 files changed, 328 insertions(+), 441 deletions(-) delete mode 100644 patches/kernel32-CompareStringEx/0001-kernel32-Silence-repeated-CompareStringEx-FIXME.patch delete mode 100644 patches/kernel32-CompareStringEx/definition delete mode 100644 patches/kernel32-QT_Environment_Variables/0001-kernel32-Do-not-inherit-QT_-environment-variables-to.patch delete mode 100644 patches/kernel32-QT_Environment_Variables/definition delete mode 100644 patches/services-SERVICE_FILE_SYSTEM_DRIVER/0001-services-Start-SERVICE_FILE_SYSTEM_DRIVER-services-w.patch delete mode 100644 patches/services-SERVICE_FILE_SYSTEM_DRIVER/definition delete mode 100644 patches/winspool.drv-SetPrinterW/0001-winspool.drv-Add-case-8-for-SetPrinterW.patch delete mode 100644 patches/winspool.drv-SetPrinterW/definition diff --git a/patches/kernel32-CompareStringEx/0001-kernel32-Silence-repeated-CompareStringEx-FIXME.patch b/patches/kernel32-CompareStringEx/0001-kernel32-Silence-repeated-CompareStringEx-FIXME.patch deleted file mode 100644 index 85a0d7b6..00000000 --- a/patches/kernel32-CompareStringEx/0001-kernel32-Silence-repeated-CompareStringEx-FIXME.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 33fa174b6404cfea673d510457d21d784a23efbd Mon Sep 17 00:00:00 2001 -From: Sebastian Lackner -Date: Sun, 4 May 2014 00:18:11 +0200 -Subject: kernel32: Silence repeated CompareStringEx FIXME. - ---- - dlls/kernel32/locale.c | 14 +++++++++----- - 1 file changed, 9 insertions(+), 5 deletions(-) - -diff --git a/dlls/kernel32/locale.c b/dlls/kernel32/locale.c -index eca0e39..55ef3d6 100644 ---- a/dlls/kernel32/locale.c -+++ b/dlls/kernel32/locale.c -@@ -2985,9 +2985,10 @@ INT WINAPI CompareStringW(LCID lcid, DWORD flags, - INT WINAPI CompareStringEx(LPCWSTR locale, DWORD flags, LPCWSTR str1, INT len1, - LPCWSTR str2, INT len2, LPNLSVERSIONINFO version, LPVOID reserved, LPARAM lParam) - { -- DWORD supported_flags = NORM_IGNORECASE|NORM_IGNORENONSPACE|NORM_IGNORESYMBOLS|SORT_STRINGSORT -- |NORM_IGNOREKANATYPE|NORM_IGNOREWIDTH|LOCALE_USE_CP_ACP; -- DWORD semistub_flags = NORM_LINGUISTIC_CASING|LINGUISTIC_IGNORECASE|0x10000000; -+ static const DWORD supported_flags = NORM_IGNORECASE|NORM_IGNORENONSPACE|NORM_IGNORESYMBOLS|SORT_STRINGSORT -+ |NORM_IGNOREKANATYPE|NORM_IGNOREWIDTH|LOCALE_USE_CP_ACP -+ |NORM_LINGUISTIC_CASING|LINGUISTIC_IGNORECASE|0x10000000; -+ static DWORD semistub_flags = NORM_LINGUISTIC_CASING|LINGUISTIC_IGNORECASE|0x10000000; - /* 0x10000000 is related to diacritics in Arabic, Japanese, and Hebrew */ - INT ret; - -@@ -3001,14 +3002,17 @@ INT WINAPI CompareStringEx(LPCWSTR locale, DWORD flags, LPCWSTR str1, INT len1, - return 0; - } - -- if (flags & ~(supported_flags|semistub_flags)) -+ if (flags & ~supported_flags) - { - SetLastError(ERROR_INVALID_FLAGS); - return 0; - } - - if (flags & semistub_flags) -- FIXME("semi-stub behavor for flag(s) 0x%x\n", flags & semistub_flags); -+ { -+ FIXME("semi-stub behavior for flag(s) 0x%x\n", flags & semistub_flags); -+ semistub_flags &= ~flags; -+ } - - if (len1 < 0) len1 = strlenW(str1); - if (len2 < 0) len2 = strlenW(str2); --- -1.7.9.5 - diff --git a/patches/kernel32-CompareStringEx/definition b/patches/kernel32-CompareStringEx/definition deleted file mode 100644 index 5d05f260..00000000 --- a/patches/kernel32-CompareStringEx/definition +++ /dev/null @@ -1 +0,0 @@ -Category: stable diff --git a/patches/kernel32-QT_Environment_Variables/0001-kernel32-Do-not-inherit-QT_-environment-variables-to.patch b/patches/kernel32-QT_Environment_Variables/0001-kernel32-Do-not-inherit-QT_-environment-variables-to.patch deleted file mode 100644 index 2f060010..00000000 --- a/patches/kernel32-QT_Environment_Variables/0001-kernel32-Do-not-inherit-QT_-environment-variables-to.patch +++ /dev/null @@ -1,29 +0,0 @@ -From c62a9b8f39fcdd2209959e831e3801162b41420c Mon Sep 17 00:00:00 2001 -From: Sebastian Lackner -Date: Wed, 27 Jan 2016 06:56:09 +0100 -Subject: kernel32: Do not inherit QT_* environment variables to Windows - environment. - -If necessary, QT environment variables can still be set by adding a WINE -prefix, for example: WINEQT_QPA_PLATFORM=... ---- - dlls/kernel32/process.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/dlls/kernel32/process.c b/dlls/kernel32/process.c -index 6e7b23e..bb6c2dd 100644 ---- a/dlls/kernel32/process.c -+++ b/dlls/kernel32/process.c -@@ -135,7 +135,8 @@ static inline BOOL is_special_env_var( const char *var ) - !strncmp( var, "PWD=", sizeof("PWD=")-1 ) || - !strncmp( var, "HOME=", sizeof("HOME=")-1 ) || - !strncmp( var, "TEMP=", sizeof("TEMP=")-1 ) || -- !strncmp( var, "TMP=", sizeof("TMP=")-1 )); -+ !strncmp( var, "TMP=", sizeof("TMP=")-1 ) || -+ !strncmp( var, "QT_", sizeof("QT_")-1 )); - } - - --- -2.6.4 - diff --git a/patches/kernel32-QT_Environment_Variables/definition b/patches/kernel32-QT_Environment_Variables/definition deleted file mode 100644 index f60b9168..00000000 --- a/patches/kernel32-QT_Environment_Variables/definition +++ /dev/null @@ -1 +0,0 @@ -Fixes: Do not inherit QT_* environment variables to Windows environment diff --git a/patches/ntdll-DllRedirects/0005-ntdll-Implement-loader-redirection-scheme.patch b/patches/ntdll-DllRedirects/0005-ntdll-Implement-loader-redirection-scheme.patch index 1f9b5ab2..8dda4d7c 100644 --- a/patches/ntdll-DllRedirects/0005-ntdll-Implement-loader-redirection-scheme.patch +++ b/patches/ntdll-DllRedirects/0005-ntdll-Implement-loader-redirection-scheme.patch @@ -1,4 +1,4 @@ -From a76e0d5f4e8211975ede9f1bf65522a31114112a Mon Sep 17 00:00:00 2001 +From 88b4c986267863958749232806fbd6ce40db9fdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Sat, 13 Dec 2014 05:34:48 +0100 Subject: ntdll: Implement loader redirection scheme. @@ -8,10 +8,10 @@ Subject: ntdll: Implement loader redirection scheme. 1 file changed, 44 insertions(+), 22 deletions(-) diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c -index 0486517..7877f04 100644 +index 243efab..9e54f82 100644 --- a/dlls/ntdll/loader.c +++ b/dlls/ntdll/loader.c -@@ -85,6 +85,7 @@ struct builtin_load_info +@@ -92,6 +92,7 @@ struct builtin_load_info { const WCHAR *load_path; const WCHAR *filename; @@ -19,7 +19,7 @@ index 0486517..7877f04 100644 NTSTATUS status; WINE_MODREF *wm; }; -@@ -110,7 +111,8 @@ static WINE_MODREF *cached_modref; +@@ -117,7 +118,8 @@ static WINE_MODREF *cached_modref; static WINE_MODREF *current_modref; static WINE_MODREF *last_failed_modref; @@ -29,7 +29,7 @@ index 0486517..7877f04 100644 static NTSTATUS process_attach( WINE_MODREF *wm, LPVOID lpReserved ); static FARPROC find_ordinal_export( HMODULE module, const IMAGE_EXPORT_DIRECTORY *exports, DWORD exp_size, DWORD ordinal, LPCWSTR load_path ); -@@ -436,7 +438,7 @@ static FARPROC find_forwarded_export( HMODULE module, const char *forward, LPCWS +@@ -443,7 +445,7 @@ static FARPROC find_forwarded_export( HMODULE module, const char *forward, LPCWS if (!(wm = find_basename_module( mod_name ))) { TRACE( "delay loading %s for '%s'\n", debugstr_w(mod_name), forward ); @@ -38,7 +38,7 @@ index 0486517..7877f04 100644 !(wm->ldr.Flags & LDR_DONT_RESOLVE_REFS)) { if (process_attach( wm, NULL ) != STATUS_SUCCESS) -@@ -585,7 +587,7 @@ static WINE_MODREF *import_dll( HMODULE module, const IMAGE_IMPORT_DESCRIPTOR *d +@@ -599,7 +601,7 @@ static BOOL import_dll( HMODULE module, const IMAGE_IMPORT_DESCRIPTOR *descr, LP { ascii_to_unicode( buffer, name, len ); buffer[len] = 0; @@ -47,8 +47,8 @@ index 0486517..7877f04 100644 } else /* need to allocate a larger buffer */ { -@@ -593,7 +595,7 @@ static WINE_MODREF *import_dll( HMODULE module, const IMAGE_IMPORT_DESCRIPTOR *d - if (!ptr) return NULL; +@@ -607,7 +609,7 @@ static BOOL import_dll( HMODULE module, const IMAGE_IMPORT_DESCRIPTOR *descr, LP + if (!ptr) return FALSE; ascii_to_unicode( ptr, name, len ); ptr[len] = 0; - status = load_dll( load_path, ptr, 0, &wmImp ); @@ -56,7 +56,7 @@ index 0486517..7877f04 100644 RtlFreeHeap( GetProcessHeap(), 0, ptr ); } -@@ -909,7 +911,7 @@ static NTSTATUS fixup_imports( WINE_MODREF *wm, LPCWSTR load_path ) +@@ -927,7 +929,7 @@ static NTSTATUS fixup_imports( WINE_MODREF *wm, LPCWSTR load_path ) * Allocate a WINE_MODREF structure and add it to the process list * The loader_section must be locked while calling this function. */ @@ -65,7 +65,7 @@ index 0486517..7877f04 100644 { WINE_MODREF *wm; const WCHAR *p; -@@ -932,7 +934,7 @@ static WINE_MODREF *alloc_module( HMODULE hModule, LPCWSTR filename ) +@@ -950,7 +952,7 @@ static WINE_MODREF *alloc_module( HMODULE hModule, LPCWSTR filename ) wm->ldr.TimeDateStamp = 0; wm->ldr.ActivationContext = 0; @@ -74,7 +74,7 @@ index 0486517..7877f04 100644 if ((p = strrchrW( wm->ldr.FullDllName.Buffer, '\\' ))) p++; else p = wm->ldr.FullDllName.Buffer; RtlInitUnicodeString( &wm->ldr.BaseDllName, p ); -@@ -1549,7 +1551,7 @@ static void load_builtin_callback( void *module, const char *filename ) +@@ -1589,7 +1591,7 @@ static void load_builtin_callback( void *module, const char *filename ) return; } @@ -83,7 +83,7 @@ index 0486517..7877f04 100644 RtlFreeHeap( GetProcessHeap(), 0, fullname ); if (!wm) { -@@ -1605,8 +1607,8 @@ static void load_builtin_callback( void *module, const char *filename ) +@@ -1771,8 +1773,8 @@ static NTSTATUS perform_relocations( void *module, SIZE_T len ) /****************************************************************************** * load_native_dll (internal) */ @@ -94,7 +94,7 @@ index 0486517..7877f04 100644 { void *module; HANDLE mapping; -@@ -1630,7 +1632,7 @@ static NTSTATUS load_native_dll( LPCWSTR load_path, LPCWSTR name, HANDLE file, +@@ -1806,7 +1808,7 @@ static NTSTATUS load_native_dll( LPCWSTR load_path, LPCWSTR name, HANDLE file, /* create the MODREF */ @@ -103,7 +103,7 @@ index 0486517..7877f04 100644 { status = STATUS_NO_MEMORY; goto done; -@@ -1692,8 +1694,8 @@ done: +@@ -1870,8 +1872,8 @@ done: /*********************************************************************** * load_builtin_dll */ @@ -114,7 +114,7 @@ index 0486517..7877f04 100644 { char error[256], dllname[MAX_PATH]; const WCHAR *name, *p; -@@ -1713,6 +1715,7 @@ static NTSTATUS load_builtin_dll( LPCWSTR load_path, LPCWSTR path, HANDLE file, +@@ -1891,6 +1893,7 @@ static NTSTATUS load_builtin_dll( LPCWSTR load_path, LPCWSTR path, HANDLE file, */ info.load_path = load_path; info.filename = NULL; @@ -122,7 +122,7 @@ index 0486517..7877f04 100644 info.status = STATUS_SUCCESS; info.wm = NULL; -@@ -2153,14 +2156,14 @@ overflow: +@@ -2331,14 +2334,14 @@ overflow: return STATUS_BUFFER_TOO_SMALL; } @@ -139,7 +139,7 @@ index 0486517..7877f04 100644 { BOOL data = flags & (LOAD_LIBRARY_AS_DATAFILE | LOAD_LIBRARY_AS_DATAFILE_EXCLUSIVE); enum loadorder loadorder; -@@ -2198,6 +2201,25 @@ static NTSTATUS load_dll( LPCWSTR load_path, LPCWSTR libname, DWORD flags, WINE_ +@@ -2376,6 +2379,25 @@ static NTSTATUS load_dll( LPCWSTR load_path, LPCWSTR libname, DWORD flags, WINE_ } main_exe = get_modref( NtCurrentTeb()->Peb->ImageBaseAddress ); @@ -165,7 +165,7 @@ index 0486517..7877f04 100644 loadorder = get_load_order( main_exe ? main_exe->ldr.BaseDllName.Buffer : NULL, filename ); if (handle && is_fake_dll( handle )) -@@ -2220,22 +2242,22 @@ static NTSTATUS load_dll( LPCWSTR load_path, LPCWSTR libname, DWORD flags, WINE_ +@@ -2398,22 +2420,22 @@ static NTSTATUS load_dll( LPCWSTR load_path, LPCWSTR libname, DWORD flags, WINE_ if (!handle) nts = STATUS_DLL_NOT_FOUND; else { @@ -193,7 +193,7 @@ index 0486517..7877f04 100644 if (nts == STATUS_SUCCESS && loadorder == LO_DEFAULT && (MODULE_InitDLL( *pwm, DLL_WINE_PREATTACH, NULL ) != STATUS_SUCCESS)) { -@@ -2245,7 +2267,7 @@ static NTSTATUS load_dll( LPCWSTR load_path, LPCWSTR libname, DWORD flags, WINE_ +@@ -2423,7 +2445,7 @@ static NTSTATUS load_dll( LPCWSTR load_path, LPCWSTR libname, DWORD flags, WINE_ nts = STATUS_DLL_NOT_FOUND; } if (nts == STATUS_DLL_NOT_FOUND && loadorder != LO_BUILTIN) @@ -202,7 +202,7 @@ index 0486517..7877f04 100644 break; } -@@ -2278,7 +2300,7 @@ NTSTATUS WINAPI DECLSPEC_HOTPATCH LdrLoadDll(LPCWSTR path_name, DWORD flags, +@@ -2456,7 +2478,7 @@ NTSTATUS WINAPI DECLSPEC_HOTPATCH LdrLoadDll(LPCWSTR path_name, DWORD flags, RtlEnterCriticalSection( &loader_section ); if (!path_name) path_name = NtCurrentTeb()->Peb->ProcessParameters->DllPath.Buffer; @@ -211,7 +211,7 @@ index 0486517..7877f04 100644 if (nts == STATUS_SUCCESS && !(wm->ldr.Flags & LDR_DONT_RESOLVE_REFS)) { -@@ -3241,7 +3263,7 @@ void __wine_process_init(void) +@@ -3419,7 +3441,7 @@ void __wine_process_init(void) /* setup the load callback and create ntdll modref */ wine_dll_set_callback( load_builtin_callback ); @@ -221,5 +221,5 @@ index 0486517..7877f04 100644 MESSAGE( "wine: could not load kernel32.dll, status %x\n", status ); exit(1); -- -2.4.5 +2.9.0 diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index d4055e3a..55be0bd7 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -52,7 +52,7 @@ usage() # Get the upstream commit sha upstream_commit() { - echo "c03303838dc648b4dc9fc8d0c78b4ec51a455253" + echo "b1387f9b18cd7e1ca1ddf54ff8ff6fe32c286f44" } # Show version information @@ -149,7 +149,6 @@ patch_enable_all () enable_iphlpapi_TCP_Table="$1" enable_kernel32_COMSPEC="$1" enable_kernel32_Codepage_Conversion="$1" - enable_kernel32_CompareStringEx="$1" enable_kernel32_CopyFileEx="$1" enable_kernel32_Cwd_Startup_Info="$1" enable_kernel32_GetLargestConsoleWindowSize="$1" @@ -157,7 +156,6 @@ patch_enable_all () enable_kernel32_Named_Pipe="$1" enable_kernel32_NeedCurrentDirectoryForExePath="$1" enable_kernel32_Profile="$1" - enable_kernel32_QT_Environment_Variables="$1" enable_kernel32_SetFileCompletionNotificationModes="$1" enable_kernel32_SetFileInformationByHandle="$1" enable_kernel32_TimezoneInformation_Registry="$1" @@ -246,7 +244,6 @@ patch_enable_all () enable_server_Signal_Thread="$1" enable_server_Stored_ACLs="$1" enable_server_Timestamp_Compat="$1" - enable_services_SERVICE_FILE_SYSTEM_DRIVER="$1" enable_setupapi_HSPFILEQ_Check_Type="$1" enable_setupapi_SetupDiSelectBestCompatDrv="$1" enable_setupapi_SetupDiSetDeviceInstallParamsW="$1" @@ -320,7 +317,6 @@ patch_enable_all () enable_wininet_Internet_Settings="$1" enable_wininet_ParseX509EncodedCertificateForListBoxEntry="$1" enable_winmm_Delay_Import_Depends="$1" - enable_winspool_drv_SetPrinterW="$1" enable_wpcap_Dynamic_Linking="$1" enable_ws2_32_APC_Performance="$1" enable_ws2_32_Connect_Time="$1" @@ -547,9 +543,6 @@ patch_enable () kernel32-Codepage_Conversion) enable_kernel32_Codepage_Conversion="$2" ;; - kernel32-CompareStringEx) - enable_kernel32_CompareStringEx="$2" - ;; kernel32-CopyFileEx) enable_kernel32_CopyFileEx="$2" ;; @@ -571,9 +564,6 @@ patch_enable () kernel32-Profile) enable_kernel32_Profile="$2" ;; - kernel32-QT_Environment_Variables) - enable_kernel32_QT_Environment_Variables="$2" - ;; kernel32-SetFileCompletionNotificationModes) enable_kernel32_SetFileCompletionNotificationModes="$2" ;; @@ -838,9 +828,6 @@ patch_enable () server-Timestamp_Compat) enable_server_Timestamp_Compat="$2" ;; - services-SERVICE_FILE_SYSTEM_DRIVER) - enable_services_SERVICE_FILE_SYSTEM_DRIVER="$2" - ;; setupapi-HSPFILEQ_Check_Type) enable_setupapi_HSPFILEQ_Check_Type="$2" ;; @@ -1060,9 +1047,6 @@ patch_enable () winmm-Delay_Import_Depends) enable_winmm_Delay_Import_Depends="$2" ;; - winspool.drv-SetPrinterW) - enable_winspool_drv_SetPrinterW="$2" - ;; wpcap-Dynamic_Linking) enable_wpcap_Dynamic_Linking="$2" ;; @@ -1502,9 +1486,6 @@ if test "$enable_category_stable" -eq 1; then if test "$enable_fonts_Missing_Fonts" -gt 1; then abort "Patchset fonts-Missing_Fonts disabled, but category-stable depends on that." fi - if test "$enable_kernel32_CompareStringEx" -gt 1; then - abort "Patchset kernel32-CompareStringEx disabled, but category-stable depends on that." - fi if test "$enable_kernel32_Named_Pipe" -gt 1; then abort "Patchset kernel32-Named_Pipe disabled, but category-stable depends on that." fi @@ -1660,7 +1641,6 @@ if test "$enable_category_stable" -eq 1; then enable_dbghelp_Debug_Symbols=1 enable_ddraw_EnumSurfaces=1 enable_fonts_Missing_Fonts=1 - enable_kernel32_CompareStringEx=1 enable_kernel32_Named_Pipe=1 enable_libs_Debug_Channel=1 enable_libs_Unicode_Collation=1 @@ -3284,18 +3264,6 @@ if test "$enable_kernel32_Codepage_Conversion" -eq 1; then ) >> "$patchlist" fi -# Patchset kernel32-CompareStringEx -# | -# | Modified files: -# | * dlls/kernel32/locale.c -# | -if test "$enable_kernel32_CompareStringEx" -eq 1; then - patch_apply kernel32-CompareStringEx/0001-kernel32-Silence-repeated-CompareStringEx-FIXME.patch - ( - echo '+ { "Sebastian Lackner", "kernel32: Silence repeated CompareStringEx FIXME.", 1 },'; - ) >> "$patchlist" -fi - # Patchset kernel32-SetFileInformationByHandle # | # | Modified files: @@ -3547,18 +3515,6 @@ if test "$enable_kernel32_Profile" -eq 1; then ) >> "$patchlist" fi -# Patchset kernel32-QT_Environment_Variables -# | -# | Modified files: -# | * dlls/kernel32/process.c -# | -if test "$enable_kernel32_QT_Environment_Variables" -eq 1; then - patch_apply kernel32-QT_Environment_Variables/0001-kernel32-Do-not-inherit-QT_-environment-variables-to.patch - ( - echo '+ { "Sebastian Lackner", "kernel32: Do not inherit QT_* environment variables to Windows environment.", 1 },'; - ) >> "$patchlist" -fi - # Patchset kernel32-SetFileCompletionNotificationModes # | # | This patchset fixes the following Wine bugs: @@ -4948,21 +4904,6 @@ if test "$enable_server_Timestamp_Compat" -eq 1; then ) >> "$patchlist" fi -# Patchset services-SERVICE_FILE_SYSTEM_DRIVER -# | -# | This patchset fixes the following Wine bugs: -# | * [#35824] Start SERVICE_FILE_SYSTEM_DRIVER services with winedevice -# | -# | Modified files: -# | * programs/services/services.c -# | -if test "$enable_services_SERVICE_FILE_SYSTEM_DRIVER" -eq 1; then - patch_apply services-SERVICE_FILE_SYSTEM_DRIVER/0001-services-Start-SERVICE_FILE_SYSTEM_DRIVER-services-w.patch - ( - echo '+ { "Sebastian Lackner", "services: Start SERVICE_FILE_SYSTEM_DRIVER services with winedevice.", 1 },'; - ) >> "$patchlist" -fi - # Patchset setupapi-HSPFILEQ_Check_Type # | # | This patchset fixes the following Wine bugs: @@ -6392,21 +6333,6 @@ if test "$enable_winmm_Delay_Import_Depends" -eq 1; then ) >> "$patchlist" fi -# Patchset winspool.drv-SetPrinterW -# | -# | This patchset fixes the following Wine bugs: -# | * [#24645] Add stub for winspool.SetPrinterW level 8 -# | -# | Modified files: -# | * dlls/winspool.drv/info.c -# | -if test "$enable_winspool_drv_SetPrinterW" -eq 1; then - patch_apply winspool.drv-SetPrinterW/0001-winspool.drv-Add-case-8-for-SetPrinterW.patch - ( - echo '+ { "Jarkko Korpi", "winspool.drv Add case 8 for SetPrinterW.", 1 },'; - ) >> "$patchlist" -fi - # Patchset wpcap-Dynamic_Linking # | # | Modified files: diff --git a/patches/services-SERVICE_FILE_SYSTEM_DRIVER/0001-services-Start-SERVICE_FILE_SYSTEM_DRIVER-services-w.patch b/patches/services-SERVICE_FILE_SYSTEM_DRIVER/0001-services-Start-SERVICE_FILE_SYSTEM_DRIVER-services-w.patch deleted file mode 100644 index 61c1fe45..00000000 --- a/patches/services-SERVICE_FILE_SYSTEM_DRIVER/0001-services-Start-SERVICE_FILE_SYSTEM_DRIVER-services-w.patch +++ /dev/null @@ -1,26 +0,0 @@ -From fa3088d5c689f7403df2525394a8d6837681959a Mon Sep 17 00:00:00 2001 -From: Sebastian Lackner -Date: Sat, 28 Nov 2015 23:29:49 +0100 -Subject: services: Start SERVICE_FILE_SYSTEM_DRIVER services with winedevice. - ---- - programs/services/services.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/programs/services/services.c b/programs/services/services.c -index 1335837..53a3846 100644 ---- a/programs/services/services.c -+++ b/programs/services/services.c -@@ -631,7 +631,8 @@ static DWORD get_service_binary_path(const struct service_entry *service_entry, - - ExpandEnvironmentStringsW(service_entry->config.lpBinaryPathName, *path, size); - -- if (service_entry->config.dwServiceType == SERVICE_KERNEL_DRIVER) -+ if (service_entry->config.dwServiceType == SERVICE_KERNEL_DRIVER || -+ service_entry->config.dwServiceType == SERVICE_FILE_SYSTEM_DRIVER) - { - static const WCHAR winedeviceW[] = {'\\','w','i','n','e','d','e','v','i','c','e','.','e','x','e',' ',0}; - WCHAR system_dir[MAX_PATH]; --- -2.6.2 - diff --git a/patches/services-SERVICE_FILE_SYSTEM_DRIVER/definition b/patches/services-SERVICE_FILE_SYSTEM_DRIVER/definition deleted file mode 100644 index db3a1d5e..00000000 --- a/patches/services-SERVICE_FILE_SYSTEM_DRIVER/definition +++ /dev/null @@ -1 +0,0 @@ -Fixes: [35824] Start SERVICE_FILE_SYSTEM_DRIVER services with winedevice diff --git a/patches/wined3d-CSMT_Main/0006-wined3d-Move-surface-locations-into-the-resource.patch b/patches/wined3d-CSMT_Main/0006-wined3d-Move-surface-locations-into-the-resource.patch index 5bf57d10..c47e928b 100644 --- a/patches/wined3d-CSMT_Main/0006-wined3d-Move-surface-locations-into-the-resource.patch +++ b/patches/wined3d-CSMT_Main/0006-wined3d-Move-surface-locations-into-the-resource.patch @@ -1,4 +1,4 @@ -From 188253a48866f5120620f71087ace68b16e8ab10 Mon Sep 17 00:00:00 2001 +From e732e656c738422f8c0d8872cc1fa732fe92d1df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20D=C3=B6singer?= Date: Tue, 21 Jan 2014 12:22:30 +0100 Subject: wined3d: Move surface locations into the resource. @@ -8,8 +8,9 @@ Subject: wined3d: Move surface locations into the resource. dlls/wined3d/device.c | 4 +- dlls/wined3d/drawprim.c | 2 +- dlls/wined3d/surface.c | 97 ++++++++++++++++++++------------------- + dlls/wined3d/swapchain.c | 8 ++-- dlls/wined3d/wined3d_private.h | 1 - - 5 files changed, 53 insertions(+), 53 deletions(-) + 6 files changed, 57 insertions(+), 57 deletions(-) diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c index 6851620..28939c0 100644 @@ -25,7 +26,7 @@ index 6851620..28939c0 100644 && !wined3d_resource_is_offscreen(&src_surface->container->resource)) { diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c -index 057ae18..2312267 100644 +index b9ab347..c6ba266 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -236,7 +236,7 @@ static void prepare_ds_clear(struct wined3d_surface *ds, struct wined3d_context @@ -60,7 +61,7 @@ index 3761830..943a829 100644 else SetRectEmpty(¤t_rect); diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c -index 51cf4f7..8611f9c 100644 +index 5cf7810..c7f41f7 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -556,7 +556,7 @@ static void surface_prepare_system_memory(struct wined3d_surface *surface) @@ -117,7 +118,7 @@ index 51cf4f7..8611f9c 100644 wined3d_resource_free_sysmem(&surface->resource); width = texture_resource->width; -@@ -3236,7 +3236,7 @@ static void fb_copy_to_texture_hwstretch(struct wined3d_surface *dst_surface, st +@@ -3238,7 +3238,7 @@ static void fb_copy_to_texture_hwstretch(struct wined3d_surface *dst_surface, st checkGLcall("glEnable(texture_target)"); /* For now invalidate the texture copy of the back buffer. Drawable and sysmem copy are untouched */ @@ -126,7 +127,7 @@ index 51cf4f7..8611f9c 100644 } /* Make sure that the top pixel is always above the bottom pixel, and keep a separate upside down flag -@@ -3763,13 +3763,14 @@ void surface_modify_ds_location(struct wined3d_surface *surface, +@@ -3765,13 +3765,14 @@ void surface_modify_ds_location(struct wined3d_surface *surface, { TRACE("surface %p, new location %#x, w %u, h %u.\n", surface, location, w, h); @@ -144,7 +145,7 @@ index 51cf4f7..8611f9c 100644 } /* Context activation is done by the caller. */ -@@ -3784,7 +3785,7 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co +@@ -3786,7 +3787,7 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co /* TODO: Make this work for modes other than FBO */ if (wined3d_settings.offscreen_rendering_mode != ORM_FBO) return; @@ -153,7 +154,7 @@ index 51cf4f7..8611f9c 100644 { w = surface->ds_current_size.cx; h = surface->ds_current_size.cy; -@@ -3811,20 +3812,20 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co +@@ -3813,20 +3814,20 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co } wined3d_surface_prepare(surface, context, location); @@ -179,7 +180,7 @@ index 51cf4f7..8611f9c 100644 surface->ds_current_size.cx = surface->resource.width; surface->ds_current_size.cy = surface->resource.height; return; -@@ -3912,7 +3913,7 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co +@@ -3914,7 +3915,7 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co ERR("Invalid location (%#x) specified.\n", location); } @@ -188,7 +189,7 @@ index 51cf4f7..8611f9c 100644 surface->ds_current_size.cx = surface->resource.width; surface->ds_current_size.cy = surface->resource.height; } -@@ -3921,7 +3922,7 @@ void surface_validate_location(struct wined3d_surface *surface, DWORD location) +@@ -3923,7 +3924,7 @@ void surface_validate_location(struct wined3d_surface *surface, DWORD location) { TRACE("surface %p, location %s.\n", surface, wined3d_debug_location(location)); @@ -197,7 +198,7 @@ index 51cf4f7..8611f9c 100644 } void surface_invalidate_location(struct wined3d_surface *surface, DWORD location) -@@ -3930,9 +3931,9 @@ void surface_invalidate_location(struct wined3d_surface *surface, DWORD location +@@ -3932,9 +3933,9 @@ void surface_invalidate_location(struct wined3d_surface *surface, DWORD location if (location & (WINED3D_LOCATION_TEXTURE_RGB | WINED3D_LOCATION_TEXTURE_SRGB)) wined3d_texture_set_dirty(surface->container); @@ -209,7 +210,7 @@ index 51cf4f7..8611f9c 100644 ERR("Surface %p does not have any up to date location.\n", surface); } -@@ -3968,7 +3969,7 @@ static void surface_copy_simple_location(struct wined3d_surface *surface, DWORD +@@ -3970,7 +3971,7 @@ static void surface_copy_simple_location(struct wined3d_surface *surface, DWORD UINT size = surface->resource.size; surface_get_memory(surface, &dst, location); @@ -218,7 +219,7 @@ index 51cf4f7..8611f9c 100644 if (dst.buffer_object) { -@@ -4001,33 +4002,33 @@ static void surface_load_sysmem(struct wined3d_surface *surface, +@@ -4003,33 +4004,33 @@ static void surface_load_sysmem(struct wined3d_surface *surface, { const struct wined3d_gl_info *gl_info = context->gl_info; @@ -258,7 +259,7 @@ index 51cf4f7..8611f9c 100644 } /* Context activation is done by the caller. */ -@@ -4067,14 +4068,14 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface, +@@ -4069,14 +4070,14 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface, if (wined3d_settings.offscreen_rendering_mode != ORM_FBO && wined3d_resource_is_offscreen(&texture->resource) @@ -275,7 +276,7 @@ index 51cf4f7..8611f9c 100644 && (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, -@@ -4090,13 +4091,13 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface, +@@ -4092,13 +4093,13 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface, return WINED3D_OK; } @@ -291,7 +292,7 @@ index 51cf4f7..8611f9c 100644 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}; -@@ -4111,7 +4112,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface, +@@ -4113,7 +4114,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface, if (srgb) { @@ -300,7 +301,7 @@ index 51cf4f7..8611f9c 100644 == WINED3D_LOCATION_TEXTURE_RGB) { /* Performance warning... */ -@@ -4122,7 +4123,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface, +@@ -4124,7 +4125,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface, } else { @@ -309,7 +310,7 @@ index 51cf4f7..8611f9c 100644 == WINED3D_LOCATION_TEXTURE_SRGB) { /* Performance warning... */ -@@ -4132,7 +4133,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface, +@@ -4134,7 +4135,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface, } } @@ -318,7 +319,7 @@ index 51cf4f7..8611f9c 100644 { WARN("Trying to load a texture from sysmem, but no simple location is valid.\n"); /* Lets hope we get it from somewhere... */ -@@ -4167,7 +4168,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface, +@@ -4169,7 +4170,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface, surface_remove_pbo(surface, gl_info); } @@ -327,7 +328,7 @@ index 51cf4f7..8611f9c 100644 if (format.convert) { /* This code is entered for texture formats which need a fixup. */ -@@ -4225,11 +4226,11 @@ static void surface_load_renderbuffer(struct wined3d_surface *surface, struct wi +@@ -4227,11 +4228,11 @@ static void surface_load_renderbuffer(struct wined3d_surface *surface, struct wi const RECT rect = {0, 0, surface->resource.width, surface->resource.height}; DWORD src_location; @@ -342,7 +343,7 @@ index 51cf4f7..8611f9c 100644 src_location = WINED3D_LOCATION_TEXTURE_SRGB; else /* surface_blt_fbo will load the source location if necessary. */ src_location = WINED3D_LOCATION_TEXTURE_RGB; -@@ -4248,12 +4249,12 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte +@@ -4250,12 +4251,12 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte if (surface->resource.usage & WINED3DUSAGE_DEPTHSTENCIL) { if (location == WINED3D_LOCATION_TEXTURE_RGB @@ -357,7 +358,7 @@ index 51cf4f7..8611f9c 100644 && surface->container->resource.draw_binding != WINED3D_LOCATION_DRAWABLE) { /* Already up to date, nothing to do. */ -@@ -4262,12 +4263,12 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte +@@ -4264,12 +4265,12 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte else { FIXME("Unimplemented copy from %s to %s for depth/stencil buffers.\n", @@ -372,7 +373,7 @@ index 51cf4f7..8611f9c 100644 { TRACE("Location already up to date.\n"); return; -@@ -4281,7 +4282,7 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte +@@ -4283,7 +4284,7 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte required_access, surface->resource.access_flags); } @@ -381,7 +382,7 @@ index 51cf4f7..8611f9c 100644 { ERR("Surface %p does not have any up to date location.\n", surface); return; -@@ -4320,7 +4321,7 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte +@@ -4322,7 +4323,7 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte surface_validate_location(surface, location); @@ -390,7 +391,7 @@ index 51cf4f7..8611f9c 100644 surface_evict_sysmem(surface); return; -@@ -5382,8 +5383,8 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC +@@ -5384,8 +5385,8 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC /* In principle this would apply to depth blits as well, but we don't * implement those in the CPU blitter at the moment. */ @@ -401,7 +402,7 @@ index 51cf4f7..8611f9c 100644 { if (scale) TRACE("Not doing sysmem blit because of scaling.\n"); -@@ -5427,8 +5428,8 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC +@@ -5429,8 +5430,8 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC { blit_op = WINED3D_BLIT_OP_COLOR_BLIT_ALPHATEST; } @@ -412,11 +413,40 @@ index 51cf4f7..8611f9c 100644 { /* Upload */ if (scale) +diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c +index fe2208c..e01c3ce 100644 +--- a/dlls/wined3d/swapchain.c ++++ b/dlls/wined3d/swapchain.c +@@ -440,20 +440,20 @@ static void wined3d_swapchain_rotate(struct wined3d_swapchain *swapchain, struct + /* Back buffer 0 is already in the draw binding. */ + tex0 = swapchain->back_buffers[0]->texture_rgb; + rb0 = surface_prev->rb_multisample; +- locations0 = surface_prev->locations; ++ locations0 = surface_prev->resource.locations; + + for (i = 1; i < swapchain->desc.backbuffer_count; ++i) + { + surface = surface_from_resource(wined3d_texture_get_sub_resource(swapchain->back_buffers[i], 0)); + +- if (!(surface->locations & supported_locations)) ++ if (!(surface->resource.locations & supported_locations)) + surface_load_location(surface, context, swapchain->back_buffers[i]->resource.draw_binding); + + swapchain->back_buffers[i - 1]->texture_rgb = swapchain->back_buffers[i]->texture_rgb; + surface_prev->rb_multisample = surface->rb_multisample; + +- surface_validate_location(surface_prev, surface->locations & supported_locations); +- surface_invalidate_location(surface_prev, ~(surface->locations & supported_locations)); ++ surface_validate_location(surface_prev, surface->resource.locations & supported_locations); ++ surface_invalidate_location(surface_prev, ~(surface->resource.locations & supported_locations)); + + surface_prev = surface; + } diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h -index 6e55345..d174690 100644 +index ca05454..3ac2100 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h -@@ -2410,7 +2410,6 @@ struct wined3d_surface +@@ -2445,7 +2445,6 @@ struct wined3d_surface const struct wined3d_surface_ops *surface_ops; struct wined3d_texture *container; void *user_memory; @@ -425,5 +455,5 @@ index 6e55345..d174690 100644 DWORD flags; -- -2.7.1 +2.9.0 diff --git a/patches/wined3d-CSMT_Main/0007-wined3d-Remove-surface_validate_location.patch b/patches/wined3d-CSMT_Main/0007-wined3d-Remove-surface_validate_location.patch index a3401ad5..dccb260b 100644 --- a/patches/wined3d-CSMT_Main/0007-wined3d-Remove-surface_validate_location.patch +++ b/patches/wined3d-CSMT_Main/0007-wined3d-Remove-surface_validate_location.patch @@ -1,4 +1,4 @@ -From 803e39eb0ca711ad7a2867bdac796cc4360c4c27 Mon Sep 17 00:00:00 2001 +From 9b4fc397ab4bcb4552bcd41bec0f43e1d94e62a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20D=C3=B6singer?= Date: Sat, 4 Jan 2014 00:53:47 +0100 Subject: wined3d: Remove surface_validate_location. @@ -7,16 +7,16 @@ Subject: wined3d: Remove surface_validate_location. dlls/wined3d/arb_program_shader.c | 2 +- dlls/wined3d/device.c | 4 ++-- dlls/wined3d/surface.c | 31 ++++++++++++------------------- - dlls/wined3d/swapchain.c | 4 ++-- + dlls/wined3d/swapchain.c | 8 ++++---- dlls/wined3d/texture.c | 4 +--- dlls/wined3d/wined3d_private.h | 1 - - 6 files changed, 18 insertions(+), 28 deletions(-) + 6 files changed, 20 insertions(+), 30 deletions(-) diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c -index e8526d8..a87b09b 100644 +index 28939c0..b0dc5ec 100644 --- a/dlls/wined3d/arb_program_shader.c +++ b/dlls/wined3d/arb_program_shader.c -@@ -7888,7 +7888,7 @@ static void arbfp_blit_surface(struct wined3d_device *device, DWORD filter, +@@ -7889,7 +7889,7 @@ static void arbfp_blit_surface(struct wined3d_device *device, enum wined3d_blit_ context_release(context); @@ -26,7 +26,7 @@ index e8526d8..a87b09b 100644 } diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c -index 2312267..c10c1fc 100644 +index c6ba266..b954698 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -398,7 +398,7 @@ void device_clear_render_targets(struct wined3d_device *device, UINT rt_count, c @@ -38,7 +38,7 @@ index 2312267..c10c1fc 100644 surface_invalidate_location(rt, ~rt->container->resource.draw_binding); } } -@@ -4047,7 +4047,7 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str +@@ -4054,7 +4054,7 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str context_release(context); @@ -48,7 +48,7 @@ index 2312267..c10c1fc 100644 } diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c -index 50282c0..4fb2578 100644 +index c7f41f7..d5c4f60 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -1158,14 +1158,14 @@ static void surface_unload(struct wined3d_resource *resource) @@ -86,7 +86,7 @@ index 50282c0..4fb2578 100644 return WINED3D_OK; } -@@ -2679,7 +2679,7 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface, +@@ -2681,7 +2681,7 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface, { TRACE("WINED3D_MAP_DISCARD flag passed, marking %s as up to date.\n", wined3d_debug_location(surface->resource.map_binding)); @@ -95,7 +95,7 @@ index 50282c0..4fb2578 100644 } else { -@@ -3167,7 +3167,7 @@ static void fb_copy_to_texture_direct(struct wined3d_surface *dst_surface, struc +@@ -3169,7 +3169,7 @@ static void fb_copy_to_texture_direct(struct wined3d_surface *dst_surface, struc /* The texture is now most up to date - If the surface is a render target * and has a drawable, this path is never entered. */ @@ -104,7 +104,7 @@ index 50282c0..4fb2578 100644 surface_invalidate_location(dst_surface, ~WINED3D_LOCATION_TEXTURE_RGB); } -@@ -3440,7 +3440,7 @@ static void fb_copy_to_texture_hwstretch(struct wined3d_surface *dst_surface, st +@@ -3442,7 +3442,7 @@ static void fb_copy_to_texture_hwstretch(struct wined3d_surface *dst_surface, st /* The texture is now most up to date - If the surface is a render target * and has a drawable, this path is never entered. */ @@ -113,7 +113,7 @@ index 50282c0..4fb2578 100644 surface_invalidate_location(dst_surface, ~WINED3D_LOCATION_TEXTURE_RGB); } -@@ -3918,13 +3918,6 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co +@@ -3920,13 +3920,6 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co surface->ds_current_size.cy = surface->resource.height; } @@ -127,7 +127,7 @@ index 50282c0..4fb2578 100644 void surface_invalidate_location(struct wined3d_surface *surface, DWORD location) { TRACE("surface %p, location %s.\n", surface, wined3d_debug_location(location)); -@@ -4319,7 +4312,7 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte +@@ -4321,7 +4314,7 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte break; } @@ -136,7 +136,7 @@ index 50282c0..4fb2578 100644 if (location != WINED3D_LOCATION_SYSMEM && (surface->resource.locations & WINED3D_LOCATION_SYSMEM)) surface_evict_sysmem(surface); -@@ -4493,7 +4486,7 @@ static void ffp_blit_blit_surface(struct wined3d_device *device, DWORD filter, +@@ -4504,7 +4497,7 @@ static void ffp_blit_blit_surface(struct wined3d_device *device, enum wined3d_bl wined3d_texture_set_color_key(src_surface->container, WINED3D_CKEY_SRC_BLT, (old_color_key_flags & WINED3D_CKEY_SRC_BLT) ? &old_blt_key : NULL); @@ -145,7 +145,7 @@ index 50282c0..4fb2578 100644 surface_invalidate_location(dst_surface, ~dst_surface->container->resource.draw_binding); } -@@ -5474,7 +5467,7 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC +@@ -5490,7 +5483,7 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC dst_surface, dst_surface->container->resource.draw_binding, &dst_rect); context_release(context); @@ -154,7 +154,7 @@ index 50282c0..4fb2578 100644 surface_invalidate_location(dst_surface, ~dst_surface->container->resource.draw_binding); return WINED3D_OK; -@@ -5564,7 +5557,7 @@ static HRESULT surface_init(struct wined3d_surface *surface, struct wined3d_text +@@ -5581,7 +5574,7 @@ static HRESULT surface_init(struct wined3d_surface *surface, struct wined3d_text } surface->container = container; @@ -163,7 +163,7 @@ index 50282c0..4fb2578 100644 list_init(&surface->renderbuffers); list_init(&surface->overlays); -@@ -5596,7 +5589,7 @@ static HRESULT surface_init(struct wined3d_surface *surface, struct wined3d_text +@@ -5613,7 +5606,7 @@ static HRESULT surface_init(struct wined3d_surface *surface, struct wined3d_text if (surface->resource.map_binding == WINED3D_LOCATION_DIB) { wined3d_resource_free_sysmem(&surface->resource); @@ -173,10 +173,28 @@ index 50282c0..4fb2578 100644 } diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c -index e45fe17..9758be4 100644 +index e01c3ce..fbe9d0e 100644 --- a/dlls/wined3d/swapchain.c +++ b/dlls/wined3d/swapchain.c -@@ -562,7 +562,7 @@ static void swapchain_gl_present(struct wined3d_swapchain *swapchain, const RECT +@@ -452,7 +452,7 @@ static void wined3d_swapchain_rotate(struct wined3d_swapchain *swapchain, struct + swapchain->back_buffers[i - 1]->texture_rgb = swapchain->back_buffers[i]->texture_rgb; + surface_prev->rb_multisample = surface->rb_multisample; + +- surface_validate_location(surface_prev, surface->resource.locations & supported_locations); ++ wined3d_resource_validate_location(&surface_prev->resource, surface->resource.locations & supported_locations); + surface_invalidate_location(surface_prev, ~(surface->resource.locations & supported_locations)); + + surface_prev = surface; +@@ -461,7 +461,7 @@ static void wined3d_swapchain_rotate(struct wined3d_swapchain *swapchain, struct + swapchain->back_buffers[i - 1]->texture_rgb = tex0; + surface_prev->rb_multisample = rb0; + +- surface_validate_location(surface_prev, locations0 & supported_locations); ++ wined3d_resource_validate_location(&surface_prev->resource, locations0 & supported_locations); + surface_invalidate_location(surface_prev, ~(locations0 & supported_locations)); + + device_invalidate_state(swapchain->device, STATE_FRAMEBUFFER); +@@ -617,7 +617,7 @@ static void swapchain_gl_present(struct wined3d_swapchain *swapchain, const RECT front = surface_from_resource(wined3d_texture_get_sub_resource(swapchain->front_buffer, 0)); @@ -185,7 +203,7 @@ index e45fe17..9758be4 100644 surface_invalidate_location(front, ~WINED3D_LOCATION_DRAWABLE); /* If the swapeffect is DISCARD, the back buffer is undefined. That means the SYSMEM * and INTEXTURE copies can keep their old content if they have any defined content. -@@ -835,7 +835,7 @@ static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, struct wined3 +@@ -890,7 +890,7 @@ static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, struct wined3 front_buffer = surface_from_resource(wined3d_texture_get_sub_resource(swapchain->front_buffer, 0)); if (!(device->wined3d->flags & WINED3D_NO3D)) { @@ -210,10 +228,10 @@ index 0f40a3c..6b41db8 100644 static void texture2d_sub_resource_upload_data(struct wined3d_resource *sub_resource, diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h -index 87cd0d0..3848e76 100644 +index 3ac2100..1ca98d9 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h -@@ -2477,7 +2477,6 @@ HRESULT wined3d_surface_update_desc(struct wined3d_surface *surface, +@@ -2515,7 +2515,6 @@ HRESULT wined3d_surface_update_desc(struct wined3d_surface *surface, const struct wined3d_gl_info *gl_info, void *mem, unsigned int pitch) DECLSPEC_HIDDEN; HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const POINT *dst_point, struct wined3d_surface *src_surface, const RECT *src_rect) DECLSPEC_HIDDEN; @@ -222,5 +240,5 @@ index 87cd0d0..3848e76 100644 GLenum target, unsigned int level, unsigned int layer, DWORD flags, struct wined3d_surface **surface) DECLSPEC_HIDDEN; -- -2.6.2 +2.9.0 diff --git a/patches/wined3d-CSMT_Main/0010-wined3d-Remove-surface_invalidate_location.patch b/patches/wined3d-CSMT_Main/0010-wined3d-Remove-surface_invalidate_location.patch index 3aafbdef..16f397cd 100644 --- a/patches/wined3d-CSMT_Main/0010-wined3d-Remove-surface_invalidate_location.patch +++ b/patches/wined3d-CSMT_Main/0010-wined3d-Remove-surface_invalidate_location.patch @@ -1,4 +1,4 @@ -From c1235a5f6ed86eefc1b797df0836a1b61d6fceb7 Mon Sep 17 00:00:00 2001 +From a35225217b4b22ce82f9ac34acde9876f62bbf47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20D=C3=B6singer?= Date: Sat, 4 Jan 2014 01:02:15 +0100 Subject: wined3d: Remove surface_invalidate_location. @@ -9,16 +9,16 @@ Subject: wined3d: Remove surface_invalidate_location. dlls/wined3d/device.c | 4 ++-- dlls/wined3d/drawprim.c | 2 +- dlls/wined3d/surface.c | 47 ++++++++++++++++----------------------- - dlls/wined3d/swapchain.c | 6 ++--- + dlls/wined3d/swapchain.c | 10 ++++----- dlls/wined3d/texture.c | 6 ++--- dlls/wined3d/wined3d_private.h | 1 - - 8 files changed, 29 insertions(+), 41 deletions(-) + 8 files changed, 31 insertions(+), 43 deletions(-) diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c -index a87b09b..4df6e2f 100644 +index b0dc5ec..6cb059a 100644 --- a/dlls/wined3d/arb_program_shader.c +++ b/dlls/wined3d/arb_program_shader.c -@@ -7889,7 +7889,7 @@ static void arbfp_blit_surface(struct wined3d_device *device, DWORD filter, +@@ -7890,7 +7890,7 @@ static void arbfp_blit_surface(struct wined3d_device *device, enum wined3d_blit_ context_release(context); wined3d_resource_validate_location(&dst_surface->resource, dst_surface->container->resource.draw_binding); @@ -28,10 +28,10 @@ index a87b09b..4df6e2f 100644 static HRESULT arbfp_blit_color_fill(struct wined3d_device *device, struct wined3d_surface *dst_surface, diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c -index 1e357e7..230946d 100644 +index a15aad2..a303aa6 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c -@@ -3311,7 +3311,7 @@ static void context_setup_target(struct wined3d_context *context, struct wined3d +@@ -3280,7 +3280,7 @@ static void context_setup_target(struct wined3d_context *context, struct wined3d if (texture->texture_srgb.name) wined3d_texture_load(texture, context, TRUE); wined3d_texture_load(texture, context, FALSE); @@ -41,7 +41,7 @@ index 1e357e7..230946d 100644 } diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c -index 58edac3..143cf9c 100644 +index 1dd03a6..817cb57 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -399,7 +399,7 @@ void device_clear_render_targets(struct wined3d_device *device, UINT rt_count, c @@ -53,7 +53,7 @@ index 58edac3..143cf9c 100644 } } -@@ -4048,7 +4048,7 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str +@@ -4055,7 +4055,7 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str context_release(context); wined3d_resource_validate_location(&surface->resource, WINED3D_LOCATION_TEXTURE_RGB); @@ -76,7 +76,7 @@ index 943a829..95245a9 100644 else { diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c -index ad43381..7c0594f 100644 +index 5701426..ffa021e 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -599,7 +599,7 @@ static void surface_evict_sysmem(struct wined3d_surface *surface) @@ -143,7 +143,7 @@ index ad43381..7c0594f 100644 return WINED3D_OK; } -@@ -2702,7 +2705,7 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface, +@@ -2704,7 +2707,7 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface, } if (!(flags & (WINED3D_MAP_NO_DIRTY_UPDATE | WINED3D_MAP_READONLY))) @@ -152,7 +152,7 @@ index ad43381..7c0594f 100644 switch (surface->resource.map_binding) { -@@ -2818,7 +2821,7 @@ HRESULT CDECL wined3d_surface_getdc(struct wined3d_surface *surface, HDC *dc) +@@ -2820,7 +2823,7 @@ HRESULT CDECL wined3d_surface_getdc(struct wined3d_surface *surface, HDC *dc) } surface_load_location(surface, context, WINED3D_LOCATION_DIB); @@ -161,7 +161,7 @@ index ad43381..7c0594f 100644 if (context) context_release(context); -@@ -2867,7 +2870,7 @@ HRESULT CDECL wined3d_surface_releasedc(struct wined3d_surface *surface, HDC dc) +@@ -2869,7 +2872,7 @@ HRESULT CDECL wined3d_surface_releasedc(struct wined3d_surface *surface, HDC dc) context = context_acquire(device, NULL); surface_load_location(surface, context, surface->resource.map_binding); @@ -170,7 +170,7 @@ index ad43381..7c0594f 100644 if (context) context_release(context); } -@@ -3174,7 +3177,7 @@ static void fb_copy_to_texture_direct(struct wined3d_surface *dst_surface, struc +@@ -3176,7 +3179,7 @@ static void fb_copy_to_texture_direct(struct wined3d_surface *dst_surface, struc /* The texture is now most up to date - If the surface is a render target * and has a drawable, this path is never entered. */ wined3d_resource_validate_location(&dst_surface->resource, WINED3D_LOCATION_TEXTURE_RGB); @@ -179,7 +179,7 @@ index ad43381..7c0594f 100644 } /* Uses the hardware to stretch and flip the image */ -@@ -3242,7 +3245,7 @@ static void fb_copy_to_texture_hwstretch(struct wined3d_surface *dst_surface, st +@@ -3244,7 +3247,7 @@ static void fb_copy_to_texture_hwstretch(struct wined3d_surface *dst_surface, st checkGLcall("glEnable(texture_target)"); /* For now invalidate the texture copy of the back buffer. Drawable and sysmem copy are untouched */ @@ -188,7 +188,7 @@ index ad43381..7c0594f 100644 } /* Make sure that the top pixel is always above the bottom pixel, and keep a separate upside down flag -@@ -3447,7 +3450,7 @@ static void fb_copy_to_texture_hwstretch(struct wined3d_surface *dst_surface, st +@@ -3449,7 +3452,7 @@ static void fb_copy_to_texture_hwstretch(struct wined3d_surface *dst_surface, st /* The texture is now most up to date - If the surface is a render target * and has a drawable, this path is never entered. */ wined3d_resource_validate_location(&dst_surface->resource, WINED3D_LOCATION_TEXTURE_RGB); @@ -197,7 +197,7 @@ index ad43381..7c0594f 100644 } /* Front buffer coordinates are always full screen coordinates, but our GL -@@ -3924,18 +3927,6 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co +@@ -3926,18 +3929,6 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co surface->ds_current_size.cy = surface->resource.height; } @@ -216,7 +216,7 @@ index ad43381..7c0594f 100644 static DWORD resource_access_from_location(DWORD location) { switch (location) -@@ -4493,7 +4484,7 @@ static void ffp_blit_blit_surface(struct wined3d_device *device, DWORD filter, +@@ -4504,7 +4495,7 @@ static void ffp_blit_blit_surface(struct wined3d_device *device, enum wined3d_bl (old_color_key_flags & WINED3D_CKEY_SRC_BLT) ? &old_blt_key : NULL); wined3d_resource_validate_location(&dst_surface->resource, dst_surface->container->resource.draw_binding); @@ -225,7 +225,7 @@ index ad43381..7c0594f 100644 } const struct blit_shader ffp_blit = { -@@ -5474,7 +5465,7 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC +@@ -5490,7 +5481,7 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC context_release(context); wined3d_resource_validate_location(&dst_surface->resource, dst_surface->container->resource.draw_binding); @@ -234,7 +234,7 @@ index ad43381..7c0594f 100644 return WINED3D_OK; } -@@ -5596,7 +5587,7 @@ static HRESULT surface_init(struct wined3d_surface *surface, struct wined3d_text +@@ -5613,7 +5604,7 @@ static HRESULT surface_init(struct wined3d_surface *surface, struct wined3d_text { wined3d_resource_free_sysmem(&surface->resource); wined3d_resource_validate_location(&surface->resource, WINED3D_LOCATION_DIB); @@ -244,10 +244,28 @@ index ad43381..7c0594f 100644 return hr; diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c -index 9758be4..4e50ef9 100644 +index fbe9d0e..f31db5c 100644 --- a/dlls/wined3d/swapchain.c +++ b/dlls/wined3d/swapchain.c -@@ -518,7 +518,7 @@ static void swapchain_gl_present(struct wined3d_swapchain *swapchain, const RECT +@@ -453,7 +453,7 @@ static void wined3d_swapchain_rotate(struct wined3d_swapchain *swapchain, struct + surface_prev->rb_multisample = surface->rb_multisample; + + wined3d_resource_validate_location(&surface_prev->resource, surface->resource.locations & supported_locations); +- surface_invalidate_location(surface_prev, ~(surface->resource.locations & supported_locations)); ++ wined3d_resource_invalidate_location(&surface_prev->resource, ~(surface->resource.locations & supported_locations)); + + surface_prev = surface; + } +@@ -462,7 +462,7 @@ static void wined3d_swapchain_rotate(struct wined3d_swapchain *swapchain, struct + surface_prev->rb_multisample = rb0; + + wined3d_resource_validate_location(&surface_prev->resource, locations0 & supported_locations); +- surface_invalidate_location(surface_prev, ~(locations0 & supported_locations)); ++ wined3d_resource_invalidate_location(&surface_prev->resource, ~(locations0 & supported_locations)); + + device_invalidate_state(swapchain->device, STATE_FRAMEBUFFER); + } +@@ -571,7 +571,7 @@ static void swapchain_gl_present(struct wined3d_swapchain *swapchain, const RECT if (!swapchain->render_to_fbo && render_to_fbo && wined3d_settings.offscreen_rendering_mode == ORM_FBO) { surface_load_location(back_buffer, context, WINED3D_LOCATION_TEXTURE_RGB); @@ -256,7 +274,7 @@ index 9758be4..4e50ef9 100644 swapchain->render_to_fbo = TRUE; swapchain_update_draw_bindings(swapchain); } -@@ -563,7 +563,7 @@ static void swapchain_gl_present(struct wined3d_swapchain *swapchain, const RECT +@@ -618,7 +618,7 @@ static void swapchain_gl_present(struct wined3d_swapchain *swapchain, const RECT front = surface_from_resource(wined3d_texture_get_sub_resource(swapchain->front_buffer, 0)); wined3d_resource_validate_location(&front->resource, WINED3D_LOCATION_DRAWABLE); @@ -265,7 +283,7 @@ index 9758be4..4e50ef9 100644 /* If the swapeffect is DISCARD, the back buffer is undefined. That means the SYSMEM * and INTEXTURE copies can keep their old content if they have any defined content. * If the swapeffect is COPY, the content remains the same. -@@ -836,7 +836,7 @@ static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, struct wined3 +@@ -891,7 +891,7 @@ static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, struct wined3 if (!(device->wined3d->flags & WINED3D_NO3D)) { wined3d_resource_validate_location(&front_buffer->resource, WINED3D_LOCATION_DRAWABLE); @@ -299,10 +317,10 @@ index 7e31832..be378fc 100644 static void texture2d_sub_resource_validate_location(struct wined3d_resource *sub_resource, DWORD location) diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h -index ed013a9..54f95e3 100644 +index 5c5c21b..a60e759 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h -@@ -2458,7 +2458,6 @@ HRESULT surface_color_fill(struct wined3d_surface *s, +@@ -2496,7 +2496,6 @@ HRESULT surface_color_fill(struct wined3d_surface *s, GLenum surface_get_gl_buffer(const struct wined3d_surface *surface) DECLSPEC_HIDDEN; void surface_get_drawable_size(const struct wined3d_surface *surface, const struct wined3d_context *context, unsigned int *width, unsigned int *height) DECLSPEC_HIDDEN; @@ -311,5 +329,5 @@ index ed013a9..54f95e3 100644 void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_context *context, DWORD location) DECLSPEC_HIDDEN; -- -2.6.2 +2.9.0 diff --git a/patches/wined3d-CSMT_Main/0013-wined3d-Replace-surface_load_location-with-resource_.patch b/patches/wined3d-CSMT_Main/0013-wined3d-Replace-surface_load_location-with-resource_.patch index 208e626b..a052c71c 100644 --- a/patches/wined3d-CSMT_Main/0013-wined3d-Replace-surface_load_location-with-resource_.patch +++ b/patches/wined3d-CSMT_Main/0013-wined3d-Replace-surface_load_location-with-resource_.patch @@ -1,4 +1,4 @@ -From b26629e64f25b8a3a431f7b784fc4d70d1539c48 Mon Sep 17 00:00:00 2001 +From 35d0f8966363273f5112223ad3a9231181c92e25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20D=C3=B6singer?= Date: Sun, 17 Nov 2013 20:33:17 +0100 Subject: wined3d: Replace surface_load_location with resource_load_location. @@ -9,16 +9,16 @@ FIXME: Check if this patch is complete enough to make sense. dlls/wined3d/device.c | 4 +- dlls/wined3d/drawprim.c | 2 +- dlls/wined3d/surface.c | 115 +++++++++++++---------------------------- - dlls/wined3d/swapchain.c | 8 +-- + dlls/wined3d/swapchain.c | 10 ++-- dlls/wined3d/texture.c | 2 +- dlls/wined3d/wined3d_private.h | 2 - - 7 files changed, 46 insertions(+), 89 deletions(-) + 7 files changed, 47 insertions(+), 90 deletions(-) diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c -index 52fb407..15a2dc3 100644 +index a303aa6..93cc08a 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c -@@ -2287,7 +2287,7 @@ static void context_validate_onscreen_formats(struct wined3d_context *context, +@@ -2261,7 +2261,7 @@ static void context_validate_onscreen_formats(struct wined3d_context *context, WARN("Depth stencil format is not supported by WGL, rendering the backbuffer in an FBO\n"); /* The currently active context is the necessary context to access the swapchain's onscreen buffers */ @@ -28,10 +28,10 @@ index 52fb407..15a2dc3 100644 swapchain_update_draw_bindings(swapchain); context_set_render_offscreen(context, TRUE); diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c -index 77ea1e9..367dc22 100644 +index 817cb57..21e826c 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c -@@ -323,7 +323,7 @@ void device_clear_render_targets(struct wined3d_device *device, UINT rt_count, c +@@ -324,7 +324,7 @@ void device_clear_render_targets(struct wined3d_device *device, UINT rt_count, c if (rt && rt->resource.format->id != WINED3DFMT_NULL) { if (flags & WINED3DCLEAR_TARGET && !is_full_clear(target, draw_rect, clear_rect)) @@ -40,7 +40,7 @@ index 77ea1e9..367dc22 100644 else wined3d_surface_prepare(rt, context, rt->container->resource.draw_binding); } -@@ -4010,7 +4010,7 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str +@@ -4046,7 +4046,7 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str && src_rect.bottom == sub_resource->height) wined3d_texture_prepare_texture(texture, context, FALSE); else @@ -63,7 +63,7 @@ index 95245a9..4b01b7d 100644 } else diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c -index 9aff2f2..421b1ed 100644 +index 51079b2..f2bb078 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -759,7 +759,7 @@ static void surface_unmap(struct wined3d_surface *surface) @@ -99,7 +99,7 @@ index 9aff2f2..421b1ed 100644 else wined3d_surface_prepare(dst_surface, old_ctx, dst_location); -@@ -1178,7 +1178,7 @@ static void surface_unload(struct wined3d_resource *resource) +@@ -1172,7 +1172,7 @@ static void surface_unload(struct wined3d_resource *resource) else { surface_prepare_map_memory(surface); @@ -108,7 +108,7 @@ index 9aff2f2..421b1ed 100644 wined3d_resource_invalidate_location(&surface->resource, ~surface->resource.map_binding); } -@@ -1236,24 +1236,6 @@ static void wined3d_surface_location_invalidated(struct wined3d_resource *resour +@@ -1230,24 +1230,6 @@ static void wined3d_surface_location_invalidated(struct wined3d_resource *resour wined3d_texture_set_dirty(surface->container); } @@ -133,7 +133,7 @@ index 9aff2f2..421b1ed 100644 static const struct wined3d_surface_ops surface_ops = { surface_private_setup, -@@ -1707,7 +1689,7 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P +@@ -1701,7 +1683,7 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P if (update_w == dst_w && update_h == dst_h) wined3d_texture_prepare_texture(dst_surface->container, context, FALSE); else @@ -142,7 +142,7 @@ index 9aff2f2..421b1ed 100644 wined3d_texture_bind_and_dirtify(dst_surface->container, context, FALSE); surface_get_memory(src_surface, &data, src_surface->resource.locations); -@@ -1840,7 +1822,7 @@ void surface_load(struct wined3d_surface *surface, struct wined3d_context *conte +@@ -1834,7 +1816,7 @@ void surface_load(struct wined3d_surface *surface, struct wined3d_context *conte } TRACE("Reloading because surface is dirty.\n"); @@ -151,7 +151,7 @@ index 9aff2f2..421b1ed 100644 surface_evict_sysmem(surface); } -@@ -2729,7 +2711,7 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface, +@@ -2709,7 +2691,7 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface, if (surface->resource.device->d3d_initialized) context = context_acquire(surface->resource.device, NULL); @@ -160,7 +160,7 @@ index 9aff2f2..421b1ed 100644 if (context) context_release(context); } -@@ -2834,7 +2816,7 @@ HRESULT CDECL wined3d_surface_getdc(struct wined3d_surface *surface, HDC *dc) +@@ -2814,7 +2796,7 @@ HRESULT CDECL wined3d_surface_getdc(struct wined3d_surface *surface, HDC *dc) { if (surface->flags & SFLAG_CLIENT) { @@ -169,7 +169,7 @@ index 9aff2f2..421b1ed 100644 surface_release_client_storage(surface); } hr = surface_create_dib_section(surface); -@@ -2850,7 +2832,7 @@ HRESULT CDECL wined3d_surface_getdc(struct wined3d_surface *surface, HDC *dc) +@@ -2830,7 +2812,7 @@ HRESULT CDECL wined3d_surface_getdc(struct wined3d_surface *surface, HDC *dc) surface->resource.map_binding = WINED3D_LOCATION_DIB; } @@ -178,7 +178,7 @@ index 9aff2f2..421b1ed 100644 wined3d_resource_invalidate_location(&surface->resource, ~WINED3D_LOCATION_DIB); if (context) -@@ -2899,7 +2881,7 @@ HRESULT CDECL wined3d_surface_releasedc(struct wined3d_surface *surface, HDC dc) +@@ -2879,7 +2861,7 @@ HRESULT CDECL wined3d_surface_releasedc(struct wined3d_surface *surface, HDC dc) if (device->d3d_initialized) context = context_acquire(device, NULL); @@ -187,7 +187,7 @@ index 9aff2f2..421b1ed 100644 wined3d_resource_invalidate_location(&surface->resource, WINED3D_LOCATION_DIB); if (context) context_release(context); -@@ -3536,8 +3518,8 @@ static void surface_blt_to_drawable(const struct wined3d_device *device, +@@ -3516,8 +3498,8 @@ static void surface_blt_to_drawable(const struct wined3d_device *device, gl_info = context->gl_info; /* Make sure the surface is up-to-date. This should probably use @@ -198,7 +198,7 @@ index 9aff2f2..421b1ed 100644 wined3d_texture_load(src_surface->container, context, FALSE); /* Activate the destination context, set it up for blitting */ -@@ -3957,29 +3939,6 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co +@@ -3937,29 +3919,6 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co surface->ds_current_size.cy = surface->resource.height; } @@ -228,7 +228,7 @@ index 9aff2f2..421b1ed 100644 static void surface_copy_simple_location(struct wined3d_surface *surface, DWORD location) { struct wined3d_device *device = surface->resource.device; -@@ -4029,7 +3988,7 @@ static void surface_load_sysmem(struct wined3d_surface *surface, +@@ -4009,7 +3968,7 @@ static void surface_load_sysmem(struct wined3d_surface *surface, } if (surface->resource.locations & (WINED3D_LOCATION_RB_MULTISAMPLE | WINED3D_LOCATION_RB_RESOLVED)) @@ -237,7 +237,7 @@ index 9aff2f2..421b1ed 100644 /* Download the surface to system memory. */ if (surface->resource.locations & (WINED3D_LOCATION_TEXTURE_RGB | WINED3D_LOCATION_TEXTURE_SRGB)) -@@ -4065,7 +4024,7 @@ static HRESULT surface_load_drawable(struct wined3d_surface *surface, +@@ -4045,7 +4004,7 @@ static HRESULT surface_load_drawable(struct wined3d_surface *surface, } surface_get_rect(surface, NULL, &r); @@ -246,7 +246,7 @@ index 9aff2f2..421b1ed 100644 surface_blt_to_drawable(surface->resource.device, context, WINED3D_TEXF_POINT, FALSE, surface, &r, surface, &r); -@@ -4138,7 +4097,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface, +@@ -4118,7 +4077,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface, /* Performance warning... */ FIXME("Downloading RGB surface %p to reload it as sRGB.\n", surface); surface_prepare_map_memory(surface); @@ -255,7 +255,7 @@ index 9aff2f2..421b1ed 100644 } } else -@@ -4149,7 +4108,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface, +@@ -4129,7 +4088,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface, /* Performance warning... */ FIXME("Downloading sRGB surface %p to reload it as RGB.\n", surface); surface_prepare_map_memory(surface); @@ -264,7 +264,7 @@ index 9aff2f2..421b1ed 100644 } } -@@ -4158,7 +4117,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface, +@@ -4138,7 +4097,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface, WARN("Trying to load a texture from sysmem, but no simple location is valid.\n"); /* Lets hope we get it from somewhere... */ surface_prepare_system_memory(surface); @@ -273,7 +273,7 @@ index 9aff2f2..421b1ed 100644 } wined3d_texture_prepare_texture(texture, context, srgb); -@@ -4184,7 +4143,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface, +@@ -4164,7 +4123,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface, surface->resource.map_binding = WINED3D_LOCATION_SYSMEM; surface_prepare_map_memory(surface); @@ -282,7 +282,7 @@ index 9aff2f2..421b1ed 100644 surface_remove_pbo(surface, gl_info); } -@@ -4259,9 +4218,11 @@ static void surface_load_renderbuffer(struct wined3d_surface *surface, struct wi +@@ -4239,9 +4198,11 @@ static void surface_load_renderbuffer(struct wined3d_surface *surface, struct wi surface, src_location, &rect, surface, dst_location, &rect); } @@ -296,7 +296,7 @@ index 9aff2f2..421b1ed 100644 HRESULT hr; TRACE("surface %p, location %s.\n", surface, wined3d_debug_location(location)); -@@ -4288,20 +4249,6 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte +@@ -4268,20 +4229,6 @@ void surface_load_location(struct wined3d_surface *surface, struct wined3d_conte } } @@ -317,7 +317,7 @@ index 9aff2f2..421b1ed 100644 if (!surface->resource.locations) { ERR("Surface %p does not have any up to date location.\n", surface); -@@ -5452,7 +5399,8 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC +@@ -5445,7 +5392,8 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC if (!wined3d_resource_is_offscreen(&dst_surface->container->resource)) { struct wined3d_context *context = context_acquire(device, dst_surface); @@ -327,7 +327,7 @@ index 9aff2f2..421b1ed 100644 context_release(context); } return WINED3D_OK; -@@ -5525,6 +5473,17 @@ cpu: +@@ -5519,6 +5467,17 @@ cpu: return surface_cpu_blt(dst_surface, &dst_rect, src_surface, &src_rect, flags, fx, filter); } @@ -346,7 +346,7 @@ index 9aff2f2..421b1ed 100644 const struct wined3d_resource_desc *desc, GLenum target, unsigned int level, unsigned int layer, DWORD flags) { diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c -index e87a209..b9bf4c1 100644 +index 4ca9ac0..75aece5 100644 --- a/dlls/wined3d/swapchain.c +++ b/dlls/wined3d/swapchain.c @@ -315,7 +315,7 @@ static void swapchain_blit(const struct wined3d_swapchain *swapchain, @@ -358,7 +358,16 @@ index e87a209..b9bf4c1 100644 } context_apply_fbo_state_blit(context, GL_READ_FRAMEBUFFER, backbuffer, NULL, location); -@@ -517,14 +517,14 @@ static void swapchain_gl_present(struct wined3d_swapchain *swapchain, const RECT +@@ -447,7 +447,7 @@ static void wined3d_swapchain_rotate(struct wined3d_swapchain *swapchain, struct + surface = surface_from_resource(wined3d_texture_get_sub_resource(swapchain->back_buffers[i], 0)); + + if (!(surface->resource.locations & supported_locations)) +- surface_load_location(surface, context, swapchain->back_buffers[i]->resource.draw_binding); ++ wined3d_resource_load_location(&surface->resource, context, swapchain->back_buffers[i]->resource.draw_binding); + + swapchain->back_buffers[i - 1]->texture_rgb = swapchain->back_buffers[i]->texture_rgb; + surface_prev->rb_multisample = surface->rb_multisample; +@@ -570,14 +570,14 @@ static void swapchain_gl_present(struct wined3d_swapchain *swapchain, const RECT */ if (!swapchain->render_to_fbo && render_to_fbo && wined3d_settings.offscreen_rendering_mode == ORM_FBO) { @@ -375,7 +384,7 @@ index e87a209..b9bf4c1 100644 } if (swapchain->render_to_fbo) -@@ -617,7 +617,7 @@ void x11_copy_to_screen(const struct wined3d_swapchain *swapchain, const RECT *r +@@ -672,7 +672,7 @@ void x11_copy_to_screen(const struct wined3d_swapchain *swapchain, const RECT *r TRACE("Copying surface %p to screen.\n", front); @@ -398,10 +407,10 @@ index 2a183e8..29c7eec 100644 wined3d_resource_invalidate_location(&surface->resource, ~surface->resource.map_binding); } diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h -index 031e684..879d5f0 100644 +index ddf264f..a5826fc 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h -@@ -2466,8 +2466,6 @@ void surface_load_ds_location(struct wined3d_surface *surface, +@@ -2504,8 +2504,6 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_context *context, DWORD location) DECLSPEC_HIDDEN; void surface_load_fb_texture(struct wined3d_surface *surface, BOOL srgb, struct wined3d_context *context) DECLSPEC_HIDDEN; @@ -411,5 +420,5 @@ index 031e684..879d5f0 100644 void wined3d_surface_prepare(struct wined3d_surface *surface, struct wined3d_context *context, DWORD location) DECLSPEC_HIDDEN; -- -2.6.2 +2.9.0 diff --git a/patches/wined3d-CSMT_Main/0042-wined3d-Wait-for-resource-updates-to-finish-when-usi.patch b/patches/wined3d-CSMT_Main/0042-wined3d-Wait-for-resource-updates-to-finish-when-usi.patch index e054710b..06e22250 100644 --- a/patches/wined3d-CSMT_Main/0042-wined3d-Wait-for-resource-updates-to-finish-when-usi.patch +++ b/patches/wined3d-CSMT_Main/0042-wined3d-Wait-for-resource-updates-to-finish-when-usi.patch @@ -1,4 +1,4 @@ -From ff3ebefd7ff7834c3c1a7c9b7998592929e40714 Mon Sep 17 00:00:00 2001 +From 78da4f942d2333cdba91422de082ef8033c6bb7b Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Sat, 8 Dec 2012 19:28:54 +0100 Subject: wined3d: Wait for resource updates to finish when using the @@ -17,10 +17,10 @@ then it's probably useful for debugging. 6 files changed, 40 insertions(+), 13 deletions(-) diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c -index 9f29aa4..59c3409 100644 +index 582ab34..1b51450 100644 --- a/dlls/wined3d/arb_program_shader.c +++ b/dlls/wined3d/arb_program_shader.c -@@ -7679,7 +7679,9 @@ HRESULT arbfp_blit_surface(struct wined3d_device *device, DWORD filter, +@@ -7882,7 +7882,9 @@ static void arbfp_blit_surface(struct wined3d_device *device, enum wined3d_blit_ /* Leave the opengl state valid for blitting */ arbfp_blit_unset(context->gl_info); @@ -32,7 +32,7 @@ index 9f29aa4..59c3409 100644 && (dst_surface->container->swapchain->front_buffer == dst_surface->container))) context->gl_info->gl_ops.gl.p_glFlush(); /* Flush to ensure ordering across contexts. */ diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c -index 3de580e..41bc6f0 100644 +index 536022c..47add48 100644 --- a/dlls/wined3d/buffer.c +++ b/dlls/wined3d/buffer.c @@ -1100,7 +1100,9 @@ void CDECL wined3d_buffer_unmap(struct wined3d_buffer *buffer) @@ -47,10 +47,10 @@ index 3de580e..41bc6f0 100644 context_release(context); diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c -index e33d0c0..b9935e0 100644 +index 3ac5921..8db1ba5 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c -@@ -463,7 +463,9 @@ void device_clear_render_targets(struct wined3d_device *device, UINT rt_count, c +@@ -497,7 +497,9 @@ void device_clear_render_targets(struct wined3d_device *device, UINT rt_count, c } } @@ -61,7 +61,7 @@ index e33d0c0..b9935e0 100644 && target->container->swapchain && target->container->swapchain->front_buffer == target->container)) gl_info->gl_ops.gl.p_glFlush(); /* Flush to ensure ordering across contexts. */ -@@ -3247,7 +3249,10 @@ HRESULT CDECL wined3d_device_end_scene(struct wined3d_device *device) +@@ -3301,7 +3303,10 @@ HRESULT CDECL wined3d_device_end_scene(struct wined3d_device *device) context = context_acquire(device, NULL); /* We only have to do this if we need to read the, swapbuffers performs a flush for us */ @@ -74,10 +74,10 @@ index e33d0c0..b9935e0 100644 * fails. */ context_release(context); diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c -index 98261f9..d3a9e03 100644 +index 7e3a7f7..af51dfd 100644 --- a/dlls/wined3d/drawprim.c +++ b/dlls/wined3d/drawprim.c -@@ -781,7 +781,9 @@ void draw_primitive(struct wined3d_device *device, UINT start_idx, UINT index_co +@@ -796,7 +796,9 @@ void draw_primitive(struct wined3d_device *device, UINT start_idx, UINT index_co wined3d_event_query_issue(context->buffer_queries[i], device); } @@ -89,10 +89,10 @@ index 98261f9..d3a9e03 100644 context_release(context); diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c -index 1aafda1..caf9618 100644 +index 32adefc..59f40bc 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c -@@ -687,7 +687,9 @@ static void surface_depth_blt_fbo(const struct wined3d_device *device, +@@ -689,7 +689,9 @@ static void surface_depth_blt_fbo(const struct wined3d_device *device, dst_rect->left, dst_rect->top, dst_rect->right, dst_rect->bottom, gl_mask, GL_NEAREST); checkGLcall("glBlitFramebuffer()"); @@ -114,7 +114,7 @@ index 1aafda1..caf9618 100644 || (dst_location == WINED3D_LOCATION_DRAWABLE && dst_surface->container->swapchain->front_buffer == dst_surface->container)) gl_info->gl_ops.gl.p_glFlush(); -@@ -1393,7 +1397,9 @@ void wined3d_surface_upload_data(struct wined3d_surface *surface, const struct w +@@ -1334,7 +1338,9 @@ void wined3d_surface_upload_data(struct wined3d_surface *surface, const struct w checkGLcall("glBindBuffer"); } @@ -125,7 +125,7 @@ index 1aafda1..caf9618 100644 gl_info->gl_ops.gl.p_glFlush(); if (gl_info->quirks & WINED3D_QUIRK_FBO_TEX_UPDATE) -@@ -3337,7 +3343,9 @@ static void fb_copy_to_texture_hwstretch(struct wined3d_surface *dst_surface, st +@@ -3125,7 +3131,9 @@ static void fb_copy_to_texture_hwstretch(struct wined3d_surface *dst_surface, st checkGLcall("glDeleteTextures(1, &backup)"); } @@ -136,7 +136,7 @@ index 1aafda1..caf9618 100644 gl_info->gl_ops.gl.p_glFlush(); /* Flush to ensure ordering across contexts. */ context_release(context); -@@ -3452,7 +3460,9 @@ static void surface_blt_to_drawable(const struct wined3d_device *device, +@@ -3233,7 +3241,9 @@ static void surface_blt_to_drawable(const struct wined3d_device *device, /* Leave the opengl state valid for blitting */ device->blitter->unset_shader(context->gl_info); @@ -147,7 +147,7 @@ index 1aafda1..caf9618 100644 || (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. */ -@@ -3873,7 +3883,9 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co +@@ -3581,7 +3591,9 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co context_invalidate_state(context, STATE_FRAMEBUFFER); @@ -158,7 +158,7 @@ index 1aafda1..caf9618 100644 gl_info->gl_ops.gl.p_glFlush(); /* Flush to ensure ordering across contexts. */ } else if (location == WINED3D_LOCATION_DRAWABLE) -@@ -3889,7 +3901,9 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co +@@ -3597,7 +3609,9 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co context_invalidate_state(context, STATE_FRAMEBUFFER); @@ -170,10 +170,10 @@ index 1aafda1..caf9618 100644 } else diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c -index ed2964e..60504ef 100644 +index 8df0a77..00d9f6c 100644 --- a/dlls/wined3d/swapchain.c +++ b/dlls/wined3d/swapchain.c -@@ -531,8 +531,10 @@ static void swapchain_gl_present(struct wined3d_swapchain *swapchain, const RECT +@@ -590,8 +590,10 @@ static void swapchain_gl_present(struct wined3d_swapchain *swapchain, const RECT swapchain_blit(swapchain, context, &src_rect, &dst_rect); } @@ -184,7 +184,7 @@ index ed2964e..60504ef 100644 + gl_info->gl_ops.gl.p_glFlush(); /* call wglSwapBuffers through the gl table to avoid confusing the Steam overlay */ - gl_info->gl_ops.wgl.p_wglSwapBuffers(context->hdc); /* TODO: cycle through the swapchain buffers */ + gl_info->gl_ops.wgl.p_wglSwapBuffers(context->hdc); -- -2.2.1 +2.9.0 diff --git a/patches/wined3d-CSMT_Main/9999-IfDefined.patch b/patches/wined3d-CSMT_Main/9999-IfDefined.patch index 16cd70e9..078c566c 100644 --- a/patches/wined3d-CSMT_Main/9999-IfDefined.patch +++ b/patches/wined3d-CSMT_Main/9999-IfDefined.patch @@ -3720,7 +3720,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c -@@ -5623,9 +5623,15 @@ +@@ -5632,9 +5632,15 @@ DebugBreak(); } @@ -7681,17 +7681,57 @@ diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c } context_apply_fbo_state_blit(context, GL_READ_FRAMEBUFFER, backbuffer, NULL, location); -@@ -428,11 +432,19 @@ - } - - static void swapchain_gl_present(struct wined3d_swapchain *swapchain, const RECT *src_rect_in, +@@ -445,6 +449,7 @@ + /* Back buffer 0 is already in the draw binding. */ + tex0 = swapchain->back_buffers[0]->texture_rgb; + rb0 = surface_prev->rb_multisample; +#if defined(STAGING_CSMT) - const RECT *dst_rect_in, const RGNDATA *dirty_region, DWORD flags, - struct wined3d_surface *depth_stencil) + locations0 = surface_prev->resource.locations; + + for (i = 1; i < swapchain->desc.backbuffer_count; ++i) +@@ -459,6 +464,22 @@ + + wined3d_resource_validate_location(&surface_prev->resource, surface->resource.locations & supported_locations); + wined3d_resource_invalidate_location(&surface_prev->resource, ~(surface->resource.locations & supported_locations)); ++#else /* STAGING_CSMT */ ++ locations0 = surface_prev->locations; ++ ++ for (i = 1; i < swapchain->desc.backbuffer_count; ++i) ++ { ++ surface = surface_from_resource(wined3d_texture_get_sub_resource(swapchain->back_buffers[i], 0)); ++ ++ if (!(surface->locations & supported_locations)) ++ surface_load_location(surface, context, swapchain->back_buffers[i]->resource.draw_binding); ++ ++ swapchain->back_buffers[i - 1]->texture_rgb = swapchain->back_buffers[i]->texture_rgb; ++ surface_prev->rb_multisample = surface->rb_multisample; ++ ++ surface_validate_location(surface_prev, surface->locations & supported_locations); ++ surface_invalidate_location(surface_prev, ~(surface->locations & supported_locations)); ++#endif /* STAGING_CSMT */ + + surface_prev = surface; + } +@@ -466,6 +487,7 @@ + swapchain->back_buffers[i - 1]->texture_rgb = tex0; + surface_prev->rb_multisample = rb0; + ++#if defined(STAGING_CSMT) + wined3d_resource_validate_location(&surface_prev->resource, locations0 & supported_locations); + wined3d_resource_invalidate_location(&surface_prev->resource, ~(locations0 & supported_locations)); + +@@ -478,6 +500,20 @@ { struct wined3d_surface *back_buffer = surface_from_resource( wined3d_texture_get_sub_resource(swapchain->back_buffers[0], 0)); +#else /* STAGING_CSMT */ ++ surface_validate_location(surface_prev, locations0 & supported_locations); ++ surface_invalidate_location(surface_prev, ~(locations0 & supported_locations)); ++ ++ device_invalidate_state(swapchain->device, STATE_FRAMEBUFFER); ++} ++ ++static void swapchain_gl_present(struct wined3d_swapchain *swapchain, const RECT *src_rect_in, + const RECT *dst_rect_in, const RGNDATA *dirty_region, DWORD flags) +{ + struct wined3d_surface *back_buffer = surface_from_resource( @@ -7701,7 +7741,7 @@ diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c const struct wined3d_gl_info *gl_info; struct wined3d_context *context; struct wined3d_surface *front; -@@ -460,6 +472,37 @@ +@@ -505,6 +541,37 @@ NULL, WINED3D_TEXF_POINT); } @@ -7739,7 +7779,7 @@ diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c TRACE("Presenting HDC %p.\n", context->hdc); render_to_fbo = swapchain->render_to_fbo; -@@ -501,6 +544,7 @@ +@@ -546,6 +613,7 @@ */ if (!swapchain->render_to_fbo && render_to_fbo && wined3d_settings.offscreen_rendering_mode == ORM_FBO) { @@ -7747,7 +7787,7 @@ diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c wined3d_resource_load_location(&back_buffer->resource, context, WINED3D_LOCATION_TEXTURE_RGB); wined3d_resource_invalidate_location(&back_buffer->resource, WINED3D_LOCATION_DRAWABLE); swapchain->render_to_fbo = TRUE; -@@ -509,6 +553,16 @@ +@@ -554,6 +622,16 @@ else { wined3d_resource_load_location(&back_buffer->resource, context, back_buffer->container->resource.draw_binding); @@ -7764,7 +7804,7 @@ diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c } if (swapchain->render_to_fbo) -@@ -521,8 +575,13 @@ +@@ -566,8 +644,13 @@ swapchain_blit(swapchain, context, &src_rect, &dst_rect); } @@ -7777,8 +7817,8 @@ diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c +#endif /* STAGING_CSMT */ /* call wglSwapBuffers through the gl table to avoid confusing the Steam overlay */ - gl_info->gl_ops.wgl.p_wglSwapBuffers(context->hdc); /* TODO: cycle through the swapchain buffers */ -@@ -546,6 +605,7 @@ + gl_info->gl_ops.wgl.p_wglSwapBuffers(context->hdc); +@@ -593,6 +676,7 @@ front = surface_from_resource(wined3d_texture_get_sub_resource(swapchain->front_buffer, 0)); @@ -7786,7 +7826,7 @@ diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c wined3d_resource_validate_location(&front->resource, WINED3D_LOCATION_DRAWABLE); wined3d_resource_invalidate_location(&front->resource, ~WINED3D_LOCATION_DRAWABLE); switch (swapchain->desc.swap_effect) -@@ -574,6 +634,31 @@ +@@ -621,6 +705,31 @@ { wined3d_texture_decref(swapchain->device->cs->onscreen_depth_stencil->container); swapchain->device->cs->onscreen_depth_stencil = NULL; @@ -7818,7 +7858,7 @@ diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c } } } -@@ -606,7 +691,11 @@ +@@ -653,7 +762,11 @@ TRACE("Copying surface %p to screen.\n", front); @@ -7830,7 +7870,7 @@ diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c src_dc = front->hDC; window = swapchain->win_handle; -@@ -634,8 +723,12 @@ +@@ -681,8 +794,12 @@ } static void swapchain_gdi_present(struct wined3d_swapchain *swapchain, const RECT *src_rect_in, @@ -7843,7 +7883,7 @@ diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c { struct wined3d_surface *front, *back; -@@ -662,9 +755,15 @@ +@@ -709,9 +826,15 @@ { void *tmp; @@ -7859,7 +7899,7 @@ diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c if (front->resource.heap_memory) ERR("GDI Surface %p has heap memory allocated.\n", front); -@@ -735,6 +834,7 @@ +@@ -782,6 +905,7 @@ swapchain->render_to_fbo = TRUE; } @@ -7867,7 +7907,7 @@ diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c HRESULT swapchain_create_context_cs(struct wined3d_device *device, struct wined3d_swapchain *swapchain) { const struct wined3d_adapter *adapter = device->adapter; -@@ -799,6 +899,7 @@ +@@ -846,6 +970,7 @@ return WINED3D_OK; } @@ -7875,7 +7915,7 @@ diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, struct wined3d_device *device, struct wined3d_swapchain_desc *desc, void *parent, const struct wined3d_parent_ops *parent_ops) { -@@ -889,8 +990,13 @@ +@@ -936,8 +1061,13 @@ front_buffer = surface_from_resource(wined3d_texture_get_sub_resource(swapchain->front_buffer, 0)); if (!(device->wined3d->flags & WINED3D_NO3D)) { @@ -7889,7 +7929,7 @@ diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c } /* MSDN says we're only allowed a single fullscreen swapchain per device, -@@ -916,9 +1022,67 @@ +@@ -963,9 +1093,67 @@ if (!(device->wined3d->flags & WINED3D_NO3D)) { @@ -9379,7 +9419,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h void context_apply_fbo_state_blit(struct wined3d_context *context, GLenum target, struct wined3d_surface *render_target, struct wined3d_surface *depth_stencil, DWORD location) DECLSPEC_HIDDEN; void context_active_texture(struct wined3d_context *context, const struct wined3d_gl_info *gl_info, -@@ -2058,7 +2117,11 @@ +@@ -2062,7 +2121,11 @@ struct wined3d_state { DWORD flags; @@ -9391,7 +9431,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h struct wined3d_vertex_declaration *vertex_declaration; struct wined3d_stream_output stream_output[MAX_STREAM_OUT]; -@@ -2103,6 +2166,7 @@ +@@ -2107,6 +2170,7 @@ DWORD render_states[WINEHIGHEST_RENDER_STATE + 1]; }; @@ -9399,7 +9439,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h struct wined3d_gl_bo { GLuint name; -@@ -2111,6 +2175,7 @@ +@@ -2115,6 +2179,7 @@ UINT size; }; @@ -9407,7 +9447,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h #define WINED3D_UNMAPPED_STAGE ~0U /* Multithreaded flag. Removed from the public header to signal that -@@ -2166,11 +2231,23 @@ +@@ -2170,11 +2235,23 @@ struct wined3d_rendertarget_view *back_buffer_view; struct wined3d_swapchain **swapchains; UINT swapchain_count; @@ -9431,7 +9471,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h /* For rendering to a texture using glCopyTexImage */ GLuint depth_blt_texture; -@@ -2181,6 +2258,9 @@ +@@ -2185,6 +2262,9 @@ UINT xScreenSpace; UINT yScreenSpace; UINT cursorWidth, cursorHeight; @@ -9441,7 +9481,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h HCURSOR hardwareCursor; /* The Wine logo texture */ -@@ -2212,6 +2292,7 @@ +@@ -2216,6 +2296,7 @@ UINT message, WPARAM wparam, LPARAM lparam, WNDPROC proc) DECLSPEC_HIDDEN; void device_resource_add(struct wined3d_device *device, struct wined3d_resource *resource) DECLSPEC_HIDDEN; void device_resource_released(struct wined3d_device *device, struct wined3d_resource *resource) DECLSPEC_HIDDEN; @@ -9449,7 +9489,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h void device_invalidate_state(const struct wined3d_device *device, DWORD state) DECLSPEC_HIDDEN; void device_invalidate_shader_constants(const struct wined3d_device *device, DWORD mask) DECLSPEC_HIDDEN; void device_exec_update_texture(struct wined3d_context *context, struct wined3d_texture *src_texture, -@@ -2223,6 +2304,11 @@ +@@ -2227,6 +2308,11 @@ void device_create_dummy_textures(struct wined3d_device *device, struct wined3d_context *context) DECLSPEC_HIDDEN; void device_delete_opengl_contexts_cs(struct wined3d_device *device, struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN; @@ -9461,7 +9501,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h static inline BOOL isStateDirty(const struct wined3d_context *context, DWORD state) { -@@ -2242,9 +2328,11 @@ +@@ -2246,9 +2332,11 @@ HRESULT (*resource_sub_resource_map)(struct wined3d_resource *resource, unsigned int sub_resource_idx, struct wined3d_map_desc *map_desc, const struct wined3d_box *box, DWORD flags); HRESULT (*resource_sub_resource_unmap)(struct wined3d_resource *resource, unsigned int sub_resource_idx); @@ -9473,7 +9513,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h }; struct wined3d_resource -@@ -2269,6 +2357,7 @@ +@@ -2273,6 +2361,7 @@ UINT depth; UINT size; DWORD priority; @@ -9481,7 +9521,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h void *heap_memory, *map_heap_memory, *user_memory, *bitmap_data; UINT custom_row_pitch, custom_slice_pitch; struct wined3d_gl_bo *buffer, *map_buffer; -@@ -2276,6 +2365,10 @@ +@@ -2280,6 +2369,10 @@ DWORD locations; LONG access_fence; BOOL unmap_dirtify; @@ -9492,7 +9532,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h void *parent; const struct wined3d_parent_ops *parent_ops; -@@ -2300,6 +2393,7 @@ +@@ -2304,6 +2397,7 @@ void *parent, const struct wined3d_parent_ops *parent_ops, const struct wined3d_resource_ops *resource_ops) DECLSPEC_HIDDEN; void resource_unload(struct wined3d_resource *resource) DECLSPEC_HIDDEN; @@ -9500,7 +9540,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h DWORD wined3d_resource_access_from_location(DWORD location) DECLSPEC_HIDDEN; BOOL wined3d_resource_allocate_sysmem(struct wined3d_resource *resource) DECLSPEC_HIDDEN; void wined3d_resource_changed(struct wined3d_resource *resource, -@@ -2348,6 +2442,15 @@ +@@ -2352,6 +2446,15 @@ { while(InterlockedCompareExchange(&resource->access_fence, 0, 0)); } @@ -9516,7 +9556,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h /* Tests show that the start address of resources is 32 byte aligned */ #define RESOURCE_ALIGNMENT 16 -@@ -2432,7 +2535,9 @@ +@@ -2436,7 +2539,9 @@ void wined3d_texture_apply_sampler_desc(struct wined3d_texture *texture, const struct wined3d_sampler_desc *sampler_desc, const struct wined3d_gl_info *gl_info) DECLSPEC_HIDDEN; @@ -9526,7 +9566,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h void wined3d_texture_bind(struct wined3d_texture *texture, struct wined3d_context *context, BOOL srgb) DECLSPEC_HIDDEN; void wined3d_texture_bind_and_dirtify(struct wined3d_texture *texture, -@@ -2466,9 +2571,16 @@ +@@ -2470,9 +2575,16 @@ struct wined3d_resource resource; struct wined3d_texture *container; @@ -9543,7 +9583,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h }; static inline struct wined3d_volume *volume_from_resource(struct wined3d_resource *resource) -@@ -2476,6 +2588,7 @@ +@@ -2480,6 +2592,7 @@ return CONTAINING_RECORD(resource, struct wined3d_volume, resource); } @@ -9551,7 +9591,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h HRESULT wined3d_volume_create(struct wined3d_texture *container, const struct wined3d_resource_desc *desc, unsigned int level, struct wined3d_volume **volume) DECLSPEC_HIDDEN; void wined3d_volume_destroy(struct wined3d_volume *volume) DECLSPEC_HIDDEN; -@@ -2491,6 +2604,27 @@ +@@ -2495,6 +2608,27 @@ struct wined3d_surface_dib { HBITMAP DIBsection; @@ -9579,7 +9619,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h UINT bitmap_size; }; -@@ -2516,7 +2650,11 @@ +@@ -2520,7 +2654,11 @@ struct wined3d_surface_ops { HRESULT (*surface_private_setup)(struct wined3d_surface *surface); @@ -9591,7 +9631,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h }; struct wined3d_surface -@@ -2524,12 +2662,26 @@ +@@ -2528,12 +2666,26 @@ struct wined3d_resource resource; const struct wined3d_surface_ops *surface_ops; struct wined3d_texture *container; @@ -9618,7 +9658,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h GLuint rb_multisample; GLuint rb_resolved; GLenum texture_target; -@@ -2573,11 +2725,22 @@ +@@ -2577,11 +2729,22 @@ GLenum surface_get_gl_buffer(const struct wined3d_surface *surface) DECLSPEC_HIDDEN; void surface_get_drawable_size(const struct wined3d_surface *surface, const struct wined3d_context *context, unsigned int *width, unsigned int *height) DECLSPEC_HIDDEN; @@ -9641,7 +9681,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h void surface_modify_ds_location(struct wined3d_surface *surface, DWORD location, UINT w, UINT h) DECLSPEC_HIDDEN; void wined3d_surface_prepare(struct wined3d_surface *surface, struct wined3d_context *context, DWORD location) DECLSPEC_HIDDEN; -@@ -2589,6 +2752,7 @@ +@@ -2593,6 +2756,7 @@ const struct wined3d_gl_info *gl_info, void *mem, unsigned int pitch) DECLSPEC_HIDDEN; HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const POINT *dst_point, struct wined3d_surface *src_surface, const RECT *src_rect) DECLSPEC_HIDDEN; @@ -9649,7 +9689,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h HRESULT wined3d_surface_create(struct wined3d_texture *container, const struct wined3d_resource_desc *desc, GLenum target, unsigned int level, unsigned int layer, DWORD flags, struct wined3d_surface **surface) DECLSPEC_HIDDEN; -@@ -2603,6 +2767,17 @@ +@@ -2607,6 +2771,17 @@ void wined3d_surface_cleanup_cs(struct wined3d_surface *surface) DECLSPEC_HIDDEN; void wined3d_surface_getdc_cs(struct wined3d_surface *surface) DECLSPEC_HIDDEN; void wined3d_surface_releasedc_cs(struct wined3d_surface *surface) DECLSPEC_HIDDEN; @@ -9667,7 +9707,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h void draw_textured_quad(const struct wined3d_surface *src_surface, struct wined3d_context *context, const RECT *src_rect, const RECT *dst_rect, enum wined3d_texture_filter_type filter) DECLSPEC_HIDDEN; -@@ -2624,8 +2799,10 @@ +@@ -2628,8 +2803,10 @@ GLuint name; }; @@ -9678,7 +9718,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h struct wined3d_vertex_declaration_element { const struct wined3d_format *format; -@@ -2654,8 +2831,10 @@ +@@ -2658,8 +2835,10 @@ BOOL half_float_conv_needed; }; @@ -9689,7 +9729,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h struct wined3d_saved_states { DWORD transform[(HIGHEST_TRANSFORMSTATE >> 5) + 1]; -@@ -2723,6 +2902,7 @@ +@@ -2727,6 +2906,7 @@ void stateblock_init_contained_states(struct wined3d_stateblock *stateblock) DECLSPEC_HIDDEN; void state_cleanup(struct wined3d_state *state) DECLSPEC_HIDDEN; @@ -9697,7 +9737,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h HRESULT state_init(struct wined3d_state *state, const struct wined3d_gl_info *gl_info, const struct wined3d_d3d_info *d3d_info, DWORD flags) DECLSPEC_HIDDEN; void state_unbind_resources(struct wined3d_state *state) DECLSPEC_HIDDEN; -@@ -2773,6 +2953,32 @@ +@@ -2777,6 +2957,32 @@ void wined3d_cs_destroy(struct wined3d_cs *cs) DECLSPEC_HIDDEN; void wined3d_cs_switch_onscreen_ds(struct wined3d_cs *cs, struct wined3d_context *context, struct wined3d_surface *depth_stencil) DECLSPEC_HIDDEN; @@ -9730,7 +9770,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *rects, DWORD flags, const struct wined3d_color *color, float depth, DWORD stencil) DECLSPEC_HIDDEN; -@@ -2822,6 +3028,7 @@ +@@ -2826,6 +3032,7 @@ void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs, struct wined3d_vertex_declaration *declaration) DECLSPEC_HIDDEN; void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_viewport *viewport) DECLSPEC_HIDDEN; @@ -9738,7 +9778,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h void wined3d_cs_emit_set_consts_f(struct wined3d_cs *cs, UINT start_register, const float *constants, UINT vector4f_count, enum wined3d_shader_type type) DECLSPEC_HIDDEN; void wined3d_cs_emit_set_consts_b(struct wined3d_cs *cs, UINT start_register, -@@ -2885,6 +3092,7 @@ +@@ -2889,6 +3096,7 @@ void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_resource *resource, unsigned int sub_resource_idx, const struct wined3d_box *box, const void *data, unsigned int row_pitch, unsigned int depth_pitch) DECLSPEC_HIDDEN; @@ -9746,7 +9786,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h /* Direct3D terminology with little modifications. We do not have an issued state * because only the driver knows about it, but we have a created state because d3d -@@ -2899,8 +3107,12 @@ +@@ -2903,8 +3111,12 @@ struct wined3d_query_ops { HRESULT (*query_get_data)(struct wined3d_query *query, void *data, DWORD data_size, DWORD flags); @@ -9759,7 +9799,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h }; struct wined3d_query -@@ -2914,12 +3126,16 @@ +@@ -2918,12 +3130,16 @@ enum wined3d_query_type type; DWORD data_size; void *extendedData; @@ -9776,7 +9816,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h /* TODO: Add tests and support for FLOAT16_4 POSITIONT, D3DCOLOR position, other * fixed function semantics as D3DCOLOR or FLOAT16 */ -@@ -2946,7 +3162,9 @@ +@@ -2950,7 +3166,9 @@ GLenum buffer_object_usage; GLenum buffer_type_hint; DWORD flags; @@ -9786,7 +9826,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h void *map_ptr; struct wined3d_map_range *maps; -@@ -2971,11 +3189,15 @@ +@@ -2975,11 +3193,15 @@ BYTE *buffer_get_sysmem(struct wined3d_buffer *This, struct wined3d_context *context) DECLSPEC_HIDDEN; void buffer_internal_preload(struct wined3d_buffer *buffer, struct wined3d_context *context, const struct wined3d_state *state) DECLSPEC_HIDDEN; @@ -9802,7 +9842,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h struct wined3d_rendertarget_view { -@@ -3014,8 +3236,10 @@ +@@ -3018,8 +3240,10 @@ return surface_from_resource(resource); } @@ -9813,7 +9853,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h struct wined3d_shader_resource_view { LONG refcount; -@@ -3028,8 +3252,12 @@ +@@ -3032,8 +3256,12 @@ struct wined3d_swapchain_ops { void (*swapchain_present)(struct wined3d_swapchain *swapchain, const RECT *src_rect, @@ -9826,7 +9866,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h }; struct wined3d_swapchain -@@ -3069,8 +3297,10 @@ +@@ -3073,8 +3301,10 @@ HDC swapchain_get_backup_dc(struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN; void swapchain_update_draw_bindings(struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN; void swapchain_update_swap_interval(struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN; @@ -9837,7 +9877,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h /***************************************************************************** * Utility function prototypes -@@ -3273,7 +3503,9 @@ +@@ -3277,7 +3507,9 @@ void shader_generate_main(const struct wined3d_shader *shader, struct wined3d_string_buffer *buffer, const struct wined3d_shader_reg_maps *reg_maps, const DWORD *byte_code, void *backend_ctx) DECLSPEC_HIDDEN; BOOL shader_match_semantic(const char *semantic_name, enum wined3d_decl_usage usage) DECLSPEC_HIDDEN; diff --git a/patches/winspool.drv-SetPrinterW/0001-winspool.drv-Add-case-8-for-SetPrinterW.patch b/patches/winspool.drv-SetPrinterW/0001-winspool.drv-Add-case-8-for-SetPrinterW.patch deleted file mode 100644 index 66d699d8..00000000 --- a/patches/winspool.drv-SetPrinterW/0001-winspool.drv-Add-case-8-for-SetPrinterW.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 2ba7980e47f0c593a17f13e73a19dec6fa4f8955 Mon Sep 17 00:00:00 2001 -From: Jarkko Korpi -Date: Mon, 24 Aug 2015 21:44:20 +0300 -Subject: winspool.drv Add case 8 for SetPrinterW. - ---- - dlls/winspool.drv/info.c | 15 ++++++++++++++- - 1 file changed, 14 insertions(+), 1 deletion(-) - -diff --git a/dlls/winspool.drv/info.c b/dlls/winspool.drv/info.c -index ca2c34d..e39509d 100644 ---- a/dlls/winspool.drv/info.c -+++ b/dlls/winspool.drv/info.c -@@ -3452,6 +3452,14 @@ static void set_printer_2( HKEY key, const PRINTER_INFO_2W *pi ) - set_reg_DWORD( key, UntilTimeW, pi->UntilTime ); - } - -+static BOOL set_printer_8( HKEY key, const PRINTER_INFO_8W *pi ) -+{ -+ if (!pi->pDevMode) return FALSE; -+ -+ set_reg_devmode( key, Default_DevModeW, pi->pDevMode ); -+ return TRUE; -+} -+ - static BOOL set_printer_9( HKEY key, const PRINTER_INFO_9W *pi ) - { - if (!pi->pDevMode) return FALSE; -@@ -3484,7 +3492,12 @@ BOOL WINAPI SetPrinterW( HANDLE printer, DWORD level, LPBYTE data, DWORD command - ret = TRUE; - break; - } -- -+ case 8: -+ { -+ PRINTER_INFO_8W *pi = (PRINTER_INFO_8W *)data; -+ ret = set_printer_8( key, pi ); -+ break; -+ } - case 9: - { - PRINTER_INFO_9W *pi = (PRINTER_INFO_9W *)data; --- -2.5.0 - diff --git a/patches/winspool.drv-SetPrinterW/definition b/patches/winspool.drv-SetPrinterW/definition deleted file mode 100644 index d7796222..00000000 --- a/patches/winspool.drv-SetPrinterW/definition +++ /dev/null @@ -1 +0,0 @@ -Fixes: [24645] Add stub for winspool.SetPrinterW level 8