From dd7f7cc1baf7090491a66a0add7b92f51dd2f5b8 Mon Sep 17 00:00:00 2001 From: Alistair Leslie-Hughes Date: Wed, 25 Sep 2019 12:24:40 +1000 Subject: [PATCH] Rebase against ae8f605ede0054c8e380e809c196f2621d9cf423 --- ...d-wined3d_resource_map_info-function.patch | 86 +++++++++++++------ .../0001-d3dx9_36-Add-dxtn-support.patch | 75 +++++++--------- ...exture-dimensions-to-block-size-for-.patch | 27 +++--- ...e-check-before-returning-a-default-s.patch | 34 +++++--- patches/patchinstall.sh | 2 +- 5 files changed, 132 insertions(+), 92 deletions(-) diff --git a/patches/d3d11-Deferred_Context/0002-wined3d-Add-wined3d_resource_map_info-function.patch b/patches/d3d11-Deferred_Context/0002-wined3d-Add-wined3d_resource_map_info-function.patch index d3bec367..aebc3824 100644 --- a/patches/d3d11-Deferred_Context/0002-wined3d-Add-wined3d_resource_map_info-function.patch +++ b/patches/d3d11-Deferred_Context/0002-wined3d-Add-wined3d_resource_map_info-function.patch @@ -1,25 +1,51 @@ -From 837daae12d4c7fd40a35511d8d45299b46e91b38 Mon Sep 17 00:00:00 2001 +From d1d611696b6cb9d61a811e56df4cdf7d51cd75b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Thu, 19 Jan 2017 16:54:42 +0100 Subject: [PATCH] wined3d: Add wined3d_resource_map_info function. --- - dlls/wined3d/buffer.c | 19 +++++++++++++++++++ - dlls/wined3d/resource.c | 8 ++++++++ - dlls/wined3d/texture.c | 31 +++++++++++++++++++++++++++++++ + dlls/wined3d/buffer.c | 57 ++++++++++++++++++++++++++++++++++ + dlls/wined3d/resource.c | 8 +++++ + dlls/wined3d/texture.c | 31 ++++++++++++++++++ dlls/wined3d/wined3d.spec | 1 + dlls/wined3d/wined3d_private.h | 2 ++ - include/wine/wined3d.h | 9 +++++++++ - 6 files changed, 70 insertions(+) + include/wine/wined3d.h | 9 ++++++ + 6 files changed, 108 insertions(+) diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c -index 4c90d820..8065839d 100644 +index 18a0d721178..46d05576714 100644 --- a/dlls/wined3d/buffer.c +++ b/dlls/wined3d/buffer.c -@@ -1306,6 +1306,24 @@ static HRESULT buffer_resource_sub_resource_map(struct wined3d_resource *resourc - return wined3d_buffer_gl_map(buffer_gl, offset, size, (BYTE **)&map_desc->data, flags); +@@ -1255,6 +1255,62 @@ static void buffer_resource_preload(struct wined3d_resource *resource) + context_release(context); } ++static HRESULT buffer_resource_sub_resource_map(struct wined3d_resource *resource, unsigned int sub_resource_idx, ++ struct wined3d_map_desc *map_desc, const struct wined3d_box *box, DWORD flags) ++{ ++ struct wined3d_buffer_gl *buffer_gl = wined3d_buffer_gl(buffer_from_resource(resource)); ++ UINT offset, size; ++ ++ if (sub_resource_idx) ++ { ++ WARN("Invalid sub_resource_idx %u.\n", sub_resource_idx); ++ return E_INVALIDARG; ++ } ++ ++ if (box) ++ { ++ offset = box->left; ++ size = box->right - box->left; ++ } ++ else ++ { ++ offset = size = 0; ++ } ++ ++ map_desc->row_pitch = map_desc->slice_pitch = resource->size; ++ return wined3d_buffer_gl_map(buffer_gl, offset, size, (BYTE **)&map_desc->data, flags); ++} ++ +static HRESULT buffer_resource_sub_resource_map_info(struct wined3d_resource *resource, unsigned int sub_resource_idx, + struct wined3d_map_info *info, DWORD flags) +{ @@ -38,10 +64,22 @@ index 4c90d820..8065839d 100644 + return WINED3D_OK; +} + - static HRESULT buffer_resource_sub_resource_unmap(struct wined3d_resource *resource, unsigned int sub_resource_idx) ++static HRESULT buffer_resource_sub_resource_unmap(struct wined3d_resource *resource, unsigned int sub_resource_idx) ++{ ++ if (sub_resource_idx) ++ { ++ WARN("Invalid sub_resource_idx %u.\n", sub_resource_idx); ++ return E_INVALIDARG; ++ } ++ ++ wined3d_buffer_gl_unmap(wined3d_buffer_gl(buffer_from_resource(resource))); ++ return WINED3D_OK; ++} ++ + static const struct wined3d_resource_ops buffer_resource_ops = { - if (sub_resource_idx) -@@ -1325,6 +1343,7 @@ static const struct wined3d_resource_ops buffer_resource_ops = + buffer_resource_incref, +@@ -1262,6 +1318,7 @@ static const struct wined3d_resource_ops buffer_resource_ops = buffer_resource_preload, buffer_unload, buffer_resource_sub_resource_map, @@ -50,10 +88,10 @@ index 4c90d820..8065839d 100644 }; diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c -index a1b2cbd2..dd4ca20c 100644 +index bba940f42cb..ff31c004b06 100644 --- a/dlls/wined3d/resource.c +++ b/dlls/wined3d/resource.c -@@ -361,6 +361,14 @@ HRESULT CDECL wined3d_resource_map(struct wined3d_resource *resource, unsigned i +@@ -383,6 +383,14 @@ HRESULT CDECL wined3d_resource_map(struct wined3d_resource *resource, unsigned i return wined3d_cs_map(resource->device->cs, resource, sub_resource_idx, map_desc, box, flags); } @@ -69,10 +107,10 @@ index a1b2cbd2..dd4ca20c 100644 { TRACE("resource %p, sub_resource_idx %u.\n", resource, sub_resource_idx); diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c -index 87998d55..45ee3d3d 100644 +index ff25f64043d..37054833c55 100644 --- a/dlls/wined3d/texture.c +++ b/dlls/wined3d/texture.c -@@ -2698,6 +2698,36 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour +@@ -3024,6 +3024,36 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour return WINED3D_OK; } @@ -109,7 +147,7 @@ index 87998d55..45ee3d3d 100644 static HRESULT texture_resource_sub_resource_unmap(struct wined3d_resource *resource, unsigned int sub_resource_idx) { struct wined3d_texture_sub_resource *sub_resource; -@@ -2749,6 +2779,7 @@ static const struct wined3d_resource_ops texture_resource_ops = +@@ -3076,6 +3106,7 @@ static const struct wined3d_resource_ops texture_resource_ops = texture_resource_preload, wined3d_texture_gl_unload, texture_resource_sub_resource_map, @@ -118,10 +156,10 @@ index 87998d55..45ee3d3d 100644 }; diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec -index ee702211..f4944564 100644 +index edd4a70d979..742126c4d24 100644 --- a/dlls/wined3d/wined3d.spec +++ b/dlls/wined3d/wined3d.spec -@@ -220,6 +220,7 @@ +@@ -216,6 +216,7 @@ @ cdecl wined3d_resource_get_parent(ptr) @ cdecl wined3d_resource_get_priority(ptr) @ cdecl wined3d_resource_map(ptr long ptr ptr long) @@ -130,10 +168,10 @@ index ee702211..f4944564 100644 @ cdecl wined3d_resource_set_parent(ptr ptr) @ cdecl wined3d_resource_set_priority(ptr long) diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h -index 9a01ed29..9f8f784e 100644 +index 5ce23f85f6b..740e5352172 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h -@@ -3096,6 +3096,8 @@ struct wined3d_resource_ops +@@ -3414,6 +3414,8 @@ struct wined3d_resource_ops void (*resource_unload)(struct wined3d_resource *resource); HRESULT (*resource_sub_resource_map)(struct wined3d_resource *resource, unsigned int sub_resource_idx, struct wined3d_map_desc *map_desc, const struct wined3d_box *box, DWORD flags); @@ -143,7 +181,7 @@ index 9a01ed29..9f8f784e 100644 }; diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h -index dc491d3b..8e0cf665 100644 +index 9f9c8496838..869600ace40 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -1835,6 +1835,13 @@ struct wined3d_map_desc @@ -160,7 +198,7 @@ index dc491d3b..8e0cf665 100644 struct wined3d_sub_resource_data { const void *data; -@@ -2606,6 +2613,8 @@ void * __cdecl wined3d_resource_get_parent(const struct wined3d_resource *resour +@@ -2602,6 +2609,8 @@ void * __cdecl wined3d_resource_get_parent(const struct wined3d_resource *resour DWORD __cdecl wined3d_resource_get_priority(const struct wined3d_resource *resource); HRESULT __cdecl wined3d_resource_map(struct wined3d_resource *resource, unsigned int sub_resource_idx, struct wined3d_map_desc *map_desc, const struct wined3d_box *box, DWORD flags); @@ -170,5 +208,5 @@ index dc491d3b..8e0cf665 100644 void __cdecl wined3d_resource_set_parent(struct wined3d_resource *resource, void *parent); DWORD __cdecl wined3d_resource_set_priority(struct wined3d_resource *resource, DWORD priority); -- -2.19.1 +2.23.0 diff --git a/patches/d3dx9_36-DXTn/0001-d3dx9_36-Add-dxtn-support.patch b/patches/d3dx9_36-DXTn/0001-d3dx9_36-Add-dxtn-support.patch index cf012b0a..44fd0310 100644 --- a/patches/d3dx9_36-DXTn/0001-d3dx9_36-Add-dxtn-support.patch +++ b/patches/d3dx9_36-DXTn/0001-d3dx9_36-Add-dxtn-support.patch @@ -1,7 +1,7 @@ -From 3fb7038ed7f1ebbadd60465f68ed0e61ba81e730 Mon Sep 17 00:00:00 2001 +From 8ae1e18666d19c3c244344eed548ed1ea8183e67 Mon Sep 17 00:00:00 2001 From: Christian Costa Date: Fri, 30 Mar 2018 08:22:02 +0000 -Subject: [PATCH] d3dx9_36: add DXTn support +Subject: [PATCH] d3dx9_36: Add DXTn support --- dlls/d3dx9_24/Makefile.in | 2 +- @@ -18,7 +18,7 @@ Subject: [PATCH] d3dx9_36: add DXTn support dlls/d3dx9_35/Makefile.in | 2 +- dlls/d3dx9_36/Makefile.in | 2 +- dlls/d3dx9_36/surface.c | 102 +++++++++++++++++++++++++++++++--- - dlls/d3dx9_36/tests/surface.c | 8 +-- + dlls/d3dx9_36/tests/surface.c | 6 +- dlls/d3dx9_37/Makefile.in | 2 +- dlls/d3dx9_38/Makefile.in | 2 +- dlls/d3dx9_39/Makefile.in | 2 +- @@ -26,10 +26,10 @@ Subject: [PATCH] d3dx9_36: add DXTn support dlls/d3dx9_41/Makefile.in | 2 +- dlls/d3dx9_42/Makefile.in | 2 +- dlls/d3dx9_43/Makefile.in | 2 +- - 22 files changed, 118 insertions(+), 32 deletions(-) + 22 files changed, 117 insertions(+), 31 deletions(-) diff --git a/dlls/d3dx9_24/Makefile.in b/dlls/d3dx9_24/Makefile.in -index a327292b8..b43b1be81 100644 +index a327292b813..b43b1be8186 100644 --- a/dlls/d3dx9_24/Makefile.in +++ b/dlls/d3dx9_24/Makefile.in @@ -1,6 +1,6 @@ @@ -41,7 +41,7 @@ index a327292b8..b43b1be81 100644 DELAYIMPORTS = windowscodecs diff --git a/dlls/d3dx9_25/Makefile.in b/dlls/d3dx9_25/Makefile.in -index ccf374832..edcba8b59 100644 +index ccf37483271..edcba8b59b2 100644 --- a/dlls/d3dx9_25/Makefile.in +++ b/dlls/d3dx9_25/Makefile.in @@ -1,6 +1,6 @@ @@ -53,7 +53,7 @@ index ccf374832..edcba8b59 100644 DELAYIMPORTS = windowscodecs diff --git a/dlls/d3dx9_26/Makefile.in b/dlls/d3dx9_26/Makefile.in -index 21ef9e00b..72d0e0ce1 100644 +index 21ef9e00b2d..72d0e0ce1ed 100644 --- a/dlls/d3dx9_26/Makefile.in +++ b/dlls/d3dx9_26/Makefile.in @@ -1,6 +1,6 @@ @@ -65,7 +65,7 @@ index 21ef9e00b..72d0e0ce1 100644 DELAYIMPORTS = windowscodecs diff --git a/dlls/d3dx9_27/Makefile.in b/dlls/d3dx9_27/Makefile.in -index 3adea191c..24763cb10 100644 +index 3adea191cee..24763cb10c4 100644 --- a/dlls/d3dx9_27/Makefile.in +++ b/dlls/d3dx9_27/Makefile.in @@ -1,6 +1,6 @@ @@ -77,7 +77,7 @@ index 3adea191c..24763cb10 100644 DELAYIMPORTS = windowscodecs diff --git a/dlls/d3dx9_28/Makefile.in b/dlls/d3dx9_28/Makefile.in -index bd75a23d2..ce041b069 100644 +index bd75a23d29f..ce041b06978 100644 --- a/dlls/d3dx9_28/Makefile.in +++ b/dlls/d3dx9_28/Makefile.in @@ -1,6 +1,6 @@ @@ -89,7 +89,7 @@ index bd75a23d2..ce041b069 100644 DELAYIMPORTS = windowscodecs diff --git a/dlls/d3dx9_29/Makefile.in b/dlls/d3dx9_29/Makefile.in -index 491c105ab..99ab2ded7 100644 +index 491c105ab28..99ab2ded7f5 100644 --- a/dlls/d3dx9_29/Makefile.in +++ b/dlls/d3dx9_29/Makefile.in @@ -1,6 +1,6 @@ @@ -101,7 +101,7 @@ index 491c105ab..99ab2ded7 100644 DELAYIMPORTS = windowscodecs diff --git a/dlls/d3dx9_30/Makefile.in b/dlls/d3dx9_30/Makefile.in -index 44e28b79f..bcf0b1c82 100644 +index 44e28b79f55..bcf0b1c82b7 100644 --- a/dlls/d3dx9_30/Makefile.in +++ b/dlls/d3dx9_30/Makefile.in @@ -1,6 +1,6 @@ @@ -113,7 +113,7 @@ index 44e28b79f..bcf0b1c82 100644 DELAYIMPORTS = windowscodecs diff --git a/dlls/d3dx9_31/Makefile.in b/dlls/d3dx9_31/Makefile.in -index 0f16d27fd..7c980fbb8 100644 +index 0f16d27fdc2..7c980fbb86d 100644 --- a/dlls/d3dx9_31/Makefile.in +++ b/dlls/d3dx9_31/Makefile.in @@ -1,6 +1,6 @@ @@ -125,7 +125,7 @@ index 0f16d27fd..7c980fbb8 100644 DELAYIMPORTS = windowscodecs diff --git a/dlls/d3dx9_32/Makefile.in b/dlls/d3dx9_32/Makefile.in -index 99357dcce..e493bd8a6 100644 +index 99357dccea5..e493bd8a6e0 100644 --- a/dlls/d3dx9_32/Makefile.in +++ b/dlls/d3dx9_32/Makefile.in @@ -1,6 +1,6 @@ @@ -137,7 +137,7 @@ index 99357dcce..e493bd8a6 100644 DELAYIMPORTS = windowscodecs diff --git a/dlls/d3dx9_33/Makefile.in b/dlls/d3dx9_33/Makefile.in -index 5a92dca61..fba4106af 100644 +index 5a92dca61dc..fba4106afb4 100644 --- a/dlls/d3dx9_33/Makefile.in +++ b/dlls/d3dx9_33/Makefile.in @@ -1,6 +1,6 @@ @@ -149,7 +149,7 @@ index 5a92dca61..fba4106af 100644 DELAYIMPORTS = windowscodecs diff --git a/dlls/d3dx9_34/Makefile.in b/dlls/d3dx9_34/Makefile.in -index 84cca56ec..e03d8ebd5 100644 +index 84cca56ec59..e03d8ebd536 100644 --- a/dlls/d3dx9_34/Makefile.in +++ b/dlls/d3dx9_34/Makefile.in @@ -1,6 +1,6 @@ @@ -161,7 +161,7 @@ index 84cca56ec..e03d8ebd5 100644 DELAYIMPORTS = windowscodecs diff --git a/dlls/d3dx9_35/Makefile.in b/dlls/d3dx9_35/Makefile.in -index 640f30620..ea19e55b2 100644 +index 640f3062044..ea19e55b2e9 100644 --- a/dlls/d3dx9_35/Makefile.in +++ b/dlls/d3dx9_35/Makefile.in @@ -1,6 +1,6 @@ @@ -173,7 +173,7 @@ index 640f30620..ea19e55b2 100644 DELAYIMPORTS = windowscodecs diff --git a/dlls/d3dx9_36/Makefile.in b/dlls/d3dx9_36/Makefile.in -index b8a173ce0..3f96b6656 100644 +index b8a173ce01a..3f96b6656f0 100644 --- a/dlls/d3dx9_36/Makefile.in +++ b/dlls/d3dx9_36/Makefile.in @@ -1,7 +1,7 @@ @@ -186,7 +186,7 @@ index b8a173ce0..3f96b6656 100644 EXTRADLLFLAGS = -mno-cygwin diff --git a/dlls/d3dx9_36/surface.c b/dlls/d3dx9_36/surface.c -index 8e9b834d8..83c30338e 100644 +index 65774d47c5d..5e7b8de9d94 100644 --- a/dlls/d3dx9_36/surface.c +++ b/dlls/d3dx9_36/surface.c @@ -25,6 +25,8 @@ @@ -198,7 +198,7 @@ index 8e9b834d8..83c30338e 100644 WINE_DEFAULT_DEBUG_CHANNEL(d3dx); HRESULT WINAPI WICCreateImagingFactory_Proxy(UINT, IWICImagingFactory**); -@@ -1798,6 +1800,24 @@ void point_filter_argb_pixels(const BYTE *src, UINT src_row_pitch, UINT src_slic +@@ -1900,6 +1902,24 @@ void point_filter_argb_pixels(const BYTE *src, UINT src_row_pitch, UINT src_slic } } @@ -223,7 +223,7 @@ index 8e9b834d8..83c30338e 100644 /************************************************************ * D3DXLoadSurfaceFromMemory * -@@ -1837,10 +1857,12 @@ HRESULT WINAPI D3DXLoadSurfaceFromMemory(IDirect3DSurface9 *dst_surface, +@@ -1939,10 +1959,12 @@ HRESULT WINAPI D3DXLoadSurfaceFromMemory(IDirect3DSurface9 *dst_surface, { const struct pixel_format_desc *srcformatdesc, *destformatdesc; IDirect3DSurface9 *surface; @@ -237,7 +237,7 @@ index 8e9b834d8..83c30338e 100644 TRACE("(%p, %p, %s, %p, %#x, %u, %p, %s, %#x, 0x%08x)\n", dst_surface, dst_palette, wine_dbgstr_rect(dst_rect), src_memory, src_format, -@@ -1921,18 +1943,65 @@ HRESULT WINAPI D3DXLoadSurfaceFromMemory(IDirect3DSurface9 *dst_surface, +@@ -2019,18 +2041,65 @@ HRESULT WINAPI D3DXLoadSurfaceFromMemory(IDirect3DSurface9 *dst_surface, } else /* Stretching or format conversion. */ { @@ -307,7 +307,7 @@ index 8e9b834d8..83c30338e 100644 } else /* if ((filter & 0xf) == D3DX_FILTER_POINT) */ { -@@ -1941,12 +2010,29 @@ HRESULT WINAPI D3DXLoadSurfaceFromMemory(IDirect3DSurface9 *dst_surface, +@@ -2039,12 +2108,29 @@ HRESULT WINAPI D3DXLoadSurfaceFromMemory(IDirect3DSurface9 *dst_surface, /* Always apply a point filter until D3DX_FILTER_LINEAR, * D3DX_FILTER_TRIANGLE and D3DX_FILTER_BOX are implemented. */ @@ -341,10 +341,10 @@ index 8e9b834d8..83c30338e 100644 /************************************************************ diff --git a/dlls/d3dx9_36/tests/surface.c b/dlls/d3dx9_36/tests/surface.c -index 4a10492a0..d59ff028a 100644 +index 2f8149fd01a..4b66c17b40c 100644 --- a/dlls/d3dx9_36/tests/surface.c +++ b/dlls/d3dx9_36/tests/surface.c -@@ -1242,7 +1242,7 @@ static void test_D3DXLoadSurface(IDirect3DDevice9 *device) +@@ -1256,7 +1256,7 @@ static void test_D3DXLoadSurface(IDirect3DDevice9 *device) hr = IDirect3DTexture9_GetSurfaceLevel(tex, 0, &newsurf); ok(SUCCEEDED(hr), "Failed to get the surface, hr %#x.\n", hr); hr = D3DXLoadSurfaceFromSurface(newsurf, NULL, NULL, surf, NULL, NULL, D3DX_FILTER_NONE, 0); @@ -353,16 +353,7 @@ index 4a10492a0..d59ff028a 100644 check_release((IUnknown*)newsurf, 1); check_release((IUnknown*)tex, 0); } -@@ -1268,7 +1268,7 @@ static void test_D3DXLoadSurface(IDirect3DDevice9 *device) - hr = IDirect3DTexture9_GetSurfaceLevel(tex, 0, &newsurf); - ok(SUCCEEDED(hr), "Failed to get the surface, hr %#x.\n", hr); - hr = D3DXLoadSurfaceFromSurface(newsurf, NULL, NULL, surf, NULL, NULL, D3DX_FILTER_NONE, 0); -- todo_wine ok(SUCCEEDED(hr), "Failed to convert pixels to DXT5 format.\n"); -+ ok(SUCCEEDED(hr), "Failed to convert pixels to DXT5 format.\n"); - check_release((IUnknown*)newsurf, 1); - check_release((IUnknown*)tex, 0); - } -@@ -1281,10 +1281,10 @@ static void test_D3DXLoadSurface(IDirect3DDevice9 *device) +@@ -1315,10 +1315,10 @@ static void test_D3DXLoadSurface(IDirect3DDevice9 *device) hr = IDirect3DTexture9_GetSurfaceLevel(tex, 0, &newsurf); ok(SUCCEEDED(hr), "Failed to get the surface, hr %#x.\n", hr); hr = D3DXLoadSurfaceFromSurface(newsurf, NULL, NULL, surf, NULL, NULL, D3DX_FILTER_NONE, 0); @@ -376,7 +367,7 @@ index 4a10492a0..d59ff028a 100644 check_release((IUnknown*)newsurf, 1); check_release((IUnknown*)tex, 0); diff --git a/dlls/d3dx9_37/Makefile.in b/dlls/d3dx9_37/Makefile.in -index d16a0ce05..669482dee 100644 +index d16a0ce05aa..669482deecf 100644 --- a/dlls/d3dx9_37/Makefile.in +++ b/dlls/d3dx9_37/Makefile.in @@ -1,6 +1,6 @@ @@ -388,7 +379,7 @@ index d16a0ce05..669482dee 100644 DELAYIMPORTS = windowscodecs diff --git a/dlls/d3dx9_38/Makefile.in b/dlls/d3dx9_38/Makefile.in -index 4a02ab417..1f43705e7 100644 +index 4a02ab4174e..1f43705e727 100644 --- a/dlls/d3dx9_38/Makefile.in +++ b/dlls/d3dx9_38/Makefile.in @@ -1,6 +1,6 @@ @@ -400,7 +391,7 @@ index 4a02ab417..1f43705e7 100644 DELAYIMPORTS = windowscodecs diff --git a/dlls/d3dx9_39/Makefile.in b/dlls/d3dx9_39/Makefile.in -index 5a3840574..690ed7d31 100644 +index 5a3840574aa..690ed7d3168 100644 --- a/dlls/d3dx9_39/Makefile.in +++ b/dlls/d3dx9_39/Makefile.in @@ -1,6 +1,6 @@ @@ -412,7 +403,7 @@ index 5a3840574..690ed7d31 100644 DELAYIMPORTS = windowscodecs diff --git a/dlls/d3dx9_40/Makefile.in b/dlls/d3dx9_40/Makefile.in -index 581e18dba..8e6984683 100644 +index 581e18dba11..8e6984683e5 100644 --- a/dlls/d3dx9_40/Makefile.in +++ b/dlls/d3dx9_40/Makefile.in @@ -1,6 +1,6 @@ @@ -424,7 +415,7 @@ index 581e18dba..8e6984683 100644 DELAYIMPORTS = windowscodecs diff --git a/dlls/d3dx9_41/Makefile.in b/dlls/d3dx9_41/Makefile.in -index 63a0be753..37fb2f3e6 100644 +index 63a0be753ff..37fb2f3e6d5 100644 --- a/dlls/d3dx9_41/Makefile.in +++ b/dlls/d3dx9_41/Makefile.in @@ -1,6 +1,6 @@ @@ -436,7 +427,7 @@ index 63a0be753..37fb2f3e6 100644 DELAYIMPORTS = windowscodecs diff --git a/dlls/d3dx9_42/Makefile.in b/dlls/d3dx9_42/Makefile.in -index ff391a202..2d706c5f8 100644 +index ff391a20253..2d706c5f8e6 100644 --- a/dlls/d3dx9_42/Makefile.in +++ b/dlls/d3dx9_42/Makefile.in @@ -1,6 +1,6 @@ @@ -448,7 +439,7 @@ index ff391a202..2d706c5f8 100644 DELAYIMPORTS = windowscodecs diff --git a/dlls/d3dx9_43/Makefile.in b/dlls/d3dx9_43/Makefile.in -index e009a41c5..d539f6b22 100644 +index e009a41c57a..d539f6b22de 100644 --- a/dlls/d3dx9_43/Makefile.in +++ b/dlls/d3dx9_43/Makefile.in @@ -1,6 +1,6 @@ @@ -460,5 +451,5 @@ index e009a41c5..d539f6b22 100644 DELAYIMPORTS = windowscodecs -- -2.22.0 +2.23.0 diff --git a/patches/d3dx9_36-Texture_Align/0001-d3dx9_36-Align-texture-dimensions-to-block-size-for-.patch b/patches/d3dx9_36-Texture_Align/0001-d3dx9_36-Align-texture-dimensions-to-block-size-for-.patch index 7e7a1c30..1b48ffca 100644 --- a/patches/d3dx9_36-Texture_Align/0001-d3dx9_36-Align-texture-dimensions-to-block-size-for-.patch +++ b/patches/d3dx9_36-Texture_Align/0001-d3dx9_36-Align-texture-dimensions-to-block-size-for-.patch @@ -1,24 +1,23 @@ -From e83a145da4b9e2c0c4b2b449aa72ce129344c5e5 Mon Sep 17 00:00:00 2001 +From 971091d7dac0711339d698262696d29a03b7d17f Mon Sep 17 00:00:00 2001 From: Christian Costa Date: Tue, 4 Nov 2014 22:22:03 +0100 -Subject: d3dx9_36: Align texture dimensions to block size for compressed - textures in D3DXCheckTextureRequirements. +Subject: [PATCH] d3dx9_36: Align texture dimensions to block size for + compressed textures in D3DXCheckTextureRequirements. --- - dlls/d3dx9_36/tests/texture.c | 10 ++++++++++ - dlls/d3dx9_36/texture.c | 8 ++++---- - 2 files changed, 14 insertions(+), 4 deletions(-) + dlls/d3dx9_36/tests/texture.c | 9 +++++++++ + dlls/d3dx9_36/texture.c | 8 ++++---- + 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/dlls/d3dx9_36/tests/texture.c b/dlls/d3dx9_36/tests/texture.c -index 61132bb..11a3b92 100644 +index 68bbd37f8ac..3aef8037282 100644 --- a/dlls/d3dx9_36/tests/texture.c +++ b/dlls/d3dx9_36/tests/texture.c -@@ -374,6 +374,16 @@ static void test_D3DXCheckTextureRequirements(IDirect3DDevice9 *device) - ok(height == 4, "Returned height %d, expected %d\n", height, 4); - ok(mipmaps == 1, "Returned mipmaps %d, expected %d\n", mipmaps, 1); - ok(format == D3DFMT_DXT5, "Returned format %u, expected %u\n", format, D3DFMT_DXT5); +@@ -439,6 +439,15 @@ static void test_D3DXCheckTextureRequirements(IDirect3DDevice9 *device) + ok(height == 4, "Got unexpected height %u.\n", height); + ok(mipmaps == 1, "Got unexpected mipmap level count %u.\n", mipmaps); + ok(format == D3DFMT_DXT5, "Got unexpected format %u.\n", format); + -+ format = D3DFMT_DXT5; + width = 5; height = 5; + mipmaps = 1; + hr = D3DXCheckTextureRequirements(device, &width, &height, &mipmaps, 0, &format, D3DPOOL_DEFAULT); @@ -31,7 +30,7 @@ index 61132bb..11a3b92 100644 else { diff --git a/dlls/d3dx9_36/texture.c b/dlls/d3dx9_36/texture.c -index 7ebe264..fa0106c 100644 +index b743d5cfad0..77148db1d16 100644 --- a/dlls/d3dx9_36/texture.c +++ b/dlls/d3dx9_36/texture.c @@ -333,10 +333,10 @@ HRESULT WINAPI D3DXCheckTextureRequirements(struct IDirect3DDevice9 *device, UIN @@ -50,5 +49,5 @@ index 7ebe264..fa0106c 100644 if ((caps.TextureCaps & D3DPTEXTURECAPS_POW2) && (!is_pow2(w))) -- -2.1.3 +2.23.0 diff --git a/patches/ntdll-Serial_Port_Detection/0001-ntdll-Do-a-device-check-before-returning-a-default-s.patch b/patches/ntdll-Serial_Port_Detection/0001-ntdll-Do-a-device-check-before-returning-a-default-s.patch index 597ce9a0..4553e792 100644 --- a/patches/ntdll-Serial_Port_Detection/0001-ntdll-Do-a-device-check-before-returning-a-default-s.patch +++ b/patches/ntdll-Serial_Port_Detection/0001-ntdll-Do-a-device-check-before-returning-a-default-s.patch @@ -1,16 +1,16 @@ -From ebc82ef6a886955f8e2abff6b1b126c8b41b6515 Mon Sep 17 00:00:00 2001 +From 00f64eda25de32736d92318f8f5ed50f301dc687 Mon Sep 17 00:00:00 2001 From: Alex Henrie Date: Tue, 29 Dec 2015 00:48:02 -0700 -Subject: mountmgr.sys: Do a device check before returning a default serial - port name. +Subject: [PATCH] mountmgr.sys: Do a device check before returning a default + serial port name. Fixes https://bugs.winehq.org/show_bug.cgi?id=39793 --- - dlls/mountmgr.sys/device.c | 24 ++++++++++++++++++++++++ - 1 file changed, 24 insertions(+) + dlls/mountmgr.sys/device.c | 36 ++++++++++++++++++++++++++++++++++++ + 1 file changed, 36 insertions(+) diff --git a/dlls/mountmgr.sys/device.c b/dlls/mountmgr.sys/device.c -index ee2599984a6..994e3676176 100644 +index 87609bf3de2..37635e3e6e8 100644 --- a/dlls/mountmgr.sys/device.c +++ b/dlls/mountmgr.sys/device.c @@ -25,6 +25,9 @@ @@ -23,10 +23,22 @@ index ee2599984a6..994e3676176 100644 #include #define NONAMELESSUNION -@@ -1038,6 +1041,27 @@ static BOOL create_port_device( DRIVER_OBJECT *driver, int n, const char *unix_p - if (!unix_path) - return FALSE; +@@ -1102,6 +1105,39 @@ static BOOL create_port_device( DRIVER_OBJECT *driver, int n, const char *unix_p + sprintfW( dos_name, dos_name_format, n ); + ++ /* check for override */ ++ size = sizeof(reg_value); ++ if (RegQueryValueExW( wine_ports_key, dos_name, NULL, &type, (BYTE *)reg_value, &size ) == 0 && type == REG_SZ) ++ { ++ if (!reg_value[0] || !WideCharToMultiByte( CP_UNIXCP, WC_ERR_INVALID_CHARS, reg_value, size/sizeof(WCHAR), ++ override_path, sizeof(override_path), NULL, NULL)) ++ return FALSE; ++ unix_path = override_path; ++ } ++ if (!unix_path) ++ return FALSE; ++ +#ifdef linux + /* Serial port device files almost always exist on Linux even if the corresponding serial + * ports don't exist. Do a basic functionality check before advertising a serial port. */ @@ -49,8 +61,8 @@ index ee2599984a6..994e3676176 100644 +#endif + /* create DOS device */ - sprintf( p, "%u", n ); + unlink( dosdevices_path ); if (symlink( unix_path, dosdevices_path ) != 0) -- -2.12.2 +2.23.0 diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 2bb54079..91607fbb 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -52,7 +52,7 @@ usage() # Get the upstream commit sha upstream_commit() { - echo "ae8f605ede0054c8e380e809c196f2621d9cf423" + echo "b7656110e6e83866a33418bc6b48984632010e00" } # Show version information