From e59eb7639a5bd838c3f66162fb82a900b3ce3541 Mon Sep 17 00:00:00 2001 From: Alistair Leslie-Hughes Date: Thu, 8 Jul 2021 11:16:34 +1000 Subject: [PATCH] Rebase against 6763ed84cf0629dd7d1495263e1e3ea9aaf3d663. --- .../0002-gdi32-fix-for-rotated-ellipse.patch | 20 ++++---- .../0038-mfplat-Fix-copy-paste-error.patch | 25 ---------- ...te-usable-device-paths-into-HKLM-SYS.patch | 25 +++++----- ...t-the-critical-section-fast-path-on-.patch | 17 +++---- ...nt-SRW-locks-on-top-of-Win32-futexes.patch | 14 +++--- patches/patchinstall.sh | 28 ++--------- ...P-vertex-shader-float-constants-limi.patch | 16 +++---- ...SWVP-vertex-shader-constants-limit-i.patch | 39 ++++++++------- ...y-forbid-connecting-a-listening-or-c.patch | 48 ------------------- .../definition | 1 - staging/upstream-commit | 2 +- 11 files changed, 72 insertions(+), 163 deletions(-) delete mode 100644 patches/mfplat-streaming-support/0038-mfplat-Fix-copy-paste-error.patch delete mode 100644 patches/ws2_32-connect-already-connected/0001-server-Explicitly-forbid-connecting-a-listening-or-c.patch delete mode 100644 patches/ws2_32-connect-already-connected/definition diff --git a/patches/gdi32-rotation/0002-gdi32-fix-for-rotated-ellipse.patch b/patches/gdi32-rotation/0002-gdi32-fix-for-rotated-ellipse.patch index 5efc3d2e..fe8c928b 100644 --- a/patches/gdi32-rotation/0002-gdi32-fix-for-rotated-ellipse.patch +++ b/patches/gdi32-rotation/0002-gdi32-fix-for-rotated-ellipse.patch @@ -1,18 +1,18 @@ -From b278711b2c76680e6e26a114f74d7f7c26ff6328 Mon Sep 17 00:00:00 2001 +From 04fb703ad5b8f5de15fd2b23647ed662af0c4394 Mon Sep 17 00:00:00 2001 From: Daniel Wendt Date: Tue, 10 Dec 2013 14:55:32 +0100 Subject: [PATCH] gdi32: fix for rotated ellipse Bug: http://bugs.winehq.org/show_bug.cgi?id=35331 --- - dlls/gdi32/dibdrv/graphics.c | 60 +++++++++++++++++++++++++++++++------------- + dlls/gdi32/dibdrv/graphics.c | 60 +++++++++++++++++++++++++----------- 1 file changed, 42 insertions(+), 18 deletions(-) diff --git a/dlls/gdi32/dibdrv/graphics.c b/dlls/gdi32/dibdrv/graphics.c -index d269cc1..447aab5 100644 +index 9f58a68d35c..70d5864bc63 100644 --- a/dlls/gdi32/dibdrv/graphics.c +++ b/dlls/gdi32/dibdrv/graphics.c -@@ -1555,6 +1555,23 @@ BOOL dibdrv_RoundRect( PHYSDEV dev, INT left, INT top, INT right, INT bottom, +@@ -1554,6 +1554,23 @@ BOOL CDECL dibdrv_RoundRect( PHYSDEV dev, INT left, INT top, INT right, INT bott BOOL ret = TRUE; HRGN outline = 0, interior = 0; @@ -36,13 +36,13 @@ index d269cc1..447aab5 100644 if (!get_pen_device_rect( dc, pdev, &rect, left, top, right, bottom )) return TRUE; pt[0].x = pt[0].y = 0; -@@ -1575,23 +1592,6 @@ BOOL dibdrv_RoundRect( PHYSDEV dev, INT left, INT top, INT right, INT bottom, +@@ -1574,23 +1591,6 @@ BOOL CDECL dibdrv_RoundRect( PHYSDEV dev, INT left, INT top, INT right, INT bott return FALSE; } - if (pdev->brush.style != BS_NULL && -- !(interior = CreateRoundRectRgn( rect.left, rect.top, rect.right + 1, rect.bottom + 1, -- ellipse_width, ellipse_height ))) +- !(interior = NtGdiCreateRoundRectRgn( rect.left, rect.top, rect.right + 1, rect.bottom + 1, +- ellipse_width, ellipse_height ))) - { - HeapFree( GetProcessHeap(), 0, points ); - if (outline) DeleteObject( outline ); @@ -60,7 +60,7 @@ index d269cc1..447aab5 100644 count = ellipse_first_quadrant( ellipse_width, ellipse_height, points ); if (dc->ArcDirection == AD_CLOCKWISE) -@@ -1635,13 +1635,37 @@ BOOL dibdrv_RoundRect( PHYSDEV dev, INT left, INT top, INT right, INT bottom, +@@ -1634,13 +1634,37 @@ BOOL CDECL dibdrv_RoundRect( PHYSDEV dev, INT left, INT top, INT right, INT bott } count = end + 1; @@ -95,10 +95,10 @@ index d269cc1..447aab5 100644 if (interior) { -- CombineRgn( interior, interior, outline, RGN_DIFF ); +- NtGdiCombineRgn( interior, interior, outline, RGN_DIFF ); ret = brush_region( pdev, interior ); DeleteObject( interior ); } -- -1.9.1 +2.30.2 diff --git a/patches/mfplat-streaming-support/0038-mfplat-Fix-copy-paste-error.patch b/patches/mfplat-streaming-support/0038-mfplat-Fix-copy-paste-error.patch deleted file mode 100644 index 4d7dd883..00000000 --- a/patches/mfplat-streaming-support/0038-mfplat-Fix-copy-paste-error.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 7fb19224f43a76744fa44f25c4d9c50eba568c98 Mon Sep 17 00:00:00 2001 -From: Alistair Leslie-Hughes -Date: Mon, 28 Jun 2021 14:54:19 +1000 -Subject: [PATCH] mfplat: Fix copy/paste error - ---- - dlls/mfplat/buffer.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/dlls/mfplat/buffer.c b/dlls/mfplat/buffer.c -index c1829043e1b..9081dc39eab 100644 ---- a/dlls/mfplat/buffer.c -+++ b/dlls/mfplat/buffer.c -@@ -1473,7 +1473,7 @@ static HRESULT create_dxgi_surface_buffer(IUnknown *surface, unsigned int sub_re - object->_2d.width = stride; - object->_2d.height = desc.Height; - object->max_length = object->_2d.plane_size; -- object->_2d.copy_image = get_2d_buffer_copy_func(desc.Format); -+ object->_2d.copy_image = get_2d_buffer_copy_func(format); - - if (FAILED(hr = init_attributes_object(&object->dxgi_surface.attributes, 0))) - { --- -2.30.2 - diff --git a/patches/mountmgr-DosDevices/0001-mountmgr.sys-Write-usable-device-paths-into-HKLM-SYS.patch b/patches/mountmgr-DosDevices/0001-mountmgr.sys-Write-usable-device-paths-into-HKLM-SYS.patch index 4685f1e2..11d5f7b5 100644 --- a/patches/mountmgr-DosDevices/0001-mountmgr.sys-Write-usable-device-paths-into-HKLM-SYS.patch +++ b/patches/mountmgr-DosDevices/0001-mountmgr.sys-Write-usable-device-paths-into-HKLM-SYS.patch @@ -1,4 +1,4 @@ -From 63e6c0777437ce33d4a73a4b99581ca10f86b941 Mon Sep 17 00:00:00 2001 +From 0a08aa6899527ecb02171b95e777d0549489fe3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Mon, 30 Mar 2015 04:01:51 +0200 Subject: [PATCH] mountmgr.sys: Write usable device paths into @@ -11,14 +11,14 @@ Based on a patch by Bernhard Übelacker. --- dlls/mountmgr.sys/device.c | 4 ++-- dlls/mountmgr.sys/mountmgr.c | 11 +++++++++-- - dlls/mountmgr.sys/mountmgr.h | 3 +-- - 3 files changed, 12 insertions(+), 6 deletions(-) + dlls/mountmgr.sys/mountmgr.h | 3 ++- + 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/dlls/mountmgr.sys/device.c b/dlls/mountmgr.sys/device.c -index e77f8904040..87609bf3de2 100644 +index c8e7d6bf088..426187a4512 100644 --- a/dlls/mountmgr.sys/device.c +++ b/dlls/mountmgr.sys/device.c -@@ -516,8 +516,8 @@ static NTSTATUS set_volume_info( struct volume *volume, struct dos_drive *drive, +@@ -1205,8 +1205,8 @@ static NTSTATUS set_volume_info( struct volume *volume, struct dos_drive *drive, id = disk_device->unix_mount; id_len = strlen( disk_device->unix_mount ) + 1; } @@ -30,10 +30,10 @@ index e77f8904040..87609bf3de2 100644 return STATUS_SUCCESS; } diff --git a/dlls/mountmgr.sys/mountmgr.c b/dlls/mountmgr.sys/mountmgr.c -index bc2b776a92f..e9dc04fe551 100644 +index 50be9eb740f..6667d214560 100644 --- a/dlls/mountmgr.sys/mountmgr.c +++ b/dlls/mountmgr.sys/mountmgr.c -@@ -47,14 +47,21 @@ struct mount_point +@@ -55,14 +55,21 @@ struct mount_point static struct list mount_points_list = LIST_INIT(mount_points_list); static HKEY mount_key; @@ -58,18 +58,19 @@ index bc2b776a92f..e9dc04fe551 100644 else mount->id_len = 0; } diff --git a/dlls/mountmgr.sys/mountmgr.h b/dlls/mountmgr.sys/mountmgr.h -index 95386a44f84..2a7bf41b475 100644 +index 85c58062275..3454b1a8c73 100644 --- a/dlls/mountmgr.sys/mountmgr.h +++ b/dlls/mountmgr.sys/mountmgr.h -@@ -69,7 +69,6 @@ extern struct mount_point *add_dosdev_mount_point( DEVICE_OBJECT *device, UNICOD +@@ -106,7 +106,8 @@ extern struct mount_point *add_dosdev_mount_point( DEVICE_OBJECT *device, UNICOD extern struct mount_point *add_volume_mount_point( DEVICE_OBJECT *device, UNICODE_STRING *device_name, const GUID *guid ) DECLSPEC_HIDDEN; extern void delete_mount_point( struct mount_point *mount ) DECLSPEC_HIDDEN; -extern void set_mount_point_id( struct mount_point *mount, const void *id, unsigned int id_len ) DECLSPEC_HIDDEN; -- ++ +extern void set_mount_point_id( struct mount_point *mount, const void *id, unsigned int id_len, int drive ) DECLSPEC_HIDDEN; - extern ULONG get_dhcp_request_param( const WCHAR *adapter, struct mountmgr_dhcp_request_param *param, char *buf, + + extern ULONG get_dhcp_request_param( const NET_LUID *adapter, struct mountmgr_dhcp_request_param *param, char *buf, ULONG offset, ULONG size ) DECLSPEC_HIDDEN; -- -2.24.0 +2.30.2 diff --git a/patches/ntdll-NtAlertThreadByThreadId/0009-ntdll-Reimplement-the-critical-section-fast-path-on-.patch b/patches/ntdll-NtAlertThreadByThreadId/0009-ntdll-Reimplement-the-critical-section-fast-path-on-.patch index a81bf708..d08f9759 100644 --- a/patches/ntdll-NtAlertThreadByThreadId/0009-ntdll-Reimplement-the-critical-section-fast-path-on-.patch +++ b/patches/ntdll-NtAlertThreadByThreadId/0009-ntdll-Reimplement-the-critical-section-fast-path-on-.patch @@ -1,4 +1,4 @@ -From acfa81780932de0b511e0454056ad82d1fcccc98 Mon Sep 17 00:00:00 2001 +From aaa6e2824cd84e2317017c5436c03621a890cc0c Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Mon, 31 Aug 2020 23:38:09 -0500 Subject: [PATCH] ntdll: Reimplement the critical section fast path on top of @@ -9,9 +9,9 @@ Signed-off-by: Zebediah Figura dlls/ntdll/sync.c | 35 +++++++---- dlls/ntdll/unix/loader.c | 3 - dlls/ntdll/unix/sync.c | 109 --------------------------------- - dlls/ntdll/unix/unix_private.h | 3 - + dlls/ntdll/unix/unix_private.h | 4 -- dlls/ntdll/unixlib.h | 3 - - 5 files changed, 23 insertions(+), 130 deletions(-) + 5 files changed, 23 insertions(+), 131 deletions(-) diff --git a/dlls/ntdll/sync.c b/dlls/ntdll/sync.c index c73fb09da47..6edf104c5e9 100644 @@ -83,10 +83,10 @@ index c73fb09da47..6edf104c5e9 100644 return ret; } diff --git a/dlls/ntdll/unix/loader.c b/dlls/ntdll/unix/loader.c -index b51d726c5e4..063f48148d7 100644 +index e21cf8631d7..97bb9e510b2 100644 --- a/dlls/ntdll/unix/loader.c +++ b/dlls/ntdll/unix/loader.c -@@ -1822,9 +1822,6 @@ static struct unix_funcs unix_funcs = +@@ -1872,9 +1872,6 @@ static struct unix_funcs unix_funcs = #endif DbgUiIssueRemoteBreakin, RtlGetSystemTimePrecise, @@ -217,13 +217,14 @@ index 5e49593fa4a..84f7c937be3 100644 /* Futex-based SRW lock implementation: diff --git a/dlls/ntdll/unix/unix_private.h b/dlls/ntdll/unix/unix_private.h -index 9b27dc7ee7d..7460387c4bb 100644 +index 090f6afdf29..5e3dbebee4c 100644 --- a/dlls/ntdll/unix/unix_private.h +++ b/dlls/ntdll/unix/unix_private.h -@@ -95,9 +95,6 @@ extern NTSTATUS (WINAPI *pKiUserExceptionDispatcher)(EXCEPTION_RECORD*,CONTEXT*) - extern void (WINAPI *pLdrInitializeThunk)(CONTEXT*,void**,ULONG_PTR,ULONG_PTR) DECLSPEC_HIDDEN; +@@ -96,10 +96,6 @@ extern void (WINAPI *pLdrInitializeThunk)(CONTEXT*,void**,ULONG_PTR,ULONG_PT extern void (WINAPI *pRtlUserThreadStart)( PRTL_THREAD_START_ROUTINE entry, void *arg ) DECLSPEC_HIDDEN; extern void (WINAPI *p__wine_ctrl_routine)(void *) DECLSPEC_HIDDEN; + extern SYSTEM_DLL_INIT_BLOCK *pLdrSystemDllInitBlock DECLSPEC_HIDDEN; +- -extern NTSTATUS CDECL fast_RtlpWaitForCriticalSection( RTL_CRITICAL_SECTION *crit, int timeout ) DECLSPEC_HIDDEN; -extern NTSTATUS CDECL fast_RtlpUnWaitCriticalSection( RTL_CRITICAL_SECTION *crit ) DECLSPEC_HIDDEN; -extern NTSTATUS CDECL fast_RtlDeleteCriticalSection( RTL_CRITICAL_SECTION *crit ) DECLSPEC_HIDDEN; diff --git a/patches/ntdll-NtAlertThreadByThreadId/0011-ntdll-Reimplement-SRW-locks-on-top-of-Win32-futexes.patch b/patches/ntdll-NtAlertThreadByThreadId/0011-ntdll-Reimplement-SRW-locks-on-top-of-Win32-futexes.patch index 1050dcec..9f52ba46 100644 --- a/patches/ntdll-NtAlertThreadByThreadId/0011-ntdll-Reimplement-SRW-locks-on-top-of-Win32-futexes.patch +++ b/patches/ntdll-NtAlertThreadByThreadId/0011-ntdll-Reimplement-SRW-locks-on-top-of-Win32-futexes.patch @@ -1,4 +1,4 @@ -From 79a9bdf605de59b3f1800ef577327af6fa565b62 Mon Sep 17 00:00:00 2001 +From 10e7bf638ebb34278c5fe3adcb360556aa73d999 Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Sun, 22 Nov 2020 20:51:10 -0600 Subject: [PATCH] ntdll: Reimplement SRW locks on top of Win32 futexes. @@ -392,10 +392,10 @@ index 4b92379a0ff..2edc9f8d558 100644 /*********************************************************************** diff --git a/dlls/ntdll/unix/loader.c b/dlls/ntdll/unix/loader.c -index e40bff5ba3e..d88be456bff 100644 +index 5b2619ff92f..c6f9227dd90 100644 --- a/dlls/ntdll/unix/loader.c +++ b/dlls/ntdll/unix/loader.c -@@ -1822,12 +1822,6 @@ static struct unix_funcs unix_funcs = +@@ -1872,12 +1872,6 @@ static struct unix_funcs unix_funcs = #endif DbgUiIssueRemoteBreakin, RtlGetSystemTimePrecise, @@ -746,13 +746,13 @@ index 45b0b03bda0..82094813570 100644 - -#endif diff --git a/dlls/ntdll/unix/unix_private.h b/dlls/ntdll/unix/unix_private.h -index f17d527b2ed..541d395a615 100644 +index 2f642ed77f7..9e500b3dc95 100644 --- a/dlls/ntdll/unix/unix_private.h +++ b/dlls/ntdll/unix/unix_private.h -@@ -104,12 +104,6 @@ extern NTSTATUS (WINAPI *pKiUserExceptionDispatcher)(EXCEPTION_RECORD*,CONTEXT*) - extern void (WINAPI *pLdrInitializeThunk)(CONTEXT*,void**,ULONG_PTR,ULONG_PTR) DECLSPEC_HIDDEN; +@@ -96,12 +96,6 @@ extern void (WINAPI *pLdrInitializeThunk)(CONTEXT*,void**,ULONG_PTR,ULONG_PT extern void (WINAPI *pRtlUserThreadStart)( PRTL_THREAD_START_ROUTINE entry, void *arg ) DECLSPEC_HIDDEN; extern void (WINAPI *p__wine_ctrl_routine)(void *) DECLSPEC_HIDDEN; + extern SYSTEM_DLL_INIT_BLOCK *pLdrSystemDllInitBlock DECLSPEC_HIDDEN; -extern NTSTATUS CDECL fast_RtlTryAcquireSRWLockExclusive( RTL_SRWLOCK *lock ) DECLSPEC_HIDDEN; -extern NTSTATUS CDECL fast_RtlAcquireSRWLockExclusive( RTL_SRWLOCK *lock ) DECLSPEC_HIDDEN; -extern NTSTATUS CDECL fast_RtlTryAcquireSRWLockShared( RTL_SRWLOCK *lock ) DECLSPEC_HIDDEN; @@ -763,7 +763,7 @@ index f17d527b2ed..541d395a615 100644 extern void CDECL virtual_release_address_space(void) DECLSPEC_HIDDEN; diff --git a/dlls/ntdll/unixlib.h b/dlls/ntdll/unixlib.h -index 1fab653728c..1a38d80eeb8 100644 +index e90000c13e9..742f1a7b681 100644 --- a/dlls/ntdll/unixlib.h +++ b/dlls/ntdll/unixlib.h @@ -26,7 +26,7 @@ diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 80ffa6a2..1fc65cd7 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -51,7 +51,7 @@ usage() # Get the upstream commit sha upstream_commit() { - echo "adffa11609093c3c21cf43970bbecda1b2c43eb1" + echo "6763ed84cf0629dd7d1495263e1e3ea9aaf3d663" } # Show version information @@ -278,7 +278,6 @@ patch_enable_all () enable_winmm_mciSendCommandA="$1" enable_wintab32_improvements="$1" enable_wintrust_WTHelperGetProvCertFromChain="$1" - enable_ws2_32_connect_already_connected="$1" enable_wscript_support_d_u_switches="$1" enable_xactengine_initial="$1" enable_xactengine3_7_Notification="$1" @@ -877,9 +876,6 @@ patch_enable () wintrust-WTHelperGetProvCertFromChain) enable_wintrust_WTHelperGetProvCertFromChain="$2" ;; - ws2_32-connect-already-connected) - enable_ws2_32_connect_already_connected="$2" - ;; wscript-support-d-u-switches) enable_wscript_support_d_u_switches="$2" ;; @@ -2395,11 +2391,10 @@ fi # | * [#49692] Multiple applications need a Media Foundation media source implementation # | # | Modified files: -# | * dlls/mf/topology.c, dlls/mfplat/buffer.c, dlls/mfplat/main.c, dlls/winegstreamer/Makefile.in, -# | dlls/winegstreamer/audioconvert.c, dlls/winegstreamer/colorconvert.c, dlls/winegstreamer/decode_transform.c, -# | dlls/winegstreamer/gst_private.h, dlls/winegstreamer/media_source.c, dlls/winegstreamer/mfplat.c, -# | dlls/winegstreamer/quartz_parser.c, dlls/winegstreamer/wg_parser.c, dlls/winegstreamer/winegstreamer_classes.idl, -# | include/mfidl.idl, include/wmcodecdsp.idl +# | * dlls/mf/topology.c, dlls/mfplat/main.c, dlls/winegstreamer/Makefile.in, dlls/winegstreamer/audioconvert.c, +# | dlls/winegstreamer/colorconvert.c, dlls/winegstreamer/decode_transform.c, dlls/winegstreamer/gst_private.h, +# | dlls/winegstreamer/media_source.c, dlls/winegstreamer/mfplat.c, dlls/winegstreamer/quartz_parser.c, +# | dlls/winegstreamer/wg_parser.c, dlls/winegstreamer/winegstreamer_classes.idl, include/mfidl.idl, include/wmcodecdsp.idl # | if test "$enable_mfplat_streaming_support" -eq 1; then patch_apply mfplat-streaming-support/0001-winegstreamer-Activate-source-pad-in-push-mode-if-it.patch @@ -2439,7 +2434,6 @@ if test "$enable_mfplat_streaming_support" -eq 1; then patch_apply mfplat-streaming-support/0035-mfplat-Stub-out-MFCreateDXGIDeviceManager-to-avoid-t.patch patch_apply mfplat-streaming-support/0036-winegstreamer-Don-t-rely-on-max_size-in-unseekable-p.patch patch_apply mfplat-streaming-support/0037-winegstreamer-Implement-MFT_MESSAGE_COMMAND_FLUSH-fo.patch - patch_apply mfplat-streaming-support/0038-mfplat-Fix-copy-paste-error.patch patch_apply mfplat-streaming-support/0039-winegstreamer-Default-Frame-size-if-one-isn-t-availa.patch fi @@ -4204,18 +4198,6 @@ if test "$enable_wintrust_WTHelperGetProvCertFromChain" -eq 1; then patch_apply wintrust-WTHelperGetProvCertFromChain/0001-wintrust-Add-parameter-check-in-WTHelperGetProvCertF.patch fi -# Patchset ws2_32-connect-already-connected -# | -# | This patchset fixes the following Wine bugs: -# | * [#51381] ws2_32: return correct error code when already connected. -# | -# | Modified files: -# | * server/sock.c -# | -if test "$enable_ws2_32_connect_already_connected" -eq 1; then - patch_apply ws2_32-connect-already-connected/0001-server-Explicitly-forbid-connecting-a-listening-or-c.patch -fi - # Patchset wscript-support-d-u-switches # | # | This patchset fixes the following Wine bugs: diff --git a/patches/wined3d-SWVP-shaders/0002-d3d9-Support-SWVP-vertex-shader-float-constants-limi.patch b/patches/wined3d-SWVP-shaders/0002-d3d9-Support-SWVP-vertex-shader-float-constants-limi.patch index 24e6b241..5d1f53ce 100644 --- a/patches/wined3d-SWVP-shaders/0002-d3d9-Support-SWVP-vertex-shader-float-constants-limi.patch +++ b/patches/wined3d-SWVP-shaders/0002-d3d9-Support-SWVP-vertex-shader-float-constants-limi.patch @@ -1,4 +1,4 @@ -From a53e3b95850d3af54f919c219a2fc02e88f3f965 Mon Sep 17 00:00:00 2001 +From 474a1f4337afc7d612dda95b607fd01652aae8f1 Mon Sep 17 00:00:00 2001 From: Paul Gofman Date: Mon, 25 Feb 2019 14:24:50 +0300 Subject: [PATCH] d3d9: Support SWVP vertex shader float constants limits. @@ -10,7 +10,7 @@ Subject: [PATCH] d3d9: Support SWVP vertex shader float constants limits. 3 files changed, 29 insertions(+), 9 deletions(-) diff --git a/dlls/d3d9/d3d9_private.h b/dlls/d3d9/d3d9_private.h -index 7bb277c2a75..eff04c448d7 100644 +index 50c3b38d795..13e93316c6f 100644 --- a/dlls/d3d9/d3d9_private.h +++ b/dlls/d3d9/d3d9_private.h @@ -40,6 +40,7 @@ @@ -31,7 +31,7 @@ index 7bb277c2a75..eff04c448d7 100644 struct fvf_declaration diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c -index 2cd9d73d0d9..6df6f0099ee 100644 +index c8b906a981f..b271d8385b8 100644 --- a/dlls/d3d9/device.c +++ b/dlls/d3d9/device.c @@ -367,7 +367,7 @@ static BOOL wined3d_swapchain_desc_from_d3d9(struct wined3d_swapchain_desc *swap @@ -80,7 +80,7 @@ index 2cd9d73d0d9..6df6f0099ee 100644 return hr; } -@@ -3647,14 +3653,20 @@ static HRESULT WINAPI d3d9_device_SetVertexShaderConstantF(IDirect3DDevice9Ex *i +@@ -3654,14 +3660,20 @@ static HRESULT WINAPI d3d9_device_SetVertexShaderConstantF(IDirect3DDevice9Ex *i UINT reg_idx, const float *data, UINT count) { struct d3d9_device *device = impl_from_IDirect3DDevice9Ex(iface); @@ -103,7 +103,7 @@ index 2cd9d73d0d9..6df6f0099ee 100644 return D3DERR_INVALIDCALL; } -@@ -3670,14 +3682,21 @@ static HRESULT WINAPI d3d9_device_GetVertexShaderConstantF(IDirect3DDevice9Ex *i +@@ -3677,14 +3689,21 @@ static HRESULT WINAPI d3d9_device_GetVertexShaderConstantF(IDirect3DDevice9Ex *i UINT start_idx, float *constants, UINT count) { struct d3d9_device *device = impl_from_IDirect3DDevice9Ex(iface); @@ -116,17 +116,17 @@ index 2cd9d73d0d9..6df6f0099ee 100644 if (!constants) return D3DERR_INVALIDCALL; -- if (start_idx >= device->vs_uniform_count || count > device->vs_uniform_count - start_idx) +- if (!wined3d_bound_range(start_idx, count, device->vs_uniform_count)) + wined3d_device_get_creation_parameters(device->wined3d_device, &creation_parameters); + max_constants = creation_parameters.flags + & (WINED3DCREATE_SOFTWARE_VERTEXPROCESSING | WINED3DCREATE_MIXED_VERTEXPROCESSING) + ? D3D9_MAX_VERTEX_SHADER_CONSTANTF_SWVP : D3D9_MAX_VERTEX_SHADER_CONSTANTF; + -+ if (start_idx >= max_constants || count > max_constants - start_idx) ++ if (!wined3d_bound_range(start_idx, count, max_constants)) { WARN("Trying to access %u constants, but d3d9 only supports %u\n", start_idx + count, device->vs_uniform_count); -@@ -4735,7 +4754,7 @@ HRESULT device_init(struct d3d9_device *device, struct d3d9 *parent, struct wine +@@ -4742,7 +4761,7 @@ HRESULT device_init(struct d3d9_device *device, struct d3d9 *parent, struct wine device->immediate_context = wined3d_device_get_immediate_context(device->wined3d_device); wined3d_get_device_caps(wined3d_adapter, wined3d_device_type_from_d3d(device_type), &wined3d_caps); 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 3f66715f..32ab1435 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 734d51c817f0a3d3775716fbe3e66ccbbd04ad65 Mon Sep 17 00:00:00 2001 +From f3d97f4e2e9e720a0b75666b05362f3450b2496e 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 @@ -9,10 +9,10 @@ Subject: [PATCH] wined3d: Support SWVP vertex shader constants limit in state dlls/d3d9/tests/visual.c | 1 - dlls/wined3d/device.c | 6 ++++-- dlls/wined3d/glsl_shader.c | 2 +- - dlls/wined3d/stateblock.c | 23 ++++++++++++++--------- + dlls/wined3d/stateblock.c | 22 ++++++++++++++-------- dlls/wined3d/wined3d_private.h | 13 +++++++++++-- include/wine/wined3d.h | 2 +- - 7 files changed, 31 insertions(+), 21 deletions(-) + 7 files changed, 31 insertions(+), 20 deletions(-) diff --git a/dlls/d3d9/tests/device.c b/dlls/d3d9/tests/device.c index 3ef9361886d..86dd47383df 100644 @@ -61,10 +61,10 @@ index 40585d5257d..6377addec24 100644 hr = IDirect3DDevice9_BeginScene(device); diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c -index f2ed842a0bb..1181e311075 100644 +index 09c1dce8dd9..91cfde663d1 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c -@@ -3558,7 +3558,7 @@ void CDECL wined3d_device_apply_stateblock(struct wined3d_device *device, +@@ -3606,7 +3606,7 @@ void CDECL wined3d_device_apply_stateblock(struct wined3d_device *device, const struct wined3d_saved_states *changed = &stateblock->changed; const unsigned int word_bit_count = sizeof(DWORD) * CHAR_BIT; struct wined3d_device_context *context = &device->cs->c; @@ -73,7 +73,7 @@ index f2ed842a0bb..1181e311075 100644 struct wined3d_range range; uint32_t map; -@@ -3569,9 +3569,11 @@ void CDECL wined3d_device_apply_stateblock(struct wined3d_device *device, +@@ -3617,9 +3617,11 @@ void CDECL wined3d_device_apply_stateblock(struct wined3d_device *device, if (changed->pixelShader) wined3d_device_context_set_shader(context, WINED3D_SHADER_TYPE_PIXEL, state->ps); @@ -87,7 +87,7 @@ index f2ed842a0bb..1181e311075 100644 wined3d_device_set_vs_consts_f(device, range.offset, range.size, &state->vs_consts_f[range.offset]); diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c -index e6a5f3f3b88..1f719688b9d 100644 +index 152139757c6..e4cafd6a4cc 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -1910,7 +1910,7 @@ static void shader_glsl_update_float_vertex_constants(struct wined3d_device *dev @@ -100,7 +100,7 @@ index e6a5f3f3b88..1f719688b9d 100644 update_heap_entry(heap, i, priv->next_constant_version); } diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c -index 1f1ba262336..b939da02e61 100644 +index 4cf30941d62..363bfb3b900 100644 --- a/dlls/wined3d/stateblock.c +++ b/dlls/wined3d/stateblock.c @@ -731,8 +731,8 @@ void CDECL wined3d_stateblock_capture(struct wined3d_stateblock *stateblock, @@ -149,7 +149,7 @@ index 1f1ba262336..b939da02e61 100644 break; wined3d_stateblock_set_vs_consts_f(device_state, range.offset, range.size, &state->vs_consts_f[range.offset]); } -@@ -1199,13 +1203,14 @@ static void wined3d_bitmap_set_bits(uint32_t *bitmap, unsigned int start, unsign +@@ -1199,12 +1203,14 @@ static void wined3d_bitmap_set_bits(uint32_t *bitmap, unsigned int start, unsign HRESULT CDECL wined3d_stateblock_set_vs_consts_f(struct wined3d_stateblock *stateblock, unsigned int start_idx, unsigned int count, const struct wined3d_vec4 *constants) { @@ -159,15 +159,14 @@ index 1f1ba262336..b939da02e61 100644 TRACE("stateblock %p, start_idx %u, count %u, constants %p.\n", stateblock, start_idx, count, constants); -- if (!constants || start_idx >= d3d_info->limits.vs_uniform_count -- || count > d3d_info->limits.vs_uniform_count - start_idx) +- if (!constants || !wined3d_bound_range(start_idx, count, d3d_info->limits.vs_uniform_count)) + constants_count = wined3d_device_get_vs_uniform_count(stateblock->device); + -+ if (!constants || start_idx >= constants_count || count > constants_count - start_idx) ++ if (!constants || !wined3d_bound_range(start_idx, count, constants_count)) return WINED3DERR_INVALIDCALL; memcpy(&stateblock->stateblock_state.vs_consts_f[start_idx], constants, count * sizeof(*constants)); -@@ -2013,7 +2018,7 @@ static HRESULT stateblock_init(struct wined3d_stateblock *stateblock, const stru +@@ -2011,7 +2017,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, @@ -176,7 +175,7 @@ index 1f1ba262336..b939da02e61 100644 break; case WINED3D_SBT_PIXEL_STATE: -@@ -2025,7 +2030,7 @@ static HRESULT stateblock_init(struct wined3d_stateblock *stateblock, const stru +@@ -2023,7 +2029,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, @@ -186,10 +185,10 @@ index 1f1ba262336..b939da02e61 100644 default: diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h -index 3c2d2da4ac9..8ce9eeb0dda 100644 +index 28390d8f348..6afbcfb2cfd 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h -@@ -3696,7 +3696,7 @@ struct wined3d_state +@@ -3717,7 +3717,7 @@ struct wined3d_state struct wined3d_shader_resource_view *shader_resource_view[WINED3D_SHADER_TYPE_COUNT][MAX_SHADER_RESOURCE_VIEWS]; struct wined3d_unordered_access_view *unordered_access_view[WINED3D_PIPELINE_COUNT][MAX_UNORDERED_ACCESS_VIEWS]; @@ -198,7 +197,7 @@ index 3c2d2da4ac9..8ce9eeb0dda 100644 struct wined3d_ivec4 vs_consts_i[WINED3D_MAX_CONSTS_I]; BOOL vs_consts_b[WINED3D_MAX_CONSTS_B]; -@@ -3869,6 +3869,15 @@ HRESULT wined3d_device_set_implicit_swapchain(struct wined3d_device *device, +@@ -3893,6 +3893,15 @@ HRESULT wined3d_device_set_implicit_swapchain(struct wined3d_device *device, struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN; void wined3d_device_uninit_3d(struct wined3d_device *device) DECLSPEC_HIDDEN; @@ -214,7 +213,7 @@ index 3c2d2da4ac9..8ce9eeb0dda 100644 struct wined3d_device_no3d { struct wined3d_device d; -@@ -4593,7 +4602,7 @@ struct wined3d_vertex_declaration +@@ -4625,7 +4634,7 @@ struct wined3d_vertex_declaration struct wined3d_saved_states { @@ -224,10 +223,10 @@ index 3c2d2da4ac9..8ce9eeb0dda 100644 WORD vertexShaderConstantsB; /* WINED3D_MAX_CONSTS_B, 16 */ uint32_t ps_consts_f[WINED3D_BITMAP_SIZE(WINED3D_MAX_PS_CONSTS_F)]; diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h -index 85416b4594a..7a2829179a4 100644 +index cab4a2bc958..5cd71b8268c 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h -@@ -2191,7 +2191,7 @@ struct wined3d_stateblock_state +@@ -2189,7 +2189,7 @@ struct wined3d_stateblock_state int base_vertex_index; struct wined3d_shader *vs; diff --git a/patches/ws2_32-connect-already-connected/0001-server-Explicitly-forbid-connecting-a-listening-or-c.patch b/patches/ws2_32-connect-already-connected/0001-server-Explicitly-forbid-connecting-a-listening-or-c.patch deleted file mode 100644 index 7f451f5f..00000000 --- a/patches/ws2_32-connect-already-connected/0001-server-Explicitly-forbid-connecting-a-listening-or-c.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 105e57e403272c3e57a4836b5ed06c4651942a6e Mon Sep 17 00:00:00 2001 -From: Zebediah Figura -Date: Sat, 3 Jul 2021 17:18:32 +1000 -Subject: [PATCH] server: Explicitly forbid connecting a listening or connected - socket. - ---- - server/sock.c | 23 ++++++++++++++++++----- - 1 file changed, 18 insertions(+), 5 deletions(-) - -diff --git a/server/sock.c b/server/sock.c -index befa9117c13..9fc66f95335 100644 ---- a/server/sock.c -+++ b/server/sock.c -@@ -2161,12 +2161,25 @@ static int sock_ioctl( struct fd *fd, ioctl_code_t code, struct async *async ) - return 0; - } - -- if (sock->state == SOCK_CONNECTING) -+ switch (sock->state) - { -- /* FIXME: STATUS_ADDRESS_ALREADY_ASSOCIATED probably isn't right, -- * but there's no status code that maps to WSAEALREADY... */ -- set_error( params->synchronous ? STATUS_ADDRESS_ALREADY_ASSOCIATED : STATUS_INVALID_PARAMETER ); -- return 0; -+ case SOCK_LISTENING: -+ set_error( STATUS_INVALID_PARAMETER ); -+ return 0; -+ -+ case SOCK_CONNECTING: -+ /* FIXME: STATUS_ADDRESS_ALREADY_ASSOCIATED probably isn't right, -+ * but there's no status code that maps to WSAEALREADY... */ -+ set_error( params->synchronous ? STATUS_ADDRESS_ALREADY_ASSOCIATED : STATUS_INVALID_PARAMETER ); -+ return 0; -+ -+ case SOCK_CONNECTED: -+ set_error( STATUS_CONNECTION_ACTIVE ); -+ return 0; -+ -+ case SOCK_UNCONNECTED: -+ case SOCK_CONNECTIONLESS: -+ break; - } - - unix_len = sockaddr_to_unix( addr, params->addr_len, &unix_addr ); --- -2.30.2 - diff --git a/patches/ws2_32-connect-already-connected/definition b/patches/ws2_32-connect-already-connected/definition deleted file mode 100644 index e818fe51..00000000 --- a/patches/ws2_32-connect-already-connected/definition +++ /dev/null @@ -1 +0,0 @@ -Fixes: [51381] ws2_32: return correct error code when already connected. diff --git a/staging/upstream-commit b/staging/upstream-commit index c59793aa..8cc5e401 100644 --- a/staging/upstream-commit +++ b/staging/upstream-commit @@ -1 +1 @@ -adffa11609093c3c21cf43970bbecda1b2c43eb1 +6763ed84cf0629dd7d1495263e1e3ea9aaf3d663