From 59d19c89636fb3bdc5fce3eb20d886eb4640aa18 Mon Sep 17 00:00:00 2001 From: Paul Gofman Date: Wed, 12 Feb 2020 02:37:57 +0300 Subject: [PATCH] Rebase against d1373e8aae1b15b96e847488e4b6617789f8fb62. --- ...to-using-a-structure-for-extra-stora.patch | 251 ---------- ...2-bpp-bitmaps-with-an-alpha-channel-.patch | 152 ------ patches/comctl32-alpha-bitmaps/definition | 1 - ...ze-bump-luminance-X8L8V8U8-when-load.patch | 51 -- ...mat-description-for-X8L8V8U8-for-for.patch | 24 - patches/d3dx9_36-BumpLuminance/definition | 1 - ...ment-D3DXCreateKeyframedAnimationSet.patch | 446 ------------------ .../definition | 1 - ...tion-of-dangling-reparse-points-to-n.patch | 29 +- ...ntdll-Find-dangling-symlinks-quickly.patch | 16 +- ...low-special-characters-in-pipe-names.patch | 18 +- patches/patchinstall.sh | 60 +-- ...lementSetupAddSectionToDiskSpaceList.patch | 40 +- ...P-vertex-shader-float-constants-limi.patch | 47 +- 14 files changed, 79 insertions(+), 1058 deletions(-) delete mode 100644 patches/comctl32-alpha-bitmaps/0001-comctl32-Switch-to-using-a-structure-for-extra-stora.patch delete mode 100644 patches/comctl32-alpha-bitmaps/0002-comctl32-Paint-32-bpp-bitmaps-with-an-alpha-channel-.patch delete mode 100644 patches/comctl32-alpha-bitmaps/definition delete mode 100644 patches/d3dx9_36-BumpLuminance/0001-d3dx9_36-Recognize-bump-luminance-X8L8V8U8-when-load.patch delete mode 100644 patches/d3dx9_36-BumpLuminance/0002-d3dx9_36-Add-format-description-for-X8L8V8U8-for-for.patch delete mode 100644 patches/d3dx9_36-BumpLuminance/definition delete mode 100644 patches/d3dx9_36-D3DXCreateKeyframedAnimationSet/0001-d3dx9_36-Implement-D3DXCreateKeyframedAnimationSet.patch delete mode 100644 patches/d3dx9_36-D3DXCreateKeyframedAnimationSet/definition diff --git a/patches/comctl32-alpha-bitmaps/0001-comctl32-Switch-to-using-a-structure-for-extra-stora.patch b/patches/comctl32-alpha-bitmaps/0001-comctl32-Switch-to-using-a-structure-for-extra-stora.patch deleted file mode 100644 index e67f4dcd..00000000 --- a/patches/comctl32-alpha-bitmaps/0001-comctl32-Switch-to-using-a-structure-for-extra-stora.patch +++ /dev/null @@ -1,251 +0,0 @@ -From ebbaf56bdb75f853dafdbbffba81233784ecb618 Mon Sep 17 00:00:00 2001 -From: Dmitry Timoshkov -Date: Sat, 4 May 2019 18:21:05 +0800 -Subject: [PATCH 1/2] comctl32: Switch to using a structure for extra storage. -Content-Type: text/plain; charset=UTF-8 -To: wine-devel@winehq.org - -These patches aim to fix the bug 47018. - -Signed-off-by: Dmitry Timoshkov ---- - dlls/comctl32/static.c | 92 ++++++++++++++++++++++++++++++++++-------- - 1 file changed, 76 insertions(+), 16 deletions(-) - -diff --git a/dlls/comctl32/static.c b/dlls/comctl32/static.c -index 5cc02ced97..d08710c06f 100644 ---- a/dlls/comctl32/static.c -+++ b/dlls/comctl32/static.c -@@ -36,6 +36,7 @@ - #include "winuser.h" - #include "commctrl.h" - -+#include "wine/heap.h" - #include "wine/debug.h" - - #include "comctl32.h" -@@ -50,10 +51,16 @@ static void STATIC_PaintBitmapfn( HWND hwnd, HDC hdc, DWORD style ); - static void STATIC_PaintEnhMetafn( HWND hwnd, HDC hdc, DWORD style ); - static void STATIC_PaintEtchedfn( HWND hwnd, HDC hdc, DWORD style ); - --/* offsets for GetWindowLong for static private information */ --#define HFONT_GWL_OFFSET 0 --#define HICON_GWL_OFFSET (sizeof(HFONT)) --#define STATIC_EXTRA_BYTES (HICON_GWL_OFFSET + sizeof(HICON)) -+struct static_extra_info -+{ -+ HFONT hfont; -+ union -+ { -+ HICON hicon; -+ HBITMAP hbitmap; -+ HENHMETAFILE hemf; -+ } image; -+}; - - typedef void (*pfPaint)( HWND hwnd, HDC hdc, DWORD style ); - -@@ -80,6 +87,18 @@ static const pfPaint staticPaintFunc[SS_TYPEMASK+1] = - STATIC_PaintEtchedfn, /* SS_ETCHEDFRAME */ - }; - -+static struct static_extra_info *get_extra_ptr( HWND hwnd, BOOL force ) -+{ -+ struct static_extra_info *extra = (struct static_extra_info *)GetWindowLongPtrW( hwnd, 0 ); -+ if (!extra && force) -+ { -+ extra = heap_alloc_zero( sizeof(*extra) ); -+ if (extra) -+ SetWindowLongPtrW( hwnd, 0, (ULONG_PTR)extra ); -+ } -+ return extra; -+} -+ - static BOOL get_icon_size( HICON handle, SIZE *size ) - { - ICONINFO info; -@@ -111,6 +130,7 @@ static HICON STATIC_SetIcon( HWND hwnd, HICON hicon, DWORD style ) - { - HICON prevIcon; - SIZE size; -+ struct static_extra_info *extra; - - if ((style & SS_TYPEMASK) != SS_ICON) return 0; - if (hicon && !get_icon_size( hicon, &size )) -@@ -118,7 +138,12 @@ static HICON STATIC_SetIcon( HWND hwnd, HICON hicon, DWORD style ) - WARN("hicon != 0, but invalid\n"); - return 0; - } -- prevIcon = (HICON)SetWindowLongPtrW( hwnd, HICON_GWL_OFFSET, (LONG_PTR)hicon ); -+ -+ extra = get_extra_ptr( hwnd, TRUE ); -+ if (!extra) return 0; -+ -+ prevIcon = extra->image.hicon; -+ extra->image.hicon = hicon; - if (hicon && !(style & SS_CENTERIMAGE) && !(style & SS_REALSIZECONTROL)) - { - /* Windows currently doesn't implement SS_RIGHTJUST */ -@@ -146,6 +171,7 @@ static HICON STATIC_SetIcon( HWND hwnd, HICON hicon, DWORD style ) - static HBITMAP STATIC_SetBitmap( HWND hwnd, HBITMAP hBitmap, DWORD style ) - { - HBITMAP hOldBitmap; -+ struct static_extra_info *extra; - - if ((style & SS_TYPEMASK) != SS_BITMAP) return 0; - if (hBitmap && GetObjectType(hBitmap) != OBJ_BITMAP) -@@ -153,7 +179,12 @@ static HBITMAP STATIC_SetBitmap( HWND hwnd, HBITMAP hBitmap, DWORD style ) - WARN("hBitmap != 0, but it's not a bitmap\n"); - return 0; - } -- hOldBitmap = (HBITMAP)SetWindowLongPtrW( hwnd, HICON_GWL_OFFSET, (LONG_PTR)hBitmap ); -+ -+ extra = get_extra_ptr( hwnd, TRUE ); -+ if (!extra) return 0; -+ -+ hOldBitmap = extra->image.hbitmap; -+ extra->image.hbitmap = hBitmap; - if (hBitmap && !(style & SS_CENTERIMAGE) && !(style & SS_REALSIZECONTROL)) - { - BITMAP bm; -@@ -183,13 +214,23 @@ static HBITMAP STATIC_SetBitmap( HWND hwnd, HBITMAP hBitmap, DWORD style ) - */ - static HENHMETAFILE STATIC_SetEnhMetaFile( HWND hwnd, HENHMETAFILE hEnhMetaFile, DWORD style ) - { -+ HENHMETAFILE old_hemf; -+ struct static_extra_info *extra; -+ - if ((style & SS_TYPEMASK) != SS_ENHMETAFILE) return 0; - if (hEnhMetaFile && GetObjectType(hEnhMetaFile) != OBJ_ENHMETAFILE) - { - WARN("hEnhMetaFile != 0, but it's not an enhanced metafile\n"); - return 0; - } -- return (HENHMETAFILE)SetWindowLongPtrW( hwnd, HICON_GWL_OFFSET, (LONG_PTR)hEnhMetaFile ); -+ -+ extra = get_extra_ptr( hwnd, TRUE ); -+ if (!extra) return 0; -+ -+ old_hemf = extra->image.hemf; -+ extra->image.hemf = hEnhMetaFile; -+ -+ return old_hemf; - } - - /*********************************************************************** -@@ -200,6 +241,8 @@ static HENHMETAFILE STATIC_SetEnhMetaFile( HWND hwnd, HENHMETAFILE hEnhMetaFile, - */ - static HANDLE STATIC_GetImage( HWND hwnd, WPARAM wParam, DWORD style ) - { -+ struct static_extra_info *extra; -+ - switch (style & SS_TYPEMASK) - { - case SS_ICON: -@@ -215,7 +258,22 @@ static HANDLE STATIC_GetImage( HWND hwnd, WPARAM wParam, DWORD style ) - default: - return NULL; - } -- return (HANDLE)GetWindowLongPtrW( hwnd, HICON_GWL_OFFSET ); -+ -+ extra = get_extra_ptr( hwnd, FALSE ); -+ return extra ? extra->image.hbitmap : 0; -+} -+ -+static void STATIC_SetFont( HWND hwnd, HFONT hfont ) -+{ -+ struct static_extra_info *extra = get_extra_ptr( hwnd, TRUE ); -+ if (extra) -+ extra->hfont = hfont; -+} -+ -+static HFONT STATIC_GetFont( HWND hwnd ) -+{ -+ struct static_extra_info *extra = get_extra_ptr( hwnd, FALSE ); -+ return extra ? extra->hfont : 0; - } - - /*********************************************************************** -@@ -327,6 +385,8 @@ static LRESULT CALLBACK STATIC_WindowProc( HWND hwnd, UINT uMsg, WPARAM wParam, - case WM_NCDESTROY: - if (style == SS_ICON) - { -+ struct static_extra_info *extra = get_extra_ptr( hwnd, FALSE ); -+ heap_free( extra ); - /* - * FIXME - * DestroyIcon32( STATIC_SetIcon( wndPtr, 0 ) ); -@@ -423,14 +483,14 @@ static LRESULT CALLBACK STATIC_WindowProc( HWND hwnd, UINT uMsg, WPARAM wParam, - case WM_SETFONT: - if (hasTextStyle( full_style )) - { -- SetWindowLongPtrW( hwnd, HFONT_GWL_OFFSET, wParam ); -+ STATIC_SetFont( hwnd, (HFONT)wParam ); - if (LOWORD(lParam)) - RedrawWindow( hwnd, NULL, 0, RDW_INVALIDATE | RDW_ERASE | RDW_UPDATENOW | RDW_ALLCHILDREN ); - } - break; - - case WM_GETFONT: -- return GetWindowLongPtrW( hwnd, HFONT_GWL_OFFSET ); -+ return (LRESULT)STATIC_GetFont( hwnd ); - - case WM_NCHITTEST: - if (full_style & SS_NOTIFY) -@@ -508,7 +568,7 @@ static void STATIC_PaintOwnerDrawfn( HWND hwnd, HDC hdc, DWORD style ) - dis.itemData = 0; - GetClientRect( hwnd, &dis.rcItem ); - -- font = (HFONT)GetWindowLongPtrW( hwnd, HFONT_GWL_OFFSET ); -+ font = STATIC_GetFont( hwnd ); - if (font) oldFont = SelectObject( hdc, font ); - SendMessageW( GetParent(hwnd), WM_CTLCOLORSTATIC, (WPARAM)hdc, (LPARAM)hwnd ); - SendMessageW( GetParent(hwnd), WM_DRAWITEM, id, (LPARAM)&dis ); -@@ -572,7 +632,7 @@ static void STATIC_PaintTextfn( HWND hwnd, HDC hdc, DWORD style ) - format |= DT_SINGLELINE | DT_WORD_ELLIPSIS; - } - -- if ((hFont = (HFONT)GetWindowLongPtrW( hwnd, HFONT_GWL_OFFSET ))) -+ if ((hFont = STATIC_GetFont( hwnd ))) - hOldFont = SelectObject( hdc, hFont ); - - /* SS_SIMPLE controls: WM_CTLCOLORSTATIC is sent, but the returned -@@ -668,7 +728,7 @@ static void STATIC_PaintIconfn( HWND hwnd, HDC hdc, DWORD style ) - - GetClientRect( hwnd, &rc ); - hbrush = STATIC_SendWmCtlColorStatic(hwnd, hdc); -- hIcon = (HICON)GetWindowLongPtrW( hwnd, HICON_GWL_OFFSET ); -+ hIcon = STATIC_GetImage( hwnd, IMAGE_ICON, style ); - if (!hIcon || !get_icon_size( hIcon, &size )) - { - FillRect(hdc, &rc, hbrush); -@@ -698,7 +758,7 @@ static void STATIC_PaintBitmapfn(HWND hwnd, HDC hdc, DWORD style ) - - hbrush = STATIC_SendWmCtlColorStatic(hwnd, hdc); - -- if ((hBitmap = (HBITMAP)GetWindowLongPtrW( hwnd, HICON_GWL_OFFSET )) -+ if ((hBitmap = STATIC_GetImage( hwnd, IMAGE_BITMAP, style )) - && (GetObjectType(hBitmap) == OBJ_BITMAP) - && (hMemDC = CreateCompatibleDC( hdc ))) - { -@@ -742,7 +802,7 @@ static void STATIC_PaintEnhMetafn(HWND hwnd, HDC hdc, DWORD style ) - GetClientRect(hwnd, &rc); - hbrush = STATIC_SendWmCtlColorStatic(hwnd, hdc); - FillRect(hdc, &rc, hbrush); -- if ((hEnhMetaFile = (HENHMETAFILE)GetWindowLongPtrW( hwnd, HICON_GWL_OFFSET ))) -+ if ((hEnhMetaFile = STATIC_GetImage( hwnd, IMAGE_ENHMETAFILE, style ))) - { - /* The control's current font is not selected into the - device context! */ -@@ -779,7 +839,7 @@ void STATIC_Register(void) - wndClass.style = CS_DBLCLKS | CS_PARENTDC | CS_GLOBALCLASS; - wndClass.lpfnWndProc = STATIC_WindowProc; - wndClass.cbClsExtra = 0; -- wndClass.cbWndExtra = STATIC_EXTRA_BYTES; -+ wndClass.cbWndExtra = sizeof(struct static_extra_info *); - wndClass.hCursor = LoadCursorW(0, (LPWSTR)IDC_ARROW); - wndClass.hbrBackground = NULL; - wndClass.lpszClassName = WC_STATICW; --- -2.20.1 - diff --git a/patches/comctl32-alpha-bitmaps/0002-comctl32-Paint-32-bpp-bitmaps-with-an-alpha-channel-.patch b/patches/comctl32-alpha-bitmaps/0002-comctl32-Paint-32-bpp-bitmaps-with-an-alpha-channel-.patch deleted file mode 100644 index 1d064556..00000000 --- a/patches/comctl32-alpha-bitmaps/0002-comctl32-Paint-32-bpp-bitmaps-with-an-alpha-channel-.patch +++ /dev/null @@ -1,152 +0,0 @@ -From 334262255a66b05a852c90ebc722815b8a0eb7e9 Mon Sep 17 00:00:00 2001 -From: Dmitry Timoshkov -Date: Sat, 4 May 2019 19:46:35 +0800 -Subject: [PATCH 2/2] comctl32: Paint 32-bpp bitmaps with an alpha channel - using GdiAlphaBlend. -Content-Type: text/plain; charset=UTF-8 -To: wine-devel@winehq.org - -Signed-off-by: Dmitry Timoshkov ---- - dlls/comctl32/static.c | 83 ++++++++++++++++++++++++++++++++++++++++-- - 1 file changed, 79 insertions(+), 4 deletions(-) - -diff --git a/dlls/comctl32/static.c b/dlls/comctl32/static.c -index d08710c06f..fe566645d3 100644 ---- a/dlls/comctl32/static.c -+++ b/dlls/comctl32/static.c -@@ -60,6 +60,7 @@ struct static_extra_info - HBITMAP hbitmap; - HENHMETAFILE hemf; - } image; -+ BOOL image_has_alpha; - }; - - typedef void (*pfPaint)( HWND hwnd, HDC hdc, DWORD style ); -@@ -163,6 +164,56 @@ static HICON STATIC_SetIcon( HWND hwnd, HICON hicon, DWORD style ) - return prevIcon; - } - -+static HBITMAP create_alpha_bitmap( HBITMAP hbitmap ) -+{ -+ HBITMAP alpha = 0; -+ BITMAPINFO *info = NULL; -+ BITMAP bm; -+ HDC src, dst; -+ void *bits; -+ DWORD i; -+ const unsigned char *ptr; -+ BOOL has_alpha = FALSE; -+ -+ if (!GetObjectW( hbitmap, sizeof(bm), &bm )) return 0; -+ if (bm.bmBitsPixel != 32) return 0; -+ -+ if (!(src = CreateCompatibleDC( 0 ))) return 0; -+ if (!(dst = CreateCompatibleDC( src ))) goto done; -+ if (!(info = HeapAlloc( GetProcessHeap(), 0, FIELD_OFFSET( BITMAPINFO, bmiColors[256] )))) goto done; -+ info->bmiHeader.biSize = sizeof(BITMAPINFOHEADER); -+ info->bmiHeader.biWidth = bm.bmWidth; -+ info->bmiHeader.biHeight = -bm.bmHeight; -+ info->bmiHeader.biPlanes = 1; -+ info->bmiHeader.biBitCount = 32; -+ info->bmiHeader.biCompression = BI_RGB; -+ info->bmiHeader.biSizeImage = bm.bmWidth * bm.bmHeight * 4; -+ info->bmiHeader.biXPelsPerMeter = 0; -+ info->bmiHeader.biYPelsPerMeter = 0; -+ info->bmiHeader.biClrUsed = 0; -+ info->bmiHeader.biClrImportant = 0; -+ if (!(alpha = CreateDIBSection( dst, info, DIB_RGB_COLORS, &bits, NULL, 0 ))) goto done; -+ -+ SelectObject( src, hbitmap ); -+ SelectObject( dst, alpha ); -+ BitBlt(dst, 0, 0, bm.bmWidth, bm.bmHeight, src, 0, 0, SRCCOPY); -+ -+ for (i = 0, ptr = bits; i < bm.bmWidth * bm.bmHeight; i++, ptr += 4) -+ if ((has_alpha = (ptr[3] != 0))) break; -+ -+done: -+ DeleteDC( src ); -+ DeleteDC( dst ); -+ HeapFree( GetProcessHeap(), 0, info ); -+ -+ if (!has_alpha) -+ { -+ DeleteObject( alpha ); -+ alpha = 0; -+ } -+ return alpha; -+} -+ - /*********************************************************************** - * STATIC_SetBitmap - * -@@ -170,7 +221,7 @@ static HICON STATIC_SetIcon( HWND hwnd, HICON hicon, DWORD style ) - */ - static HBITMAP STATIC_SetBitmap( HWND hwnd, HBITMAP hBitmap, DWORD style ) - { -- HBITMAP hOldBitmap; -+ HBITMAP hOldBitmap, alpha; - struct static_extra_info *extra; - - if ((style & SS_TYPEMASK) != SS_BITMAP) return 0; -@@ -184,7 +235,18 @@ static HBITMAP STATIC_SetBitmap( HWND hwnd, HBITMAP hBitmap, DWORD style ) - if (!extra) return 0; - - hOldBitmap = extra->image.hbitmap; -- extra->image.hbitmap = hBitmap; -+ alpha = create_alpha_bitmap( hBitmap ); -+ if (alpha) -+ { -+ extra->image.hbitmap = alpha; -+ extra->image_has_alpha = TRUE; -+ } -+ else -+ { -+ extra->image.hbitmap = hBitmap; -+ extra->image_has_alpha = FALSE; -+ } -+ - if (hBitmap && !(style & SS_CENTERIMAGE) && !(style & SS_REALSIZECONTROL)) - { - BITMAP bm; -@@ -386,7 +448,12 @@ static LRESULT CALLBACK STATIC_WindowProc( HWND hwnd, UINT uMsg, WPARAM wParam, - if (style == SS_ICON) - { - struct static_extra_info *extra = get_extra_ptr( hwnd, FALSE ); -- heap_free( extra ); -+ if (extra) -+ { -+ if (extra->image_has_alpha) -+ DeleteObject( extra->image.hbitmap ); -+ heap_free( extra ); -+ } - /* - * FIXME - * DestroyIcon32( STATIC_SetIcon( wndPtr, 0 ) ); -@@ -765,6 +832,8 @@ static void STATIC_PaintBitmapfn(HWND hwnd, HDC hdc, DWORD style ) - BITMAP bm; - RECT rcClient; - LOGBRUSH brush; -+ BLENDFUNCTION blend = { AC_SRC_OVER, 0, 255, AC_SRC_ALPHA }; -+ struct static_extra_info *extra = get_extra_ptr( hwnd, FALSE ); - - GetObjectW(hBitmap, sizeof(bm), &bm); - oldbitmap = SelectObject(hMemDC, hBitmap); -@@ -785,7 +854,13 @@ static void STATIC_PaintBitmapfn(HWND hwnd, HDC hdc, DWORD style ) - rcClient.right = rcClient.left + bm.bmWidth; - rcClient.bottom = rcClient.top + bm.bmHeight; - } -- StretchBlt(hdc, rcClient.left, rcClient.top, rcClient.right - rcClient.left, -+ -+ if (extra->image_has_alpha) -+ GdiAlphaBlend(hdc, rcClient.left, rcClient.top, rcClient.right - rcClient.left, -+ rcClient.bottom - rcClient.top, hMemDC, -+ 0, 0, bm.bmWidth, bm.bmHeight, blend); -+ else -+ StretchBlt(hdc, rcClient.left, rcClient.top, rcClient.right - rcClient.left, - rcClient.bottom - rcClient.top, hMemDC, - 0, 0, bm.bmWidth, bm.bmHeight, SRCCOPY); - SelectObject(hMemDC, oldbitmap); --- -2.20.1 - diff --git a/patches/comctl32-alpha-bitmaps/definition b/patches/comctl32-alpha-bitmaps/definition deleted file mode 100644 index ceb04c98..00000000 --- a/patches/comctl32-alpha-bitmaps/definition +++ /dev/null @@ -1 +0,0 @@ -Fixes: [47018] Paint 32-bpp bitmaps with an alpha channel using GdiAlphaBlend diff --git a/patches/d3dx9_36-BumpLuminance/0001-d3dx9_36-Recognize-bump-luminance-X8L8V8U8-when-load.patch b/patches/d3dx9_36-BumpLuminance/0001-d3dx9_36-Recognize-bump-luminance-X8L8V8U8-when-load.patch deleted file mode 100644 index 5197ef2c..00000000 --- a/patches/d3dx9_36-BumpLuminance/0001-d3dx9_36-Recognize-bump-luminance-X8L8V8U8-when-load.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 5bd7e977e0145a8e222ab66676bed7c0ff4d5b44 Mon Sep 17 00:00:00 2001 -From: Christian Costa -Date: Mon, 16 May 2016 13:19:06 +0200 -Subject: d3dx9_36: Recognize bump luminance X8L8V8U8 when loading dds file. - ---- - dlls/d3dx9_36/surface.c | 14 ++++++++++++++ - 1 file changed, 14 insertions(+) - -diff --git a/dlls/d3dx9_36/surface.c b/dlls/d3dx9_36/surface.c -index 1bfe75a..f670860 100644 ---- a/dlls/d3dx9_36/surface.c -+++ b/dlls/d3dx9_36/surface.c -@@ -110,6 +110,7 @@ static const GUID *d3dformat_to_wic_guid(D3DFORMAT format) - #define DDS_PF_RGB 0x40 - #define DDS_PF_YUV 0x200 - #define DDS_PF_LUMINANCE 0x20000 -+#define DDS_PF_BUMPLUMINANCE 0x40000 - #define DDS_PF_BUMPDUDV 0x80000 - - struct dds_pixel_format -@@ -265,6 +266,17 @@ static D3DFORMAT dds_bump_to_d3dformat(const struct dds_pixel_format *pixel_form - return D3DFMT_UNKNOWN; - } - -+static D3DFORMAT dds_bump_luminance_to_d3dformat(const struct dds_pixel_format *pixel_format) -+{ -+ if (pixel_format->bpp == 32 && pixel_format->rmask == 0x000000ff && pixel_format->gmask == 0x0000ff00 -+ && pixel_format->bmask == 0x00ff0000) -+ return D3DFMT_X8L8V8U8; -+ -+ WARN("Unknown bump pixel format (%u, %#x, %#x, %#x, %#x)\n", pixel_format->bpp, -+ pixel_format->rmask, pixel_format->gmask, pixel_format->bmask, pixel_format->amask); -+ return D3DFMT_UNKNOWN; -+} -+ - static D3DFORMAT dds_pixel_format_to_d3dformat(const struct dds_pixel_format *pixel_format) - { - TRACE("pixel_format: size %u, flags %#x, fourcc %#x, bpp %u.\n", pixel_format->size, -@@ -282,6 +294,8 @@ static D3DFORMAT dds_pixel_format_to_d3dformat(const struct dds_pixel_format *pi - return dds_alpha_to_d3dformat(pixel_format); - if (pixel_format->flags & DDS_PF_BUMPDUDV) - return dds_bump_to_d3dformat(pixel_format); -+ if (pixel_format->flags & DDS_PF_BUMPLUMINANCE) -+ return dds_bump_luminance_to_d3dformat(pixel_format); - - WARN("Unknown pixel format (flags %#x, fourcc %#x, bpp %u, r %#x, g %#x, b %#x, a %#x)\n", - pixel_format->flags, pixel_format->fourcc, pixel_format->bpp, --- -2.8.0 - diff --git a/patches/d3dx9_36-BumpLuminance/0002-d3dx9_36-Add-format-description-for-X8L8V8U8-for-for.patch b/patches/d3dx9_36-BumpLuminance/0002-d3dx9_36-Add-format-description-for-X8L8V8U8-for-for.patch deleted file mode 100644 index d3171f52..00000000 --- a/patches/d3dx9_36-BumpLuminance/0002-d3dx9_36-Add-format-description-for-X8L8V8U8-for-for.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 170a6d9df910f617585791df31aa72b79622ed0b Mon Sep 17 00:00:00 2001 -From: Christian Costa -Date: Mon, 16 May 2016 13:20:39 +0200 -Subject: d3dx9_36: Add format description for X8L8V8U8 for format conversions. - ---- - dlls/d3dx9_36/util.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/dlls/d3dx9_36/util.c b/dlls/d3dx9_36/util.c -index d8cd43a..12b9c2c 100644 ---- a/dlls/d3dx9_36/util.c -+++ b/dlls/d3dx9_36/util.c -@@ -90,6 +90,7 @@ static const struct pixel_format_desc formats[] = - {D3DFMT_G32R32F, { 0, 32, 32, 0}, { 0, 0, 32, 0}, 8, 1, 1, 8, FORMAT_ARGBF, NULL, NULL }, - {D3DFMT_A32B32G32R32F, {32, 32, 32, 32}, {96, 0, 32, 64}, 16, 1, 1, 16, FORMAT_ARGBF, NULL, NULL }, - {D3DFMT_P8, { 8, 8, 8, 8}, { 0, 0, 0, 0}, 1, 1, 1, 1, FORMAT_INDEX, NULL, index_to_rgba}, -+ {D3DFMT_X8L8V8U8, { 0, 8, 8, 8}, { 0, 0, 8, 16}, 4, 1, 1, 4, FORMAT_ARGB, NULL, NULL }, - /* marks last element */ - {D3DFMT_UNKNOWN, { 0, 0, 0, 0}, { 0, 0, 0, 0}, 0, 1, 1, 0, FORMAT_UNKNOWN, NULL, NULL }, - }; --- -2.8.0 - diff --git a/patches/d3dx9_36-BumpLuminance/definition b/patches/d3dx9_36-BumpLuminance/definition deleted file mode 100644 index c99a5b22..00000000 --- a/patches/d3dx9_36-BumpLuminance/definition +++ /dev/null @@ -1 +0,0 @@ -Fixes: Recognize bump luminance X8L8V8U8 when loading dds file diff --git a/patches/d3dx9_36-D3DXCreateKeyframedAnimationSet/0001-d3dx9_36-Implement-D3DXCreateKeyframedAnimationSet.patch b/patches/d3dx9_36-D3DXCreateKeyframedAnimationSet/0001-d3dx9_36-Implement-D3DXCreateKeyframedAnimationSet.patch deleted file mode 100644 index 4049a389..00000000 --- a/patches/d3dx9_36-D3DXCreateKeyframedAnimationSet/0001-d3dx9_36-Implement-D3DXCreateKeyframedAnimationSet.patch +++ /dev/null @@ -1,446 +0,0 @@ -From a5e6898b23b0c163eebb4e88b48030fe19152116 Mon Sep 17 00:00:00 2001 -From: Alistair Leslie-Hughes -Date: Mon, 1 Jul 2019 15:40:59 +1000 -Subject: [PATCH] d3dx9_36: Implement D3DXCreateKeyframedAnimationSet - -Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45481 -Signed-off-by: Alistair Leslie-Hughes ---- - dlls/d3dx9_36/animation.c | 370 ++++++++++++++++++++++++++++++++++++- - dlls/d3dx9_36/tests/mesh.c | 27 +++ - 2 files changed, 394 insertions(+), 3 deletions(-) - -diff --git a/dlls/d3dx9_36/animation.c b/dlls/d3dx9_36/animation.c -index de6d69d383..6b3a79b296 100644 ---- a/dlls/d3dx9_36/animation.c -+++ b/dlls/d3dx9_36/animation.c -@@ -468,14 +468,378 @@ HRESULT WINAPI D3DXCreateAnimationController(UINT max_outputs, UINT max_sets, - return D3D_OK; - } - -+struct d3dx9_animation_frame_set -+{ -+ ID3DXKeyframedAnimationSet ID3DXKeyframedAnimationSet_iface; -+ LONG ref; -+ -+ char *name; -+ double ticks_per_second; -+ D3DXPLAYBACK_TYPE playback_type; -+ UINT animation_count; -+ UINT callback_key_count; -+ const D3DXKEY_CALLBACK *callback_keys; -+}; -+ -+static inline struct d3dx9_animation_frame_set *impl_from_ID3DXKeyframedAnimationSet(ID3DXKeyframedAnimationSet *iface) -+{ -+ return CONTAINING_RECORD(iface, struct d3dx9_animation_frame_set, ID3DXKeyframedAnimationSet_iface); -+} -+ -+static HRESULT WINAPI d3dx9_animation_framed_QueryInterface(ID3DXKeyframedAnimationSet *iface, REFIID riid, void **obj) -+{ -+ TRACE("iface %p, riid %s, out %p.\n", iface, debugstr_guid(riid), obj); -+ -+ if (IsEqualGUID(riid, &IID_IUnknown) || -+ IsEqualGUID(riid, &IID_ID3DXAnimationSet) || -+ IsEqualGUID(riid, &IID_ID3DXKeyframedAnimationSet)) -+ { -+ iface->lpVtbl->AddRef(iface); -+ *obj = iface; -+ return D3D_OK; -+ } -+ -+ WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(riid)); -+ *obj = NULL; -+ return E_NOINTERFACE; -+} -+ -+static ULONG WINAPI d3dx9_animation_framed_AddRef(ID3DXKeyframedAnimationSet *iface) -+{ -+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface); -+ ULONG refcount = InterlockedIncrement(&framed->ref); -+ -+ TRACE("%p increasing refcount to %u.\n", framed, refcount); -+ -+ return refcount; -+} -+ -+static ULONG WINAPI d3dx9_animation_framed_Release(ID3DXKeyframedAnimationSet *iface) -+{ -+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface); -+ ULONG refcount = InterlockedDecrement(&framed->ref); -+ -+ TRACE("%p decreasing refcount to %u.\n", framed, refcount); -+ -+ if (!refcount) -+ { -+ heap_free(framed->name); -+ HeapFree(GetProcessHeap(), 0, framed); -+ } -+ -+ return refcount; -+} -+ -+static const char * WINAPI d3dx9_animation_framed_GetName(ID3DXKeyframedAnimationSet *iface) -+{ -+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface); -+ TRACE("framed %p.\n", framed); -+ return framed->name; -+} -+ -+static DOUBLE WINAPI d3dx9_animation_framed_GetPeriod(ID3DXKeyframedAnimationSet *iface) -+{ -+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface); -+ FIXME("framed %p stub.\n", framed); -+ return 0.0f; -+} -+ -+static DOUBLE WINAPI d3dx9_animation_framed_GetPeriodicPosition(ID3DXKeyframedAnimationSet *iface, DOUBLE position) -+{ -+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface); -+ FIXME("framed %p stub.\n", framed); -+ return 0.0f; -+} -+ -+static UINT WINAPI d3dx9_animation_framed_GetNumAnimations(ID3DXKeyframedAnimationSet *iface) -+{ -+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface); -+ FIXME("framed %p stub.\n", framed); -+ return 0; -+} -+ -+static HRESULT WINAPI d3dx9_animation_framed_GetAnimationNameByIndex(ID3DXKeyframedAnimationSet *iface, UINT index, const char **name) -+{ -+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface); -+ FIXME("framed %p, name %p stub.\n", framed, name); -+ return E_NOTIMPL; -+} -+ -+static HRESULT WINAPI d3dx9_animation_framed_GetAnimationIndexByName(ID3DXKeyframedAnimationSet *iface, const char *name, UINT *index) -+{ -+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface); -+ FIXME("framed %p, name %s, index %p stub.\n", framed, debugstr_a(name), index); -+ return E_NOTIMPL; -+} -+ -+static HRESULT WINAPI d3dx9_animation_framed_GetSRT(ID3DXKeyframedAnimationSet *iface, DOUBLE periodic_position, UINT animation, D3DXVECTOR3 *scale, -+ D3DXQUATERNION *rotation, D3DXVECTOR3 *translation) -+{ -+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface); -+ FIXME("framed %p, periodic_position %f, animation %u, scale %p rotation %p translation %p stub.\n", -+ framed, periodic_position, animation, scale, rotation, translation); -+ return E_NOTIMPL; -+} -+ -+static HRESULT WINAPI d3dx9_animation_framed_GetCallback(ID3DXKeyframedAnimationSet *iface, double position, DWORD flags, double *callback_position, -+ void **callback_data) -+{ -+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface); -+ FIXME("framed %p, position %f, flags 0x%08x, callback_position %p, callback_data %p stub.\n", -+ framed, position, flags, callback_position, callback_data); -+ return E_NOTIMPL; -+} -+ -+static D3DXPLAYBACK_TYPE WINAPI d3dx9_animation_framed_GetPlaybackType(ID3DXKeyframedAnimationSet *iface) -+{ -+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface); -+ TRACE("framed %p.\n", framed); -+ return framed->playback_type; -+} -+ -+static DOUBLE WINAPI d3dx9_animation_framed_GetSourceTicksPerSecond(ID3DXKeyframedAnimationSet *iface) -+{ -+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface); -+ TRACE("framed %p.\n", framed); -+ return framed->ticks_per_second; -+} -+ -+static UINT WINAPI d3dx9_animation_framed_GetNumScaleKeys(ID3DXKeyframedAnimationSet *iface, UINT keys) -+{ -+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface); -+ FIXME("framed %p, keys %u stub.\n", framed, keys); -+ return 0; -+} -+ -+static HRESULT WINAPI d3dx9_animation_framed_GetScaleKeys(ID3DXKeyframedAnimationSet *iface, UINT animation, LPD3DXKEY_VECTOR3 scale_keys) -+{ -+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface); -+ FIXME("framed %p, animation %u, scale_keys %p stub.\n", framed, animation, scale_keys); -+ return E_NOTIMPL; -+} -+ -+static HRESULT WINAPI d3dx9_animation_framed_GetScaleKey(ID3DXKeyframedAnimationSet *iface, UINT animation, UINT key, LPD3DXKEY_VECTOR3 scale_key) -+{ -+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface); -+ FIXME("framed %p, animation %u, key %u, scale_key %p stub.\n", framed, animation, key, scale_key); -+ return E_NOTIMPL; -+} -+ -+static HRESULT WINAPI d3dx9_animation_framed_SetScaleKey(ID3DXKeyframedAnimationSet *iface, UINT animation, UINT key, LPD3DXKEY_VECTOR3 scale_key) -+{ -+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface); -+ FIXME("framed %p, animation %u, key %u, scale_key %p stub.\n", framed, animation, key, scale_key); -+ return E_NOTIMPL; -+} -+ -+static UINT WINAPI d3dx9_animation_framed_GetNumRotationKeys(ID3DXKeyframedAnimationSet *iface, UINT animation) -+{ -+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface); -+ FIXME("framed %p, animation %u stub.\n", framed, animation); -+ return E_NOTIMPL; -+} -+ -+static HRESULT WINAPI d3dx9_animation_framed_GetRotationKeys(ID3DXKeyframedAnimationSet *iface, UINT animation, LPD3DXKEY_QUATERNION rotation_keys) -+{ -+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface); -+ FIXME("framed %p, animation %u, rotation_keys %p stub.\n", framed, animation, rotation_keys); -+ return E_NOTIMPL; -+} -+ -+static HRESULT WINAPI d3dx9_animation_framed_GetRotationKey(ID3DXKeyframedAnimationSet *iface, UINT animation, UINT key, LPD3DXKEY_QUATERNION rotation_key) -+{ -+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface); -+ FIXME("framed %p, animation %u, key %u, rotation_key %p stub.\n", framed, animation, key, rotation_key); -+ return E_NOTIMPL; -+} -+ -+static HRESULT WINAPI d3dx9_animation_framed_SetRotationKey(ID3DXKeyframedAnimationSet *iface, UINT animation, UINT key, LPD3DXKEY_QUATERNION rotation_key) -+{ -+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface); -+ FIXME("framed %p, animation %u, key %u, rotation_key %p stub.\n", framed, animation, key, rotation_key); -+ return E_NOTIMPL; -+} -+ -+static UINT WINAPI d3dx9_animation_framed_GetNumTranslationKeys(ID3DXKeyframedAnimationSet *iface, UINT animation) -+{ -+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface); -+ FIXME("framed %p, animation %u stub.\n", framed, animation); -+ return E_NOTIMPL; -+} -+ -+static HRESULT WINAPI d3dx9_animation_framed_GetTranslationKeys(ID3DXKeyframedAnimationSet *iface, UINT animation, LPD3DXKEY_VECTOR3 translation_keys) -+{ -+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface); -+ FIXME("framed %p, animation %u, rotation_key %p stub.\n", framed, animation, translation_keys); -+ return E_NOTIMPL; -+} -+ -+static HRESULT WINAPI d3dx9_animation_framed_GetTranslationKey(ID3DXKeyframedAnimationSet *iface, UINT animation, UINT key, LPD3DXKEY_VECTOR3 translation_key) -+{ -+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface); -+ FIXME("framed %p, animation %u, key %u, translation_key %p stub.\n", framed, animation, key, translation_key); -+ return E_NOTIMPL; -+} -+ -+static HRESULT WINAPI d3dx9_animation_framed_SetTranslationKey(ID3DXKeyframedAnimationSet *iface, UINT animation, UINT key, LPD3DXKEY_VECTOR3 translation_key) -+{ -+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface); -+ FIXME("framed %p, animation %u, key %u, translation_key %p stub.\n", framed, animation, key, translation_key); -+ return E_NOTIMPL; -+} -+ -+static UINT WINAPI d3dx9_animation_framed_GetNumCallbackKeys(ID3DXKeyframedAnimationSet *iface) -+{ -+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface); -+ FIXME("framed %p stub.\n", framed); -+ return E_NOTIMPL; -+} -+ -+static HRESULT WINAPI d3dx9_animation_framed_GetCallbackKeys(ID3DXKeyframedAnimationSet *iface, LPD3DXKEY_CALLBACK callback_keys) -+{ -+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface); -+ FIXME("framed %p, callback_keys %p stub.\n", framed, callback_keys); -+ -+ return E_NOTIMPL; -+} -+ -+static HRESULT WINAPI d3dx9_animation_framed_GetCallbackKey(ID3DXKeyframedAnimationSet *iface, UINT key, LPD3DXKEY_CALLBACK callback_key) -+{ -+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface); -+ FIXME("framed %p, key %u, callback_key %p stub.\n", framed, key, callback_key); -+ return E_NOTIMPL; -+} -+ -+static HRESULT WINAPI d3dx9_animation_framed_SetCallbackKey(ID3DXKeyframedAnimationSet *iface, UINT key, LPD3DXKEY_CALLBACK callback_key) -+{ -+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface); -+ FIXME("framed %p, key %u, callback_key %p stub.\n", framed, key, callback_key); -+ return E_NOTIMPL; -+} -+ -+static HRESULT WINAPI d3dx9_animation_framed_UnregisterScaleKey(ID3DXKeyframedAnimationSet *iface, UINT animation, UINT key) -+{ -+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface); -+ FIXME("framed %p, animation %u, key %u stub.\n", framed, animation, key); -+ return E_NOTIMPL; -+} -+ -+static HRESULT WINAPI d3dx9_animation_framed_UnregisterRotationKey(ID3DXKeyframedAnimationSet *iface, UINT animation, UINT key) -+{ -+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface); -+ FIXME("framed %p, animation %u, key %u stub.\n", framed, animation, key); -+ return E_NOTIMPL; -+} -+ -+static HRESULT WINAPI d3dx9_animation_framed_UnregisterTranslationKey(ID3DXKeyframedAnimationSet *iface, UINT animation, UINT key) -+{ -+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface); -+ FIXME("framed %p, animation %u, key %u stub.\n", framed, animation, key); -+ return E_NOTIMPL; -+} -+ -+static HRESULT WINAPI d3dx9_animation_framed_RegisterAnimationSRTKeys(ID3DXKeyframedAnimationSet *iface, const char *name, UINT num_scale_keys, -+ UINT num_rotation_keys, UINT num_translation_keys, const D3DXKEY_VECTOR3 *scale_keys, -+ const D3DXKEY_QUATERNION *rotation_keys, const D3DXKEY_VECTOR3 *translation_keys, -+ DWORD *animation_index) -+{ -+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface); -+ FIXME("framed %p, name %s, num_scale_keys %u, num_rotation_keys %u, rotation_keys %p, num_translation_keys %u, scale_keys %p, " -+ "rotation_keys %p, translation_keys %p, animation_index %p stub.\n", -+ framed, debugstr_a(name), num_scale_keys, num_rotation_keys, rotation_keys, num_translation_keys, scale_keys, -+ rotation_keys, translation_keys, animation_index); -+ return E_NOTIMPL; -+} -+ -+static HRESULT WINAPI d3dx9_animation_framed_Compress(ID3DXKeyframedAnimationSet *iface, DWORD flags, float lossiness, -+ D3DXFRAME *hierarchy, ID3DXBuffer **compressed_data) -+{ -+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface); -+ FIXME("framed %p, flags 0x%08x, lossiness %f, hierarchy %p, compressed_data %p stub.\n", framed, flags, lossiness, -+ hierarchy, compressed_data); -+ return E_NOTIMPL; -+} -+ -+static HRESULT WINAPI d3dx9_animation_framed_UnregisterAnimation(ID3DXKeyframedAnimationSet *iface, UINT index) -+{ -+ struct d3dx9_animation_frame_set *framed = impl_from_ID3DXKeyframedAnimationSet(iface); -+ FIXME("framed %p, index %u stub.\n", framed, index); -+ return E_NOTIMPL; -+} -+ -+static const struct ID3DXKeyframedAnimationSetVtbl d3dx9_animation_framed_vtbl = -+{ -+ d3dx9_animation_framed_QueryInterface, -+ d3dx9_animation_framed_AddRef, -+ d3dx9_animation_framed_Release, -+ d3dx9_animation_framed_GetName, -+ d3dx9_animation_framed_GetPeriod, -+ d3dx9_animation_framed_GetPeriodicPosition, -+ d3dx9_animation_framed_GetNumAnimations, -+ d3dx9_animation_framed_GetAnimationNameByIndex, -+ d3dx9_animation_framed_GetAnimationIndexByName, -+ d3dx9_animation_framed_GetSRT, -+ d3dx9_animation_framed_GetCallback, -+ d3dx9_animation_framed_GetPlaybackType, -+ d3dx9_animation_framed_GetSourceTicksPerSecond, -+ d3dx9_animation_framed_GetNumScaleKeys, -+ d3dx9_animation_framed_GetScaleKeys, -+ d3dx9_animation_framed_GetScaleKey, -+ d3dx9_animation_framed_SetScaleKey, -+ d3dx9_animation_framed_GetNumRotationKeys, -+ d3dx9_animation_framed_GetRotationKeys, -+ d3dx9_animation_framed_GetRotationKey, -+ d3dx9_animation_framed_SetRotationKey, -+ d3dx9_animation_framed_GetNumTranslationKeys, -+ d3dx9_animation_framed_GetTranslationKeys, -+ d3dx9_animation_framed_GetTranslationKey, -+ d3dx9_animation_framed_SetTranslationKey, -+ d3dx9_animation_framed_GetNumCallbackKeys, -+ d3dx9_animation_framed_GetCallbackKeys, -+ d3dx9_animation_framed_GetCallbackKey, -+ d3dx9_animation_framed_SetCallbackKey, -+ d3dx9_animation_framed_UnregisterScaleKey, -+ d3dx9_animation_framed_UnregisterRotationKey, -+ d3dx9_animation_framed_UnregisterTranslationKey, -+ d3dx9_animation_framed_RegisterAnimationSRTKeys, -+ d3dx9_animation_framed_Compress, -+ d3dx9_animation_framed_UnregisterAnimation -+}; -+ - HRESULT WINAPI D3DXCreateKeyframedAnimationSet(const char *name, double ticks_per_second, - D3DXPLAYBACK_TYPE playback_type, UINT animation_count, UINT callback_key_count, - const D3DXKEY_CALLBACK *callback_keys, ID3DXKeyframedAnimationSet **animation_set) - { -- FIXME("name %s, ticks_per_second %.16e, playback_type %u, animation_count %u, " -- "callback_key_count %u, callback_keys %p, animation_set %p stub.\n", -+ struct d3dx9_animation_frame_set *object; -+ -+ TRACE("name %s, ticks_per_second %.16e, playback_type %u, animation_count %u, " -+ "callback_key_count %u, callback_keys %p, animation_set %p.\n", - debugstr_a(name), ticks_per_second, playback_type, animation_count, - callback_key_count, callback_keys, animation_set); - -- return E_NOTIMPL; -+ if(!animation_count) -+ return D3DERR_INVALIDCALL; -+ -+ object = heap_alloc(sizeof(*object)); -+ if (!object) -+ return E_OUTOFMEMORY; -+ -+ object->ID3DXKeyframedAnimationSet_iface.lpVtbl = &d3dx9_animation_framed_vtbl; -+ object->ref = 1; -+ object->name = heap_alloc( strlen(name)+1 ); -+ if(!object->name) -+ { -+ heap_free(object); -+ return E_OUTOFMEMORY; -+ } -+ strcpy(object->name, name); -+ object->ticks_per_second = ticks_per_second; -+ object->playback_type = playback_type; -+ object->animation_count = animation_count; -+ object->callback_key_count = callback_key_count; -+ object->callback_keys = callback_keys; -+ -+ *animation_set = &object->ID3DXKeyframedAnimationSet_iface; -+ -+ return D3D_OK; - } -diff --git a/dlls/d3dx9_36/tests/mesh.c b/dlls/d3dx9_36/tests/mesh.c -index 3882bb404a..fc07ac1228 100644 ---- a/dlls/d3dx9_36/tests/mesh.c -+++ b/dlls/d3dx9_36/tests/mesh.c -@@ -11119,6 +11119,32 @@ static void D3DXCreateAnimationControllerTest(void) - animation->lpVtbl->Release(animation); - } - -+static void D3DXCreateKeyframedAnimationSetTest(void) -+{ -+ ID3DXKeyframedAnimationSet *framed; -+ HRESULT hr; -+ const char *name; -+ D3DXPLAYBACK_TYPE playtype; -+ UINT count; -+ -+ hr = D3DXCreateKeyframedAnimationSet("wine_bottle", 5.0, D3DXPLAY_LOOP, 0, 0, NULL, &framed); -+ ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr returned %#x.\n", hr); -+ -+ hr = D3DXCreateKeyframedAnimationSet("wine_bottle", 5.0, D3DXPLAY_LOOP, 10, 0, NULL, &framed); -+ ok(hr == D3D_OK, "Got unexpected hr returned %#x.\n", hr); -+ -+ name = framed->lpVtbl->GetName(framed); -+ ok(!strcmp(name, "wine_bottle"), "unexpected name (%s)\n", name); -+ -+ playtype = framed->lpVtbl->GetPlaybackType(framed); -+ ok(playtype == D3DXPLAY_LOOP, "unexpected value, got %d\n", playtype); -+ -+ count = framed->lpVtbl->GetNumAnimations(framed); -+ ok(count == 0, "unexpected value, got %d\n", count); -+ -+ framed->lpVtbl->Release(framed); -+} -+ - static void test_D3DXFrameFind(void) - { - static char n1[] = "name1"; -@@ -11387,6 +11413,7 @@ START_TEST(mesh) - D3DXCreateTextTest(); - D3DXCreateTorusTest(); - D3DXCreateAnimationControllerTest(); -+ D3DXCreateKeyframedAnimationSetTest(); - test_get_decl_length(); - test_get_decl_vertex_size(); - test_fvf_decl_conversion(); --- -2.24.1 - diff --git a/patches/d3dx9_36-D3DXCreateKeyframedAnimationSet/definition b/patches/d3dx9_36-D3DXCreateKeyframedAnimationSet/definition deleted file mode 100644 index ab1c6492..00000000 --- a/patches/d3dx9_36-D3DXCreateKeyframedAnimationSet/definition +++ /dev/null @@ -1 +0,0 @@ -Fixes: [45481] d3dx9_36: Implement D3DXCreateKeyframedAnimationSet diff --git a/patches/ntdll-Junction_Points/0013-ntdll-Allow-creation-of-dangling-reparse-points-to-n.patch b/patches/ntdll-Junction_Points/0013-ntdll-Allow-creation-of-dangling-reparse-points-to-n.patch index a66c1054..57e40156 100644 --- a/patches/ntdll-Junction_Points/0013-ntdll-Allow-creation-of-dangling-reparse-points-to-n.patch +++ b/patches/ntdll-Junction_Points/0013-ntdll-Allow-creation-of-dangling-reparse-points-to-n.patch @@ -1,29 +1,28 @@ -From d17d5121c6447d08981c47955979ed39871f4489 Mon Sep 17 00:00:00 2001 +From 5b9831bcc26ab81b428b9c8f996c50b50c195a5d Mon Sep 17 00:00:00 2001 From: "Erich E. Hoover" Date: Tue, 30 Apr 2019 16:24:54 -0600 -Subject: ntdll: Allow creation of dangling reparse points to non-existent - paths. +Subject: [PATCH] ntdll: Allow creation of dangling reparse points to + non-existent paths. Signed-off-by: Erich E. Hoover --- - dlls/ntdll/directory.c | 14 ++++++++++++++ + dlls/ntdll/directory.c | 13 +++++++++++++ dlls/ntdll/file.c | 3 ++- include/winternl.h | 1 + - 3 files changed, 17 insertions(+), 1 deletion(-) + 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/dlls/ntdll/directory.c b/dlls/ntdll/directory.c -index bbdbbe9781..cca1e3c4a8 100644 +index 7b0627cd3d..669fd56cbe 100644 --- a/dlls/ntdll/directory.c +++ b/dlls/ntdll/directory.c -@@ -2705,6 +2705,20 @@ static NTSTATUS lookup_unix_name( const WCHAR *name, int name_len, char **buffer +@@ -2644,6 +2644,19 @@ static NTSTATUS lookup_unix_name( const WCHAR *name, int name_len, char **buffer status = STATUS_OBJECT_NAME_COLLISION; } } + else if (disposition == FILE_WINE_PATH && status == STATUS_OBJECT_PATH_NOT_FOUND) + { -+ ret = ntdll_wcstoumbs( 0, name, end - name, unix_name + pos + 1, -+ MAX_DIR_ENTRY_LEN, NULL, &used_default ); -+ if (ret > 0 && !used_default) ++ ret = ntdll_wcstoumbs( name, end - name, unix_name + pos + 1, MAX_DIR_ENTRY_LEN + 1, TRUE ); ++ if (ret > 0 && ret <= MAX_DIR_ENTRY_LEN) + { + unix_name[pos] = '/'; + unix_name[pos + 1 + ret] = 0; @@ -37,10 +36,10 @@ index bbdbbe9781..cca1e3c4a8 100644 if (status != STATUS_SUCCESS) break; diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c -index 2f10472eeb..3e1121e521 100644 +index e27382adf7..22764f05f3 100644 --- a/dlls/ntdll/file.c +++ b/dlls/ntdll/file.c -@@ -1713,8 +1713,9 @@ NTSTATUS FILE_CreateSymlink(HANDLE handle, REPARSE_DATA_BUFFER *buffer) +@@ -1714,8 +1714,9 @@ NTSTATUS FILE_CreateSymlink(HANDLE handle, REPARSE_DATA_BUFFER *buffer) RtlCreateUnicodeString( &nt_dest, dest ); nt_dest.Length = dest_len; } @@ -52,10 +51,10 @@ index 2f10472eeb..3e1121e521 100644 goto cleanup; dest_allocated = TRUE; diff --git a/include/winternl.h b/include/winternl.h -index e7f89b0059..168c471696 100644 +index e0a827a11c..b71e456b53 100644 --- a/include/winternl.h +++ b/include/winternl.h -@@ -1788,6 +1788,7 @@ typedef struct _RTL_HANDLE_TABLE +@@ -1816,6 +1816,7 @@ typedef struct _RTL_HANDLE_TABLE #define FILE_OVERWRITE 4 #define FILE_OVERWRITE_IF 5 #define FILE_MAXIMUM_DISPOSITION 5 @@ -64,5 +63,5 @@ index e7f89b0059..168c471696 100644 /* Characteristics of a File System */ #define FILE_REMOVABLE_MEDIA 0x00000001 -- -2.17.1 +2.24.1 diff --git a/patches/ntdll-Junction_Points/0018-ntdll-Find-dangling-symlinks-quickly.patch b/patches/ntdll-Junction_Points/0018-ntdll-Find-dangling-symlinks-quickly.patch index 31829908..b1e31c60 100644 --- a/patches/ntdll-Junction_Points/0018-ntdll-Find-dangling-symlinks-quickly.patch +++ b/patches/ntdll-Junction_Points/0018-ntdll-Find-dangling-symlinks-quickly.patch @@ -1,7 +1,7 @@ -From 434c51a02c8a17e9b6ca91ccce8f192572823d45 Mon Sep 17 00:00:00 2001 +From 1a7f83237f0d843be63c947f3c9e2aaaa90156a8 Mon Sep 17 00:00:00 2001 From: "Erich E. Hoover" Date: Wed, 1 May 2019 17:48:51 -0600 -Subject: ntdll: Find dangling symlinks quickly. +Subject: [PATCH] ntdll: Find dangling symlinks quickly. This is also necessary on systems (such as MacOS) that support case-insensitive lookups of files. @@ -12,11 +12,11 @@ Signed-off-by: Erich E. Hoover 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/ntdll/directory.c b/dlls/ntdll/directory.c -index cca1e3c4a8..8f16f5e310 100644 +index 669fd56cbe..95af2dde24 100644 --- a/dlls/ntdll/directory.c +++ b/dlls/ntdll/directory.c -@@ -2052,7 +2052,7 @@ static NTSTATUS find_file_in_dir( char *unix_name, int pos, const WCHAR *name, i - if (ret >= 0 && !used_default) +@@ -2053,7 +2053,7 @@ static NTSTATUS find_file_in_dir( char *unix_name, int pos, const WCHAR *name, i + if (ret >= 0 && ret <= MAX_DIR_ENTRY_LEN) { unix_name[pos + ret] = 0; - if (!stat( unix_name, &st )) @@ -24,7 +24,7 @@ index cca1e3c4a8..8f16f5e310 100644 { if (is_win_dir) *is_win_dir = is_same_file( &windir, &st ); return STATUS_SUCCESS; -@@ -2174,7 +2174,7 @@ not_found: +@@ -2175,7 +2175,7 @@ not_found: return STATUS_OBJECT_PATH_NOT_FOUND; success: @@ -33,7 +33,7 @@ index cca1e3c4a8..8f16f5e310 100644 return STATUS_SUCCESS; } -@@ -2640,7 +2640,7 @@ static NTSTATUS lookup_unix_name( const WCHAR *name, int name_len, char **buffer +@@ -2580,7 +2580,7 @@ static NTSTATUS lookup_unix_name( const WCHAR *name, int name_len, char **buffer for (p = unix_name + pos ; *p; p++) if (*p == '\\') *p = '/'; if (!name_len || !redirect || (!strstr( unix_name, "/windows/") && strncmp( unix_name, "windows/", 8 ))) { @@ -43,5 +43,5 @@ index cca1e3c4a8..8f16f5e310 100644 if (disposition == FILE_CREATE) return STATUS_OBJECT_NAME_COLLISION; -- -2.17.1 +2.24.1 diff --git a/patches/ntdll-Pipe_SpecialCharacters/0001-ntdll-Allow-special-characters-in-pipe-names.patch b/patches/ntdll-Pipe_SpecialCharacters/0001-ntdll-Allow-special-characters-in-pipe-names.patch index c2452b97..d285b771 100644 --- a/patches/ntdll-Pipe_SpecialCharacters/0001-ntdll-Allow-special-characters-in-pipe-names.patch +++ b/patches/ntdll-Pipe_SpecialCharacters/0001-ntdll-Allow-special-characters-in-pipe-names.patch @@ -1,4 +1,4 @@ -From 1d2d91834c73a5001e025eadb0f05e7120ce114a Mon Sep 17 00:00:00 2001 +From 6c7f51234dfee692fb1ecc6045dcfc8ceb0a8a81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Sun, 27 Jul 2014 03:35:42 +0200 Subject: [PATCH] ntdll: Allow special characters in pipe names. @@ -10,7 +10,7 @@ Based on patch by Valentyn Pavliuchenko. 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/dlls/kernel32/tests/pipe.c b/dlls/kernel32/tests/pipe.c -index 10c971b1b0a..89fcb03353c 100644 +index 20f3450c6d..fb6f1476d6 100644 --- a/dlls/kernel32/tests/pipe.c +++ b/dlls/kernel32/tests/pipe.c @@ -30,6 +30,7 @@ @@ -21,7 +21,7 @@ index 10c971b1b0a..89fcb03353c 100644 #define NB_SERVER_LOOPS 8 -@@ -673,6 +674,15 @@ static void test_CreateNamedPipe(int pipemode) +@@ -674,6 +675,15 @@ static void test_CreateNamedPipe(int pipemode) CloseHandle(hnp); @@ -38,10 +38,10 @@ index 10c971b1b0a..89fcb03353c 100644 } diff --git a/dlls/ntdll/directory.c b/dlls/ntdll/directory.c -index 71761efa781..d5e44b58c08 100644 +index d6bf1354a5..0edd6c9a50 100644 --- a/dlls/ntdll/directory.c +++ b/dlls/ntdll/directory.c -@@ -2814,6 +2814,7 @@ NTSTATUS CDECL wine_nt_to_unix_file_name( const UNICODE_STRING *nameW, ANSI_STRI +@@ -2756,6 +2756,7 @@ NTSTATUS CDECL wine_nt_to_unix_file_name( const UNICODE_STRING *nameW, ANSI_STRI UINT disposition, BOOLEAN check_case ) { static const WCHAR unixW[] = {'u','n','i','x'}; @@ -49,15 +49,15 @@ index 71761efa781..d5e44b58c08 100644 static const WCHAR invalid_charsW[] = { INVALID_NT_CHARS, 0 }; NTSTATUS status = STATUS_SUCCESS; -@@ -2824,6 +2825,7 @@ NTSTATUS CDECL wine_nt_to_unix_file_name( const UNICODE_STRING *nameW, ANSI_STRI - int pos, ret, name_len, unix_len, prefix_len, used_default; +@@ -2766,6 +2767,7 @@ NTSTATUS CDECL wine_nt_to_unix_file_name( const UNICODE_STRING *nameW, ANSI_STRI + int pos, ret, name_len, unix_len, prefix_len; WCHAR prefix[MAX_DIR_ENTRY_LEN]; BOOLEAN is_unix = FALSE; + BOOLEAN is_pipe = FALSE; name = nameW->Buffer; name_len = nameW->Length / sizeof(WCHAR); -@@ -2857,13 +2859,17 @@ NTSTATUS CDECL wine_nt_to_unix_file_name( const UNICODE_STRING *nameW, ANSI_STRI +@@ -2799,13 +2801,17 @@ NTSTATUS CDECL wine_nt_to_unix_file_name( const UNICODE_STRING *nameW, ANSI_STRI name += prefix_len; name_len -= prefix_len; @@ -80,5 +80,5 @@ index 71761efa781..d5e44b58c08 100644 else { -- -2.18.0 +2.24.1 diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index a4d3f38e..716e0ac6 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -52,7 +52,7 @@ usage() # Get the upstream commit sha upstream_commit() { - echo "0df9cce29d0d32d3f1f13c4ec4eabc81675a17ed" + echo "d1373e8aae1b15b96e847488e4b6617789f8fb62" } # Show version information @@ -94,7 +94,6 @@ patch_enable_all () enable_atl_AtlAxDialogBox="$1" enable_cmd_launch_association="$1" enable_comctl32_Listview_DrawItem="$1" - enable_comctl32_alpha_bitmaps="$1" enable_comctl32_rebar_capture="$1" enable_comctl32_version_6="$1" enable_comdlg32_lpstrFileTitle="$1" @@ -103,9 +102,7 @@ patch_enable_all () enable_cryptext_CryptExtOpenCER="$1" enable_d3d11_Deferred_Context="$1" enable_d3dx9_32bpp_Alpha_Channel="$1" - enable_d3dx9_36_BumpLuminance="$1" enable_d3dx9_36_CloneEffect="$1" - enable_d3dx9_36_D3DXCreateKeyframedAnimationSet="$1" enable_d3dx9_36_D3DXDisassembleShader="$1" enable_d3dx9_36_D3DXOptimizeVertices="$1" enable_d3dx9_36_D3DXSHProjectCubeMap="$1" @@ -399,9 +396,6 @@ patch_enable () comctl32-Listview_DrawItem) enable_comctl32_Listview_DrawItem="$2" ;; - comctl32-alpha-bitmaps) - enable_comctl32_alpha_bitmaps="$2" - ;; comctl32-rebar-capture) enable_comctl32_rebar_capture="$2" ;; @@ -426,15 +420,9 @@ patch_enable () d3dx9-32bpp_Alpha_Channel) enable_d3dx9_32bpp_Alpha_Channel="$2" ;; - d3dx9_36-BumpLuminance) - enable_d3dx9_36_BumpLuminance="$2" - ;; d3dx9_36-CloneEffect) enable_d3dx9_36_CloneEffect="$2" ;; - d3dx9_36-D3DXCreateKeyframedAnimationSet) - enable_d3dx9_36_D3DXCreateKeyframedAnimationSet="$2" - ;; d3dx9_36-D3DXDisassembleShader) enable_d3dx9_36_D3DXDisassembleShader="$2" ;; @@ -2265,23 +2253,6 @@ if test "$enable_comctl32_Listview_DrawItem" -eq 1; then ) >> "$patchlist" fi -# Patchset comctl32-alpha-bitmaps -# | -# | This patchset fixes the following Wine bugs: -# | * [#47018] Paint 32-bpp bitmaps with an alpha channel using GdiAlphaBlend -# | -# | Modified files: -# | * dlls/comctl32/static.c -# | -if test "$enable_comctl32_alpha_bitmaps" -eq 1; then - patch_apply comctl32-alpha-bitmaps/0001-comctl32-Switch-to-using-a-structure-for-extra-stora.patch - patch_apply comctl32-alpha-bitmaps/0002-comctl32-Paint-32-bpp-bitmaps-with-an-alpha-channel-.patch - ( - printf '%s\n' '+ { "Dmitry Timoshkov", "comctl32: Switch to using a structure for extra storage.", 1 },'; - printf '%s\n' '+ { "Dmitry Timoshkov", "comctl32: Paint 32-bpp bitmaps with an alpha channel using GdiAlphaBlend.", 1 },'; - ) >> "$patchlist" -fi - # Patchset comctl32-rebar-capture # | # | This patchset fixes the following Wine bugs: @@ -2584,20 +2555,6 @@ if test "$enable_d3dx9_32bpp_Alpha_Channel" -eq 1; then ) >> "$patchlist" fi -# Patchset d3dx9_36-BumpLuminance -# | -# | Modified files: -# | * dlls/d3dx9_36/surface.c, dlls/d3dx9_36/util.c -# | -if test "$enable_d3dx9_36_BumpLuminance" -eq 1; then - patch_apply d3dx9_36-BumpLuminance/0001-d3dx9_36-Recognize-bump-luminance-X8L8V8U8-when-load.patch - patch_apply d3dx9_36-BumpLuminance/0002-d3dx9_36-Add-format-description-for-X8L8V8U8-for-for.patch - ( - printf '%s\n' '+ { "Christian Costa", "d3dx9_36: Recognize bump luminance X8L8V8U8 when loading dds file.", 1 },'; - printf '%s\n' '+ { "Christian Costa", "d3dx9_36: Add format description for X8L8V8U8 for format conversions.", 1 },'; - ) >> "$patchlist" -fi - # Patchset d3dx9_36-CloneEffect # | # | This patchset fixes the following Wine bugs: @@ -2613,21 +2570,6 @@ if test "$enable_d3dx9_36_CloneEffect" -eq 1; then ) >> "$patchlist" fi -# Patchset d3dx9_36-D3DXCreateKeyframedAnimationSet -# | -# | This patchset fixes the following Wine bugs: -# | * [#45481] d3dx9_36: Implement D3DXCreateKeyframedAnimationSet -# | -# | Modified files: -# | * dlls/d3dx9_36/animation.c, dlls/d3dx9_36/tests/mesh.c -# | -if test "$enable_d3dx9_36_D3DXCreateKeyframedAnimationSet" -eq 1; then - patch_apply d3dx9_36-D3DXCreateKeyframedAnimationSet/0001-d3dx9_36-Implement-D3DXCreateKeyframedAnimationSet.patch - ( - printf '%s\n' '+ { "Alistair Leslie-Hughes", "d3dx9_36: Implement D3DXCreateKeyframedAnimationSet.", 1 },'; - ) >> "$patchlist" -fi - # Patchset d3dx9_36-D3DXDisassembleShader # | # | This patchset fixes the following Wine bugs: diff --git a/patches/setupapi-DiskSpaceList/0005-setupapi-ImplementSetupAddSectionToDiskSpaceList.patch b/patches/setupapi-DiskSpaceList/0005-setupapi-ImplementSetupAddSectionToDiskSpaceList.patch index 5d3b7134..005178ac 100644 --- a/patches/setupapi-DiskSpaceList/0005-setupapi-ImplementSetupAddSectionToDiskSpaceList.patch +++ b/patches/setupapi-DiskSpaceList/0005-setupapi-ImplementSetupAddSectionToDiskSpaceList.patch @@ -1,21 +1,29 @@ -From da97aa366be1371f68736f49ec11bf401c29e3d4 Mon Sep 17 00:00:00 2001 +From 1c662a1bdeec10a46e88c5f83aaa3f3e8ea4bf12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Fri, 4 Mar 2016 04:53:00 +0100 Subject: [PATCH] setupapi: ImplementSetupAddSectionToDiskSpaceList. --- - dlls/setupapi/diskspace.c | 130 ++++++++++++++++++++- + dlls/setupapi/diskspace.c | 131 ++++++++++++++++++++- dlls/setupapi/queue.c | 2 +- dlls/setupapi/setupapi.spec | 4 +- dlls/setupapi/setupapi_private.h | 2 + dlls/setupapi/tests/diskspace.c | 193 +++++++++++++++++++++++++++++++ - 5 files changed, 327 insertions(+), 4 deletions(-) + 5 files changed, 328 insertions(+), 4 deletions(-) diff --git a/dlls/setupapi/diskspace.c b/dlls/setupapi/diskspace.c -index 01b08c1408e..3153a18856a 100644 +index 01b08c1408..8dbd0f0cc3 100644 --- a/dlls/setupapi/diskspace.c +++ b/dlls/setupapi/diskspace.c -@@ -64,6 +64,23 @@ static LONGLONG get_file_size(WCHAR *path) +@@ -20,6 +20,7 @@ + */ + + #include ++#include + + #include "windef.h" + #include "winbase.h" +@@ -64,6 +65,23 @@ static LONGLONG get_file_size(WCHAR *path) return size.QuadPart; } @@ -32,14 +40,14 @@ index 01b08c1408e..3153a18856a 100644 + return FALSE; + + /* FIXME: is there a atollW ? */ -+ *size = wcstol(buffer); ++ *size = wcstol(buffer, NULL, 10); + return TRUE; +} + /*********************************************************************** * SetupCreateDiskSpaceListW (SETUPAPI.@) */ -@@ -164,7 +181,118 @@ HDSKSPC WINAPI SetupDuplicateDiskSpaceListA(HDSKSPC DiskSpace, PVOID Reserved1, +@@ -164,7 +182,118 @@ HDSKSPC WINAPI SetupDuplicateDiskSpaceListA(HDSKSPC DiskSpace, PVOID Reserved1, } /*********************************************************************** @@ -160,23 +168,23 @@ index 01b08c1408e..3153a18856a 100644 BOOL WINAPI SetupAddInstallSectionToDiskSpaceListA(HDSKSPC DiskSpace, HINF InfHandle, HINF LayoutInfHandle, diff --git a/dlls/setupapi/queue.c b/dlls/setupapi/queue.c -index f7da3a7128e..3d11d1ea8a0 100644 +index aa59adf967..c0ca7bb76a 100644 --- a/dlls/setupapi/queue.c +++ b/dlls/setupapi/queue.c -@@ -338,7 +338,7 @@ static void get_source_info( HINF hinf, const WCHAR *src_file, SP_FILE_COPY_PARA +@@ -331,7 +331,7 @@ static void get_source_info( HINF hinf, const WCHAR *src_file, SP_FILE_COPY_PARA * * Retrieve the destination dir for a given section. */ -static WCHAR *get_destination_dir( HINF hinf, const WCHAR *section ) +WCHAR *get_destination_dir( HINF hinf, const WCHAR *section ) { - static const WCHAR Dest[] = {'D','e','s','t','i','n','a','t','i','o','n','D','i','r','s',0}; - static const WCHAR Def[] = {'D','e','f','a','u','l','t','D','e','s','t','D','i','r',0}; + INFCONTEXT context; + WCHAR systemdir[MAX_PATH], *dir; diff --git a/dlls/setupapi/setupapi.spec b/dlls/setupapi/setupapi.spec -index 81256a3417c..ad8652ac93b 100644 +index 33ccc48097..e8468bdeb0 100644 --- a/dlls/setupapi/setupapi.spec +++ b/dlls/setupapi/setupapi.spec -@@ -244,8 +244,8 @@ +@@ -246,8 +246,8 @@ @ stub SetArrayToMultiSzValue @ stdcall SetupAddInstallSectionToDiskSpaceListA(long long long str ptr long) @ stub SetupAddInstallSectionToDiskSpaceListW @@ -188,7 +196,7 @@ index 81256a3417c..ad8652ac93b 100644 @ stdcall SetupAddToDiskSpaceListW(long wstr int64 long ptr long) @ stdcall SetupAddToSourceListA(long str) diff --git a/dlls/setupapi/setupapi_private.h b/dlls/setupapi/setupapi_private.h -index f4685ab2b4c..4df062349cc 100644 +index f4685ab2b4..4df062349c 100644 --- a/dlls/setupapi/setupapi_private.h +++ b/dlls/setupapi/setupapi_private.h @@ -92,6 +92,8 @@ extern const WCHAR *DIRID_get_string( int dirid ) DECLSPEC_HIDDEN; @@ -201,7 +209,7 @@ index f4685ab2b4c..4df062349cc 100644 struct callback_WtoA_context diff --git a/dlls/setupapi/tests/diskspace.c b/dlls/setupapi/tests/diskspace.c -index 4ba9fea9e0a..7b8bcf4a342 100644 +index 4ba9fea9e0..7b8bcf4a34 100644 --- a/dlls/setupapi/tests/diskspace.c +++ b/dlls/setupapi/tests/diskspace.c @@ -30,6 +30,8 @@ @@ -424,5 +432,5 @@ index 4ba9fea9e0a..7b8bcf4a342 100644 + test_SetupAddSectionToDiskSpaceListA(); } -- -2.23.0 +2.24.1 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 dd7c584f..3d29bf0f 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,17 +1,17 @@ -From b64f226c152dce05a999631de84678c629d95218 Mon Sep 17 00:00:00 2001 +From 27e85f860100445fcce4bad975fc2cf3cfd9720c Mon Sep 17 00:00:00 2001 From: Paul Gofman Date: Mon, 25 Feb 2019 14:24:50 +0300 -Subject: [PATCH 2/5] d3d9: Support SWVP vertex shader float constants limits. +Subject: [PATCH] d3d9: Support SWVP vertex shader float constants limits. Signed-off-by: Paul Gofman --- dlls/d3d9/d3d9_private.h | 3 ++- - dlls/d3d9/device.c | 32 +++++++++++++++++++++++++------- + dlls/d3d9/device.c | 30 ++++++++++++++++++++++++------ dlls/d3d9/directx.c | 2 +- - 3 files changed, 28 insertions(+), 9 deletions(-) + 3 files changed, 27 insertions(+), 8 deletions(-) diff --git a/dlls/d3d9/d3d9_private.h b/dlls/d3d9/d3d9_private.h -index 03e2aa7f8a..03d804a61c 100644 +index bc9a3b98b2..95fe87df8a 100644 --- a/dlls/d3d9/d3d9_private.h +++ b/dlls/d3d9/d3d9_private.h @@ -40,6 +40,7 @@ @@ -22,7 +22,7 @@ index 03e2aa7f8a..03d804a61c 100644 #define D3D9_MAX_TEXTURE_UNITS 20 #define D3D9_MAX_STREAMS 16 -@@ -56,7 +57,7 @@ enum wined3d_format_id wined3dformat_from_d3dformat(D3DFORMAT format) DECLSPEC_H +@@ -59,7 +60,7 @@ enum wined3d_format_id wined3dformat_from_d3dformat(D3DFORMAT format) DECLSPEC_H unsigned int wined3dmapflags_from_d3dmapflags(unsigned int flags, unsigned int usage) DECLSPEC_HIDDEN; void present_parameters_from_wined3d_swapchain_desc(D3DPRESENT_PARAMETERS *present_parameters, const struct wined3d_swapchain_desc *swapchain_desc, DWORD presentation_interval) DECLSPEC_HIDDEN; @@ -32,7 +32,7 @@ index 03e2aa7f8a..03d804a61c 100644 struct d3d9 { diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c -index 8436967ddd..3e49a0a022 100644 +index 1ff178881c..09cf444c24 100644 --- a/dlls/d3d9/device.c +++ b/dlls/d3d9/device.c @@ -360,7 +360,7 @@ static BOOL wined3d_swapchain_desc_from_present_parameters(struct wined3d_swapch @@ -56,7 +56,7 @@ index 8436967ddd..3e49a0a022 100644 caps->NumSimultaneousRTs = min(D3D_MAX_SIMULTANEOUS_RENDERTARGETS, caps->NumSimultaneousRTs); if (caps->PixelShaderVersion > 3) -@@ -684,6 +687,7 @@ static HRESULT WINAPI d3d9_device_GetDirect3D(IDirect3DDevice9Ex *iface, IDirect +@@ -695,6 +698,7 @@ static HRESULT WINAPI d3d9_device_GetDirect3D(IDirect3DDevice9Ex *iface, IDirect static HRESULT WINAPI d3d9_device_GetDeviceCaps(IDirect3DDevice9Ex *iface, D3DCAPS9 *caps) { struct d3d9_device *device = impl_from_IDirect3DDevice9Ex(iface); @@ -64,7 +64,7 @@ index 8436967ddd..3e49a0a022 100644 struct wined3d_caps wined3d_caps; HRESULT hr; -@@ -692,13 +696,15 @@ static HRESULT WINAPI d3d9_device_GetDeviceCaps(IDirect3DDevice9Ex *iface, D3DCA +@@ -703,13 +707,15 @@ static HRESULT WINAPI d3d9_device_GetDeviceCaps(IDirect3DDevice9Ex *iface, D3DCA if (!caps) return D3DERR_INVALIDCALL; @@ -81,7 +81,7 @@ index 8436967ddd..3e49a0a022 100644 return hr; } -@@ -3459,14 +3465,20 @@ static HRESULT WINAPI d3d9_device_SetVertexShaderConstantF(IDirect3DDevice9Ex *i +@@ -3542,14 +3548,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); @@ -104,34 +104,33 @@ index 8436967ddd..3e49a0a022 100644 return D3DERR_INVALIDCALL; } -@@ -3487,14 +3499,20 @@ static HRESULT WINAPI d3d9_device_GetVertexShaderConstantF(IDirect3DDevice9Ex *i - UINT reg_idx, float *data, UINT count) +@@ -3565,14 +3577,20 @@ static HRESULT WINAPI d3d9_device_GetVertexShaderConstantF(IDirect3DDevice9Ex *i + UINT start_idx, float *constants, UINT count) { struct d3d9_device *device = impl_from_IDirect3DDevice9Ex(iface); + struct wined3d_device_creation_parameters creation_parameters; + const struct wined3d_vec4 *src; + unsigned int max_constants; - HRESULT hr; - TRACE("iface %p, reg_idx %u, data %p, count %u.\n", iface, reg_idx, data, count); + TRACE("iface %p, start_idx %u, constants %p, count %u.\n", iface, start_idx, constants, count); -- if (reg_idx + count > D3D9_MAX_VERTEX_SHADER_CONSTANTF) + if (!constants) + return D3DERR_INVALIDCALL; + +- if (start_idx >= device->vs_uniform_count || count > device->vs_uniform_count - start_idx) + 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 (reg_idx + count > max_constants) ++ if (start_idx >= max_constants || count > max_constants - start_idx) { WARN("Trying to access %u constants, but d3d9 only supports %u\n", -- reg_idx + count, D3D9_MAX_VERTEX_SHADER_CONSTANTF); -+ reg_idx + count, max_constants); - return D3DERR_INVALIDCALL; - } - + start_idx + count, device->vs_uniform_count); diff --git a/dlls/d3d9/directx.c b/dlls/d3d9/directx.c -index f42c5ea622..da80033892 100644 +index 04ff3fe5b6..6bd0a7a555 100644 --- a/dlls/d3d9/directx.c +++ b/dlls/d3d9/directx.c -@@ -370,7 +370,7 @@ static HRESULT WINAPI d3d9_GetDeviceCaps(IDirect3D9Ex *iface, UINT adapter, D3DD +@@ -380,7 +380,7 @@ static HRESULT WINAPI d3d9_GetDeviceCaps(IDirect3D9Ex *iface, UINT adapter, D3DD hr = wined3d_get_device_caps(d3d9->wined3d, adapter, device_type, &wined3d_caps); wined3d_mutex_unlock(); @@ -141,5 +140,5 @@ index f42c5ea622..da80033892 100644 return hr; } -- -2.21.0 +2.24.1