From b3f1e5566f86f06dce547374808a895c93abd126 Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Mon, 10 Feb 2020 17:40:48 -0600 Subject: [PATCH] Rebase against 0df9cce29d0d32d3f1f13c4ec4eabc81675a17ed. --- ...ub-interface-from-Direct3DShaderVali.patch | 95 ------------------- .../definition | 1 - patches/patchinstall.sh | 21 +--- ...w-to-select-default-display-frequenc.patch | 32 +++---- 4 files changed, 14 insertions(+), 135 deletions(-) delete mode 100644 patches/d3d9-Direct3DShaderValidatorCreate9/0001-d3d9-Return-a-stub-interface-from-Direct3DShaderVali.patch delete mode 100644 patches/d3d9-Direct3DShaderValidatorCreate9/definition diff --git a/patches/d3d9-Direct3DShaderValidatorCreate9/0001-d3d9-Return-a-stub-interface-from-Direct3DShaderVali.patch b/patches/d3d9-Direct3DShaderValidatorCreate9/0001-d3d9-Return-a-stub-interface-from-Direct3DShaderVali.patch deleted file mode 100644 index 7b97e9fe..00000000 --- a/patches/d3d9-Direct3DShaderValidatorCreate9/0001-d3d9-Return-a-stub-interface-from-Direct3DShaderVali.patch +++ /dev/null @@ -1,95 +0,0 @@ -From f6f5f94053043d6d39767f0c7ac5cd0307019559 Mon Sep 17 00:00:00 2001 -From: Zebediah Figura -Date: Tue, 12 Nov 2019 21:13:22 -0600 -Subject: [PATCH] d3d9: Return a stub interface from - Direct3DShaderValidatorCreate9(). - -Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46735 -Signed-off-by: Zebediah Figura ---- - dlls/d3d9/d3d9_main.c | 61 ++++++++++++++++++++++++++++++++++++++++--- - 1 file changed, 57 insertions(+), 4 deletions(-) - -diff --git a/dlls/d3d9/d3d9_main.c b/dlls/d3d9/d3d9_main.c -index 21df2a34c..aff43070a 100644 ---- a/dlls/d3d9/d3d9_main.c -+++ b/dlls/d3d9/d3d9_main.c -@@ -75,18 +75,71 @@ HRESULT WINAPI DECLSPEC_HOTPATCH Direct3DCreate9Ex(UINT sdk_version, IDirect3D9E - return D3D_OK; - } - -+static HRESULT WINAPI shader_validator_QueryInterface(void *iface, REFIID iid, void **out) -+{ -+ TRACE("iface %p, iid %p, out %p.\n", iface, iid, out); -+ -+ WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(iid)); -+ *out = NULL; -+ return E_NOINTERFACE; -+} -+ -+static ULONG WINAPI shader_validator_AddRef(void *iface) -+{ -+ TRACE("iface %p.\n", iface); -+ return 2; -+} -+ -+static ULONG WINAPI shader_validator_Release(void *iface) -+{ -+ TRACE("iface %p.\n", iface); -+ return 1; -+} -+ -+static HRESULT WINAPI shader_validator_stub1(void *arg1, void *arg2, void *arg3, void *arg4) -+{ -+ FIXME("arg1 %p, arg2 %p, arg3 %p, arg4 %p, stub!\n", arg1, arg2, arg3, arg4); -+ return S_OK; -+} -+ -+static HRESULT WINAPI shader_validator_stub2(void *arg1, void *arg2, void *arg3, DWORD *arg4, DWORD arg5) -+{ -+ int i; -+ FIXME("arg1 %p, arg2 %p, arg3 %p, arg4 %p, arg5 %u, stub!\n", arg1, arg2, arg3, arg4, arg5); -+ for (i = 0; i < arg5; ++i) -+ FIXME(" %#x\n", arg4[i]); -+ return S_OK; -+} -+ -+static HRESULT WINAPI shader_validator_stub3(void *arg1) -+{ -+ FIXME("arg1 %p, stub!\n", arg1); -+ return S_OK; -+} -+ -+static const void *shader_validator_vtbl[] = -+{ -+ shader_validator_QueryInterface, -+ shader_validator_AddRef, -+ shader_validator_Release, -+ shader_validator_stub1, -+ shader_validator_stub2, -+ shader_validator_stub3, -+}; -+ -+static void *shader_validator = &shader_validator_vtbl; -+ - /******************************************************************* - * Direct3DShaderValidatorCreate9 (D3D9.@) - * - * No documentation available for this function. - * SDK only says it is internal and shouldn't be used. - */ --void* WINAPI Direct3DShaderValidatorCreate9(void) -+void * WINAPI Direct3DShaderValidatorCreate9(void) - { -- static int once; -+ TRACE("Returning validator %p.\n", &shader_validator); - -- if (!once++) FIXME("stub\n"); -- return NULL; -+ return &shader_validator; - } - - /*********************************************************************** --- -2.23.0 - diff --git a/patches/d3d9-Direct3DShaderValidatorCreate9/definition b/patches/d3d9-Direct3DShaderValidatorCreate9/definition deleted file mode 100644 index 595e159f..00000000 --- a/patches/d3d9-Direct3DShaderValidatorCreate9/definition +++ /dev/null @@ -1 +0,0 @@ -Fixes: [46735] The Sims 2 demo needs Direct3DShaderValidatorCreate9() implementation diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 19fdfdf5..f513dd25 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -52,7 +52,7 @@ usage() # Get the upstream commit sha upstream_commit() { - echo "f909d18baf1d97831c55a1d47610427ac2084ca3" + echo "0df9cce29d0d32d3f1f13c4ec4eabc81675a17ed" } # Show version information @@ -102,7 +102,6 @@ patch_enable_all () enable_crypt32_CMS_Certificates="$1" enable_cryptext_CryptExtOpenCER="$1" enable_d3d11_Deferred_Context="$1" - enable_d3d9_Direct3DShaderValidatorCreate9="$1" enable_d3dx9_32bpp_Alpha_Channel="$1" enable_d3dx9_36_BumpLuminance="$1" enable_d3dx9_36_CloneEffect="$1" @@ -424,9 +423,6 @@ patch_enable () d3d11-Deferred_Context) enable_d3d11_Deferred_Context="$2" ;; - d3d9-Direct3DShaderValidatorCreate9) - enable_d3d9_Direct3DShaderValidatorCreate9="$2" - ;; d3dx9-32bpp_Alpha_Channel) enable_d3dx9_32bpp_Alpha_Channel="$2" ;; @@ -2580,21 +2576,6 @@ if test "$enable_d3d11_Deferred_Context" -eq 1; then ) >> "$patchlist" fi -# Patchset d3d9-Direct3DShaderValidatorCreate9 -# | -# | This patchset fixes the following Wine bugs: -# | * [#46735] The Sims 2 demo needs Direct3DShaderValidatorCreate9() implementation -# | -# | Modified files: -# | * dlls/d3d9/d3d9_main.c -# | -if test "$enable_d3d9_Direct3DShaderValidatorCreate9" -eq 1; then - patch_apply d3d9-Direct3DShaderValidatorCreate9/0001-d3d9-Return-a-stub-interface-from-Direct3DShaderVali.patch - ( - printf '%s\n' '+ { "Zebediah Figura", "d3d9: Return a stub interface from Direct3DShaderValidatorCreate9().", 1 },'; - ) >> "$patchlist" -fi - # Patchset d3dx9-32bpp_Alpha_Channel # | # | This patchset fixes the following Wine bugs: diff --git a/patches/winex11-DefaultDisplayFrequency/0001-winex11.drv-Allow-to-select-default-display-frequenc.patch b/patches/winex11-DefaultDisplayFrequency/0001-winex11.drv-Allow-to-select-default-display-frequenc.patch index 2bc72854..39d50c99 100644 --- a/patches/winex11-DefaultDisplayFrequency/0001-winex11.drv-Allow-to-select-default-display-frequenc.patch +++ b/patches/winex11-DefaultDisplayFrequency/0001-winex11.drv-Allow-to-select-default-display-frequenc.patch @@ -1,4 +1,4 @@ -From 07121577f503da242db989c9c78cffb7a86aafd6 Mon Sep 17 00:00:00 2001 +From 599864f0a90e7bf64902dbd7ff135f253d270802 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Thu, 5 Nov 2015 14:33:48 +0100 Subject: winex11.drv: Allow to select default display frequency in registry @@ -11,33 +11,27 @@ registry key (of type STRING) to select the default display frequency: HKCU\Software\Wine\X11 Driver\DefaultDisplayFrequency --- - dlls/winex11.drv/settings.c | 58 +++++++++++++++++++++++++++--------------- + dlls/winex11.drv/settings.c | 58 ++++++++++++++++++++++------------ dlls/winex11.drv/x11drv.h | 1 + dlls/winex11.drv/x11drv_main.c | 4 +++ 3 files changed, 43 insertions(+), 20 deletions(-) diff --git a/dlls/winex11.drv/settings.c b/dlls/winex11.drv/settings.c -index 800b65d..fc9d29c 100644 +index 24644db62..4fac4beb6 100644 --- a/dlls/winex11.drv/settings.c +++ b/dlls/winex11.drv/settings.c -@@ -342,7 +342,7 @@ static const char * _DM_fields(DWORD fields) - LONG CDECL X11DRV_ChangeDisplaySettingsEx( LPCWSTR devname, LPDEVMODEW devmode, +@@ -319,8 +319,9 @@ LONG CDECL X11DRV_ChangeDisplaySettingsEx( LPCWSTR devname, LPDEVMODEW devmode, HWND hwnd, DWORD flags, LPVOID lpvoid ) { -- DWORD i, dwBpp = 0; -+ DWORD i, mode, dwBpp = 0; - DEVMODEW dm; - BOOL def_mode = TRUE; char bpp_buffer[16], freq_buffer[18]; -@@ -388,6 +388,7 @@ LONG CDECL X11DRV_ChangeDisplaySettingsEx( LPCWSTR devname, LPDEVMODEW devmode, - return DISP_CHANGE_BADMODE; - } +- DWORD i; ++ DWORD i, mode; + mode = ENUM_CURRENT_SETTINGS; for (i = 0; i < dd_mode_count; i++) { if (devmode->dmFields & DM_BITSPERPEL) -@@ -405,32 +406,49 @@ LONG CDECL X11DRV_ChangeDisplaySettingsEx( LPCWSTR devname, LPDEVMODEW devmode, +@@ -338,32 +339,49 @@ LONG CDECL X11DRV_ChangeDisplaySettingsEx( LPCWSTR devname, LPDEVMODEW devmode, if (devmode->dmPelsHeight != dd_modes[i].height) continue; } @@ -107,10 +101,10 @@ index 800b65d..fc9d29c 100644 + return DISP_CHANGE_SUCCESSFUL; } diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h -index a0308b0..0e932e4 100644 +index 98cab8947..9f76596e4 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h -@@ -400,6 +400,7 @@ extern BOOL private_color_map DECLSPEC_HIDDEN; +@@ -404,6 +404,7 @@ extern BOOL private_color_map DECLSPEC_HIDDEN; extern int primary_monitor DECLSPEC_HIDDEN; extern int copy_default_colors DECLSPEC_HIDDEN; extern int alloc_system_colors DECLSPEC_HIDDEN; @@ -119,10 +113,10 @@ index a0308b0..0e932e4 100644 extern HMODULE x11drv_module DECLSPEC_HIDDEN; extern char *process_name DECLSPEC_HIDDEN; diff --git a/dlls/winex11.drv/x11drv_main.c b/dlls/winex11.drv/x11drv_main.c -index e67a3c0..9ff285e 100644 +index 4f611f5fa..981bcc6fb 100644 --- a/dlls/winex11.drv/x11drv_main.c +++ b/dlls/winex11.drv/x11drv_main.c -@@ -82,6 +82,7 @@ BOOL client_side_with_render = TRUE; +@@ -86,6 +86,7 @@ BOOL client_side_with_render = TRUE; BOOL shape_layered_windows = TRUE; int copy_default_colors = 128; int alloc_system_colors = 256; @@ -130,7 +124,7 @@ index e67a3c0..9ff285e 100644 DWORD thread_data_tls_index = TLS_OUT_OF_INDEXES; int xrender_error_base = 0; HMODULE x11drv_module = 0; -@@ -413,6 +414,9 @@ static void setup_options(void) +@@ -436,6 +437,9 @@ static void setup_options(void) if (!get_config_key( hkey, appkey, "AllocSystemColors", buffer, sizeof(buffer) )) alloc_system_colors = atoi(buffer); @@ -141,5 +135,5 @@ index e67a3c0..9ff285e 100644 if (appkey) RegCloseKey( appkey ); -- -2.7.4 +2.25.0