From 469cbe7ed827636c48007badd9f70e23087273ce Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Fri, 21 Feb 2020 19:06:44 -0600 Subject: [PATCH] Rebase against b253bd65658fe7dde8e50d7f7e6930cd215282df. --- ...nt-CreateSymbolicLink-A-W-with-ntdll.patch | 40 +++++----- patches/patchinstall.sh | 2 +- ...a-drive-serial-number-during-prefix-.patch | 16 ++-- ...SWVP-vertex-shader-constants-limit-i.patch | 76 +++++++------------ 4 files changed, 58 insertions(+), 76 deletions(-) diff --git a/patches/ntdll-Junction_Points/0019-kernel32-Implement-CreateSymbolicLink-A-W-with-ntdll.patch b/patches/ntdll-Junction_Points/0019-kernel32-Implement-CreateSymbolicLink-A-W-with-ntdll.patch index d355effa..ab185c3a 100644 --- a/patches/ntdll-Junction_Points/0019-kernel32-Implement-CreateSymbolicLink-A-W-with-ntdll.patch +++ b/patches/ntdll-Junction_Points/0019-kernel32-Implement-CreateSymbolicLink-A-W-with-ntdll.patch @@ -1,4 +1,4 @@ -From 8af2ae9864c4a94b2db9a12283fe5ddee6cb26c8 Mon Sep 17 00:00:00 2001 +From bec0c81d2917427c8cdc22fea8f5db86157bccf8 Mon Sep 17 00:00:00 2001 From: "Erich E. Hoover" Date: Wed, 13 Mar 2019 16:02:05 -0600 Subject: [PATCH] kernel32: Implement CreateSymbolicLink[A|W] with ntdll @@ -13,7 +13,7 @@ Signed-off-by: Erich E. Hoover 4 files changed, 277 insertions(+), 81 deletions(-) diff --git a/dlls/kernel32/path.c b/dlls/kernel32/path.c -index a369ca90120..0b7202ef961 100644 +index 849be11d2..bc30e03b0 100644 --- a/dlls/kernel32/path.c +++ b/dlls/kernel32/path.c @@ -34,6 +34,8 @@ @@ -25,7 +25,7 @@ index a369ca90120..0b7202ef961 100644 #include "kernel_private.h" #include "wine/unicode.h" -@@ -924,8 +926,106 @@ WCHAR * CDECL wine_get_dos_file_name( LPCSTR str ) +@@ -926,8 +928,106 @@ WCHAR * CDECL wine_get_dos_file_name( LPCSTR str ) */ BOOLEAN WINAPI CreateSymbolicLinkW(LPCWSTR link, LPCWSTR target, DWORD flags) { @@ -134,7 +134,7 @@ index a369ca90120..0b7202ef961 100644 } /************************************************************************* -@@ -933,8 +1033,24 @@ BOOLEAN WINAPI CreateSymbolicLinkW(LPCWSTR link, LPCWSTR target, DWORD flags) +@@ -935,8 +1035,24 @@ BOOLEAN WINAPI CreateSymbolicLinkW(LPCWSTR link, LPCWSTR target, DWORD flags) */ BOOLEAN WINAPI CreateSymbolicLinkA(LPCSTR link, LPCSTR target, DWORD flags) { @@ -162,10 +162,10 @@ index a369ca90120..0b7202ef961 100644 /************************************************************************* diff --git a/dlls/kernel32/tests/path.c b/dlls/kernel32/tests/path.c -index 71577793b0b..11b5ea35f0a 100644 +index 7342a865a..78a2e2e06 100644 --- a/dlls/kernel32/tests/path.c +++ b/dlls/kernel32/tests/path.c -@@ -92,6 +92,9 @@ static void (WINAPI *pReleaseActCtx)(HANDLE); +@@ -83,6 +83,9 @@ static NTSTATUS (WINAPI *pLdrGetDllPath)(LPCWSTR,ULONG,LPWSTR*,LPWSTR*); static BOOL (WINAPI *pCheckNameLegalDOS8Dot3W)(const WCHAR *, char *, DWORD, BOOL *, BOOL *); static BOOL (WINAPI *pCheckNameLegalDOS8Dot3A)(const char *, char *, DWORD, BOOL *, BOOL *); @@ -175,8 +175,8 @@ index 71577793b0b..11b5ea35f0a 100644 /* a structure to deal with wine todos somewhat cleanly */ typedef struct { DWORD shortlen; -@@ -2217,11 +2220,14 @@ static void init_pointers(void) - MAKEFUNC(ReleaseActCtx); +@@ -2147,11 +2150,14 @@ static void init_pointers(void) + MAKEFUNC(SetDefaultDllDirectories); MAKEFUNC(CheckNameLegalDOS8Dot3W); MAKEFUNC(CheckNameLegalDOS8Dot3A); + MAKEFUNC(CreateSymbolicLinkW); @@ -190,7 +190,7 @@ index 71577793b0b..11b5ea35f0a 100644 #undef MAKEFUNC } -@@ -2744,6 +2750,95 @@ static void test_LdrGetDllPath(void) +@@ -2672,6 +2678,95 @@ static void test_LdrGetDllPath(void) SetEnvironmentVariableW( pathW, old_path ); } @@ -286,17 +286,17 @@ index 71577793b0b..11b5ea35f0a 100644 START_TEST(path) { CHAR origdir[MAX_PATH],curdir[MAX_PATH], curDrive, otherDrive; -@@ -2781,4 +2876,5 @@ START_TEST(path) +@@ -2701,4 +2796,5 @@ START_TEST(path) test_RtlGetSearchPath(); test_RtlGetExePath(); test_LdrGetDllPath(); + test_CreateSymbolicLink(); } diff --git a/dlls/msvcp120/tests/msvcp120.c b/dlls/msvcp120/tests/msvcp120.c -index d484cdd7ed7..7aca5703ab9 100644 +index 7a382ac6f..9775ef5e1 100644 --- a/dlls/msvcp120/tests/msvcp120.c +++ b/dlls/msvcp120/tests/msvcp120.c -@@ -1625,15 +1625,14 @@ static void test_tr2_sys__Stat(void) +@@ -1615,15 +1615,14 @@ static void test_tr2_sys__Stat(void) char const *path; enum file_type ret; int err_code; @@ -319,7 +319,7 @@ index d484cdd7ed7..7aca5703ab9 100644 }; WCHAR testW[] = {'t','r','2','_','t','e','s','t','_','d','i','r',0}; WCHAR testW2[] = {'t','r','2','_','t','e','s','t','_','d','i','r','/','f','1',0}; -@@ -1678,16 +1677,14 @@ static void test_tr2_sys__Stat(void) +@@ -1668,16 +1667,14 @@ static void test_tr2_sys__Stat(void) for(i=0; i Date: Mon, 25 May 2015 06:07:50 +0200 Subject: [PATCH] wineboot: Assign a drive serial number during prefix @@ -9,10 +9,10 @@ Subject: [PATCH] wineboot: Assign a drive serial number during prefix 1 file changed, 32 insertions(+) diff --git a/programs/wineboot/wineboot.c b/programs/wineboot/wineboot.c -index 75c1a6a28b..6473820592 100644 +index e1dbe6630..f8b0c4d74 100644 --- a/programs/wineboot/wineboot.c +++ b/programs/wineboot/wineboot.c -@@ -70,6 +70,7 @@ +@@ -71,6 +71,7 @@ #include #include #include @@ -20,9 +20,9 @@ index 75c1a6a28b..6473820592 100644 #include #include "resource.h" -@@ -298,6 +299,36 @@ static void get_namestring( WCHAR *buf ) { } - - #endif /* __i386__ || __x86_64__ */ +@@ -537,6 +538,36 @@ done: + RegCloseKey( bios_key ); + } +/* set a serial number for the disk containing windows */ +static void create_disk_serial_number(void) @@ -57,7 +57,7 @@ index 75c1a6a28b..6473820592 100644 /* create the volatile hardware registry keys */ static void create_hardware_registry_keys(void) { -@@ -1425,6 +1456,7 @@ int __cdecl main( int argc, char *argv[] ) +@@ -1694,6 +1725,7 @@ int __cdecl main( int argc, char *argv[] ) ResetEvent( event ); /* in case this is a restart */ @@ -66,5 +66,5 @@ index 75c1a6a28b..6473820592 100644 create_dynamic_registry_keys(); create_environment_registry_keys(); -- -2.17.1 +2.25.0 diff --git a/patches/wined3d-SWVP-shaders/0004-wined3d-Support-SWVP-vertex-shader-constants-limit-i.patch b/patches/wined3d-SWVP-shaders/0004-wined3d-Support-SWVP-vertex-shader-constants-limit-i.patch index 886fe5d0..5a373a92 100644 --- a/patches/wined3d-SWVP-shaders/0004-wined3d-Support-SWVP-vertex-shader-constants-limit-i.patch +++ b/patches/wined3d-SWVP-shaders/0004-wined3d-Support-SWVP-vertex-shader-constants-limit-i.patch @@ -1,4 +1,4 @@ -From c292c41275966f933680f698d00626566c349ad1 Mon Sep 17 00:00:00 2001 +From 346f4479e046a8b786f4fb9df2a1706f3e1fddc5 Mon Sep 17 00:00:00 2001 From: Paul Gofman Date: Mon, 25 Feb 2019 15:05:12 +0300 Subject: [PATCH] wined3d: Support SWVP vertex shader constants limit in state @@ -10,13 +10,13 @@ Signed-off-by: Paul Gofman dlls/d3d9/tests/visual.c | 1 - dlls/wined3d/device.c | 24 ++++++++++++++++++------ dlls/wined3d/glsl_shader.c | 2 +- - dlls/wined3d/stateblock.c | 15 +++++++++++---- - dlls/wined3d/wined3d_private.h | 6 +++--- + dlls/wined3d/stateblock.c | 12 ++++++++---- + dlls/wined3d/wined3d_private.h | 4 ++-- include/wine/wined3d.h | 2 +- - 7 files changed, 34 insertions(+), 21 deletions(-) + 7 files changed, 30 insertions(+), 20 deletions(-) diff --git a/dlls/d3d9/tests/device.c b/dlls/d3d9/tests/device.c -index 8c1ebc1719c..b60468e013e 100644 +index 8c1ebc171..b60468e01 100644 --- a/dlls/d3d9/tests/device.c +++ b/dlls/d3d9/tests/device.c @@ -6413,13 +6413,10 @@ static void test_vertex_shader_constant(void) @@ -50,7 +50,7 @@ index 8c1ebc1719c..b60468e013e 100644 hr = IDirect3DDevice9_SetVertexShaderConstantF(device, consts_swvp - 1, c, 1); ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c -index cb84ef6f284..2d6e1fa688f 100644 +index cb84ef6f2..2d6e1fa68 100644 --- a/dlls/d3d9/tests/visual.c +++ b/dlls/d3d9/tests/visual.c @@ -24884,7 +24884,6 @@ static void test_mvp_software_vertex_shaders(void) @@ -62,10 +62,10 @@ index cb84ef6f284..2d6e1fa688f 100644 hr = IDirect3DDevice9_BeginScene(device); diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c -index 7b9e40d479f..66825bba0a2 100644 +index 9aa2c10bc..3aa3d1331 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c -@@ -2293,13 +2293,17 @@ HRESULT CDECL wined3d_device_set_vs_consts_f(struct wined3d_device *device, +@@ -2269,13 +2269,17 @@ HRESULT CDECL wined3d_device_set_vs_consts_f(struct wined3d_device *device, unsigned int start_idx, unsigned int count, const struct wined3d_vec4 *constants) { const struct wined3d_d3d_info *d3d_info = &device->adapter->d3d_info; @@ -85,7 +85,7 @@ index 7b9e40d479f..66825bba0a2 100644 return WINED3DERR_INVALIDCALL; memcpy(&device->state.vs_consts_f[start_idx], constants, count * sizeof(*constants)); -@@ -2318,12 +2322,16 @@ HRESULT CDECL wined3d_device_get_vs_consts_f(const struct wined3d_device *device +@@ -2294,12 +2298,16 @@ HRESULT CDECL wined3d_device_get_vs_consts_f(const struct wined3d_device *device unsigned int start_idx, unsigned int count, struct wined3d_vec4 *constants) { const struct wined3d_d3d_info *d3d_info = &device->adapter->d3d_info; @@ -104,7 +104,7 @@ index 7b9e40d479f..66825bba0a2 100644 return WINED3DERR_INVALIDCALL; memcpy(constants, &device->state.vs_consts_f[start_idx], count * sizeof(*constants)); -@@ -3864,7 +3872,7 @@ void CDECL wined3d_device_apply_stateblock(struct wined3d_device *device, +@@ -3840,7 +3848,7 @@ void CDECL wined3d_device_apply_stateblock(struct wined3d_device *device, const struct wined3d_saved_states *changed = &stateblock->changed; struct wined3d_blend_state *blend_state; struct wined3d_color colour; @@ -113,7 +113,7 @@ index 7b9e40d479f..66825bba0a2 100644 BOOL set_blend_state; TRACE("device %p, stateblock %p.\n", device, stateblock); -@@ -3874,8 +3882,12 @@ void CDECL wined3d_device_apply_stateblock(struct wined3d_device *device, +@@ -3850,8 +3858,12 @@ void CDECL wined3d_device_apply_stateblock(struct wined3d_device *device, if (changed->pixelShader) wined3d_device_set_pixel_shader(device, state->ps); @@ -125,10 +125,10 @@ index 7b9e40d479f..66825bba0a2 100644 - for (i = 0; i < d3d_info->limits.vs_uniform_count; ++i) + for (i = 0; i < vs_uniform_count; ++i) { - if (changed->vs_consts_f[i]) + if (wined3d_bitmap_is_set(changed->vs_consts_f, i)) ++count; diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c -index 412b12184f1..33666d5eb8c 100644 +index 4f7cc772b..a88f92cc0 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -1913,7 +1913,7 @@ static void shader_glsl_update_float_vertex_constants(struct wined3d_device *dev @@ -141,29 +141,20 @@ index 412b12184f1..33666d5eb8c 100644 update_heap_entry(heap, i, priv->next_constant_version); } diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c -index d787eef0d99..2ad9b97e8fb 100644 +index 69210e1fb..7e7bb4d6a 100644 --- a/dlls/wined3d/stateblock.c +++ b/dlls/wined3d/stateblock.c -@@ -313,7 +313,7 @@ void CDECL wined3d_stateblock_init_contained_states(struct wined3d_stateblock *s - } - } - -- for (i = 0; i < d3d_info->limits.vs_uniform_count; ++i) -+ for (i = 0; i < d3d_info->limits.vs_uniform_count_swvp; ++i) - { - if (stateblock->changed.vs_consts_f[i]) - { -@@ -1336,10 +1336,17 @@ void CDECL wined3d_stateblock_set_vertex_shader(struct wined3d_stateblock *state - HRESULT CDECL wined3d_stateblock_set_vs_consts_f(struct wined3d_stateblock *stateblock, +@@ -1331,12 +1331,16 @@ HRESULT CDECL wined3d_stateblock_set_vs_consts_f(struct wined3d_stateblock *stat unsigned int start_idx, unsigned int count, const struct wined3d_vec4 *constants) { -+ const struct wined3d_d3d_info *d3d_info = &stateblock->device->adapter->d3d_info; + const struct wined3d_d3d_info *d3d_info = &stateblock->device->adapter->d3d_info; + unsigned int constants_count; -+ + TRACE("stateblock %p, start_idx %u, count %u, constants %p.\n", stateblock, start_idx, count, constants); -- if (!constants || start_idx >= WINED3D_MAX_VS_CONSTS_F || count > WINED3D_MAX_VS_CONSTS_F - start_idx) +- if (!constants || start_idx >= d3d_info->limits.vs_uniform_count +- || count > d3d_info->limits.vs_uniform_count - start_idx) + constants_count = stateblock->device->create_parms.flags + & (WINED3DCREATE_SOFTWARE_VERTEXPROCESSING | WINED3DCREATE_MIXED_VERTEXPROCESSING) + ? d3d_info->limits.vs_uniform_count_swvp : d3d_info->limits.vs_uniform_count; @@ -172,7 +163,7 @@ index d787eef0d99..2ad9b97e8fb 100644 return WINED3DERR_INVALIDCALL; memcpy(&stateblock->stateblock_state.vs_consts_f[start_idx], constants, count * sizeof(*constants)); -@@ -2096,7 +2103,7 @@ static HRESULT stateblock_init(struct wined3d_stateblock *stateblock, const stru +@@ -2096,7 +2100,7 @@ static HRESULT stateblock_init(struct wined3d_stateblock *stateblock, const stru stateblock_init_lights(stateblock->stateblock_state.light_state->light_map, device_state->stateblock_state.light_state->light_map); stateblock_savedstates_set_all(&stateblock->changed, @@ -181,7 +172,7 @@ index d787eef0d99..2ad9b97e8fb 100644 break; case WINED3D_SBT_PIXEL_STATE: -@@ -2108,7 +2115,7 @@ static HRESULT stateblock_init(struct wined3d_stateblock *stateblock, const stru +@@ -2108,7 +2112,7 @@ static HRESULT stateblock_init(struct wined3d_stateblock *stateblock, const stru stateblock_init_lights(stateblock->stateblock_state.light_state->light_map, device_state->stateblock_state.light_state->light_map); stateblock_savedstates_set_vertex(&stateblock->changed, @@ -191,10 +182,10 @@ index d787eef0d99..2ad9b97e8fb 100644 default: diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h -index 988332e225b..618399470a3 100644 +index 73834233a..d07ac1ab0 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h -@@ -3205,7 +3205,7 @@ struct wined3d_state +@@ -3201,7 +3201,7 @@ struct wined3d_state BOOL vs_consts_b[WINED3D_MAX_CONSTS_B]; struct wined3d_ivec4 vs_consts_i[WINED3D_MAX_CONSTS_I]; @@ -203,29 +194,20 @@ index 988332e225b..618399470a3 100644 BOOL ps_consts_b[WINED3D_MAX_CONSTS_B]; struct wined3d_ivec4 ps_consts_i[WINED3D_MAX_CONSTS_I]; -@@ -3951,7 +3951,7 @@ struct wined3d_saved_states - BOOL ps_consts_f[WINED3D_MAX_PS_CONSTS_F]; +@@ -3929,7 +3929,7 @@ struct wined3d_saved_states + DWORD ps_consts_f[WINED3D_MAX_PS_CONSTS_F >> 5]; WORD vertexShaderConstantsB; /* WINED3D_MAX_CONSTS_B, 16 */ WORD vertexShaderConstantsI; /* WINED3D_MAX_CONSTS_I, 16 */ -- BOOL vs_consts_f[WINED3D_MAX_VS_CONSTS_F]; -+ BOOL vs_consts_f[WINED3D_MAX_VS_CONSTS_F_SWVP]; +- DWORD vs_consts_f[WINED3D_MAX_VS_CONSTS_F >> 5]; ++ DWORD vs_consts_f[WINED3D_MAX_VS_CONSTS_F_SWVP >> 5]; DWORD textures : 20; /* WINED3D_MAX_COMBINED_SAMPLERS, 20 */ DWORD indices : 1; DWORD material : 1; -@@ -3990,7 +3990,7 @@ struct wined3d_stateblock - unsigned int num_contained_vs_consts_i; - DWORD contained_vs_consts_b[WINED3D_MAX_CONSTS_B]; - unsigned int num_contained_vs_consts_b; -- DWORD contained_vs_consts_f[WINED3D_MAX_VS_CONSTS_F]; -+ DWORD contained_vs_consts_f[WINED3D_MAX_VS_CONSTS_F_SWVP]; - unsigned int num_contained_vs_consts_f; - DWORD contained_ps_consts_i[WINED3D_MAX_CONSTS_I]; - unsigned int num_contained_ps_consts_i; diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h -index 605e44589dd..e9025f72015 100644 +index 3608d414d..8327f43ec 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h -@@ -2158,7 +2158,7 @@ struct wined3d_stateblock_state +@@ -2149,7 +2149,7 @@ struct wined3d_stateblock_state int base_vertex_index; struct wined3d_shader *vs;