You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-09-12 18:50:20 -07:00
Rebase against 1d9a3f6d12322891a2af4aadd66a92ea66479233.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
From 1c46cc796a20b263f708aebf5428e59408fea200 Mon Sep 17 00:00:00 2001
|
||||
From 4595b49c9c878e8a86fcd22dc82a9f5cfadfc7a8 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Costa <titan.costa@gmail.com>
|
||||
Date: Fri, 30 Mar 2018 08:22:02 +0000
|
||||
Subject: [PATCH] d3dx9_36: add DXTn support
|
||||
@@ -17,8 +17,8 @@ Subject: [PATCH] d3dx9_36: add DXTn support
|
||||
dlls/d3dx9_34/Makefile.in | 2 +-
|
||||
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/surface.c | 102 +++++++++++++++++++++++++++++++---
|
||||
dlls/d3dx9_36/tests/surface.c | 8 +--
|
||||
dlls/d3dx9_37/Makefile.in | 2 +-
|
||||
dlls/d3dx9_38/Makefile.in | 2 +-
|
||||
dlls/d3dx9_39/Makefile.in | 2 +-
|
||||
@@ -29,7 +29,7 @@ Subject: [PATCH] d3dx9_36: add DXTn support
|
||||
22 files changed, 118 insertions(+), 32 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3dx9_24/Makefile.in b/dlls/d3dx9_24/Makefile.in
|
||||
index 02e64d3..0484639 100644
|
||||
index 99db5f355..0c3fb8a90 100644
|
||||
--- a/dlls/d3dx9_24/Makefile.in
|
||||
+++ b/dlls/d3dx9_24/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
@@ -41,7 +41,7 @@ index 02e64d3..0484639 100644
|
||||
DELAYIMPORTS = windowscodecs
|
||||
|
||||
diff --git a/dlls/d3dx9_25/Makefile.in b/dlls/d3dx9_25/Makefile.in
|
||||
index 57ed1da..3461967 100644
|
||||
index 9e54aba2c..4419b18b8 100644
|
||||
--- a/dlls/d3dx9_25/Makefile.in
|
||||
+++ b/dlls/d3dx9_25/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
@@ -53,7 +53,7 @@ index 57ed1da..3461967 100644
|
||||
DELAYIMPORTS = windowscodecs
|
||||
|
||||
diff --git a/dlls/d3dx9_26/Makefile.in b/dlls/d3dx9_26/Makefile.in
|
||||
index 04d9ba4..291daf3 100644
|
||||
index 104f7c19b..cfc9711ef 100644
|
||||
--- a/dlls/d3dx9_26/Makefile.in
|
||||
+++ b/dlls/d3dx9_26/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
@@ -65,7 +65,7 @@ index 04d9ba4..291daf3 100644
|
||||
DELAYIMPORTS = windowscodecs
|
||||
|
||||
diff --git a/dlls/d3dx9_27/Makefile.in b/dlls/d3dx9_27/Makefile.in
|
||||
index faec9b2..5a52b60 100644
|
||||
index db04c8310..d598c9bbf 100644
|
||||
--- a/dlls/d3dx9_27/Makefile.in
|
||||
+++ b/dlls/d3dx9_27/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
@@ -77,7 +77,7 @@ index faec9b2..5a52b60 100644
|
||||
DELAYIMPORTS = windowscodecs
|
||||
|
||||
diff --git a/dlls/d3dx9_28/Makefile.in b/dlls/d3dx9_28/Makefile.in
|
||||
index b8aad93..8eecbc0 100644
|
||||
index 8a2b9c690..8e9979092 100644
|
||||
--- a/dlls/d3dx9_28/Makefile.in
|
||||
+++ b/dlls/d3dx9_28/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
@@ -89,7 +89,7 @@ index b8aad93..8eecbc0 100644
|
||||
DELAYIMPORTS = windowscodecs
|
||||
|
||||
diff --git a/dlls/d3dx9_29/Makefile.in b/dlls/d3dx9_29/Makefile.in
|
||||
index 29c76c4..0299369 100644
|
||||
index 6e1f45c02..efe538fde 100644
|
||||
--- a/dlls/d3dx9_29/Makefile.in
|
||||
+++ b/dlls/d3dx9_29/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
@@ -101,7 +101,7 @@ index 29c76c4..0299369 100644
|
||||
DELAYIMPORTS = windowscodecs
|
||||
|
||||
diff --git a/dlls/d3dx9_30/Makefile.in b/dlls/d3dx9_30/Makefile.in
|
||||
index 810edc9..7bdc074 100644
|
||||
index 092a6b154..4a1ee6304 100644
|
||||
--- a/dlls/d3dx9_30/Makefile.in
|
||||
+++ b/dlls/d3dx9_30/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
@@ -113,7 +113,7 @@ index 810edc9..7bdc074 100644
|
||||
DELAYIMPORTS = windowscodecs
|
||||
|
||||
diff --git a/dlls/d3dx9_31/Makefile.in b/dlls/d3dx9_31/Makefile.in
|
||||
index fce2b53..0ef9c91 100644
|
||||
index 48c67e6e0..dcbb7a01b 100644
|
||||
--- a/dlls/d3dx9_31/Makefile.in
|
||||
+++ b/dlls/d3dx9_31/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
@@ -125,7 +125,7 @@ index fce2b53..0ef9c91 100644
|
||||
DELAYIMPORTS = windowscodecs
|
||||
|
||||
diff --git a/dlls/d3dx9_32/Makefile.in b/dlls/d3dx9_32/Makefile.in
|
||||
index ad53b26..25e2a1c 100644
|
||||
index d51d6a0db..fb89ea7c2 100644
|
||||
--- a/dlls/d3dx9_32/Makefile.in
|
||||
+++ b/dlls/d3dx9_32/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
@@ -137,7 +137,7 @@ index ad53b26..25e2a1c 100644
|
||||
DELAYIMPORTS = windowscodecs
|
||||
|
||||
diff --git a/dlls/d3dx9_33/Makefile.in b/dlls/d3dx9_33/Makefile.in
|
||||
index 318ddce..a6ec6db 100644
|
||||
index 52cdde13a..487255e43 100644
|
||||
--- a/dlls/d3dx9_33/Makefile.in
|
||||
+++ b/dlls/d3dx9_33/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
@@ -149,7 +149,7 @@ index 318ddce..a6ec6db 100644
|
||||
DELAYIMPORTS = windowscodecs
|
||||
|
||||
diff --git a/dlls/d3dx9_34/Makefile.in b/dlls/d3dx9_34/Makefile.in
|
||||
index 451a371..ff79b58 100644
|
||||
index 37f431228..9b0b500f7 100644
|
||||
--- a/dlls/d3dx9_34/Makefile.in
|
||||
+++ b/dlls/d3dx9_34/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
@@ -161,7 +161,7 @@ index 451a371..ff79b58 100644
|
||||
DELAYIMPORTS = windowscodecs
|
||||
|
||||
diff --git a/dlls/d3dx9_35/Makefile.in b/dlls/d3dx9_35/Makefile.in
|
||||
index 978d0b0..aa8ea65 100644
|
||||
index 4441b5f6e..ac4291359 100644
|
||||
--- a/dlls/d3dx9_35/Makefile.in
|
||||
+++ b/dlls/d3dx9_35/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
@@ -173,7 +173,7 @@ index 978d0b0..aa8ea65 100644
|
||||
DELAYIMPORTS = windowscodecs
|
||||
|
||||
diff --git a/dlls/d3dx9_36/Makefile.in b/dlls/d3dx9_36/Makefile.in
|
||||
index 847edec..1427571 100644
|
||||
index 5e76ab7f5..c95dc0707 100644
|
||||
--- a/dlls/d3dx9_36/Makefile.in
|
||||
+++ b/dlls/d3dx9_36/Makefile.in
|
||||
@@ -1,7 +1,7 @@
|
||||
@@ -184,12 +184,12 @@ index 847edec..1427571 100644
|
||||
+IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 wined3d
|
||||
DELAYIMPORTS = windowscodecs
|
||||
|
||||
C_SRCS = \
|
||||
EXTRADLLFLAGS = -mno-cygwin
|
||||
diff --git a/dlls/d3dx9_36/surface.c b/dlls/d3dx9_36/surface.c
|
||||
index d236feb..3c308d3 100644
|
||||
index 57d9818cd..f05bad5ab 100644
|
||||
--- a/dlls/d3dx9_36/surface.c
|
||||
+++ b/dlls/d3dx9_36/surface.c
|
||||
@@ -27,6 +27,8 @@
|
||||
@@ -25,6 +25,8 @@
|
||||
#include "ole2.h"
|
||||
#include "wincodec.h"
|
||||
|
||||
@@ -198,12 +198,12 @@ index d236feb..3c308d3 100644
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(d3dx);
|
||||
|
||||
HRESULT WINAPI WICCreateImagingFactory_Proxy(UINT, IWICImagingFactory**);
|
||||
@@ -1876,6 +1878,24 @@ void point_filter_argb_pixels(const BYTE *src, UINT src_row_pitch, UINT src_slic
|
||||
@@ -1772,6 +1774,24 @@ void point_filter_argb_pixels(const BYTE *src, UINT src_row_pitch, UINT src_slic
|
||||
}
|
||||
}
|
||||
|
||||
+typedef BOOL (*dxtn_conversion_func)(const BYTE *src, BYTE *dst, DWORD pitch_in, DWORD pitch_out,
|
||||
+ enum wined3d_format_id format, unsigned int w, unsigned int h);
|
||||
+typedef BOOL (__cdecl *dxtn_conversion_func)(const BYTE *src, BYTE *dst, DWORD pitch_in, DWORD pitch_out,
|
||||
+ enum wined3d_format_id format, unsigned int w, unsigned int h);
|
||||
+
|
||||
+static dxtn_conversion_func get_dxtn_conversion_func(D3DFORMAT format, BOOL encode)
|
||||
+{
|
||||
@@ -223,7 +223,7 @@ index d236feb..3c308d3 100644
|
||||
/************************************************************
|
||||
* D3DXLoadSurfaceFromMemory
|
||||
*
|
||||
@@ -1915,10 +1935,12 @@ HRESULT WINAPI D3DXLoadSurfaceFromMemory(IDirect3DSurface9 *dst_surface,
|
||||
@@ -1811,10 +1831,12 @@ HRESULT WINAPI D3DXLoadSurfaceFromMemory(IDirect3DSurface9 *dst_surface,
|
||||
{
|
||||
const struct pixel_format_desc *srcformatdesc, *destformatdesc;
|
||||
IDirect3DSurface9 *surface;
|
||||
@@ -237,7 +237,7 @@ index d236feb..3c308d3 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,
|
||||
@@ -1999,18 +2021,65 @@ HRESULT WINAPI D3DXLoadSurfaceFromMemory(IDirect3DSurface9 *dst_surface,
|
||||
@@ -1895,18 +1917,65 @@ HRESULT WINAPI D3DXLoadSurfaceFromMemory(IDirect3DSurface9 *dst_surface,
|
||||
}
|
||||
else /* Stretching or format conversion. */
|
||||
{
|
||||
@@ -307,7 +307,7 @@ index d236feb..3c308d3 100644
|
||||
}
|
||||
else /* if ((filter & 0xf) == D3DX_FILTER_POINT) */
|
||||
{
|
||||
@@ -2019,12 +2088,29 @@ HRESULT WINAPI D3DXLoadSurfaceFromMemory(IDirect3DSurface9 *dst_surface,
|
||||
@@ -1915,12 +1984,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 d236feb..3c308d3 100644
|
||||
|
||||
/************************************************************
|
||||
diff --git a/dlls/d3dx9_36/tests/surface.c b/dlls/d3dx9_36/tests/surface.c
|
||||
index 2c83dc2..95b64a0 100644
|
||||
index 56b79d80c..8614cec4c 100644
|
||||
--- a/dlls/d3dx9_36/tests/surface.c
|
||||
+++ b/dlls/d3dx9_36/tests/surface.c
|
||||
@@ -1224,7 +1224,7 @@ static void test_D3DXLoadSurface(IDirect3DDevice9 *device)
|
||||
@@ -1225,7 +1225,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,7 +353,7 @@ index 2c83dc2..95b64a0 100644
|
||||
check_release((IUnknown*)newsurf, 1);
|
||||
check_release((IUnknown*)tex, 0);
|
||||
}
|
||||
@@ -1250,7 +1250,7 @@ static void test_D3DXLoadSurface(IDirect3DDevice9 *device)
|
||||
@@ -1251,7 +1251,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);
|
||||
@@ -362,7 +362,7 @@ index 2c83dc2..95b64a0 100644
|
||||
check_release((IUnknown*)newsurf, 1);
|
||||
check_release((IUnknown*)tex, 0);
|
||||
}
|
||||
@@ -1263,10 +1263,10 @@ static void test_D3DXLoadSurface(IDirect3DDevice9 *device)
|
||||
@@ -1264,10 +1264,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 +376,7 @@ index 2c83dc2..95b64a0 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 a05068c..e5b29d3 100644
|
||||
index ea0a04807..a710cef03 100644
|
||||
--- a/dlls/d3dx9_37/Makefile.in
|
||||
+++ b/dlls/d3dx9_37/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
@@ -388,7 +388,7 @@ index a05068c..e5b29d3 100644
|
||||
DELAYIMPORTS = windowscodecs
|
||||
|
||||
diff --git a/dlls/d3dx9_38/Makefile.in b/dlls/d3dx9_38/Makefile.in
|
||||
index b092e62..0a37204 100644
|
||||
index af62f823d..543a482af 100644
|
||||
--- a/dlls/d3dx9_38/Makefile.in
|
||||
+++ b/dlls/d3dx9_38/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
@@ -400,7 +400,7 @@ index b092e62..0a37204 100644
|
||||
DELAYIMPORTS = windowscodecs
|
||||
|
||||
diff --git a/dlls/d3dx9_39/Makefile.in b/dlls/d3dx9_39/Makefile.in
|
||||
index 4d17120..d0e2cc9 100644
|
||||
index ab71712d4..cacb0c00d 100644
|
||||
--- a/dlls/d3dx9_39/Makefile.in
|
||||
+++ b/dlls/d3dx9_39/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
@@ -412,7 +412,7 @@ index 4d17120..d0e2cc9 100644
|
||||
DELAYIMPORTS = windowscodecs
|
||||
|
||||
diff --git a/dlls/d3dx9_40/Makefile.in b/dlls/d3dx9_40/Makefile.in
|
||||
index 59f6f3d..0a0d36b 100644
|
||||
index 76428d2fd..a58a99ef2 100644
|
||||
--- a/dlls/d3dx9_40/Makefile.in
|
||||
+++ b/dlls/d3dx9_40/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
@@ -424,7 +424,7 @@ index 59f6f3d..0a0d36b 100644
|
||||
DELAYIMPORTS = windowscodecs
|
||||
|
||||
diff --git a/dlls/d3dx9_41/Makefile.in b/dlls/d3dx9_41/Makefile.in
|
||||
index f18443a..f477a20 100644
|
||||
index d3647f895..93fb6b508 100644
|
||||
--- a/dlls/d3dx9_41/Makefile.in
|
||||
+++ b/dlls/d3dx9_41/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
@@ -436,7 +436,7 @@ index f18443a..f477a20 100644
|
||||
DELAYIMPORTS = windowscodecs
|
||||
|
||||
diff --git a/dlls/d3dx9_42/Makefile.in b/dlls/d3dx9_42/Makefile.in
|
||||
index cb142b7..4d93a84 100644
|
||||
index 88bd746da..197d0d45b 100644
|
||||
--- a/dlls/d3dx9_42/Makefile.in
|
||||
+++ b/dlls/d3dx9_42/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
@@ -448,7 +448,7 @@ index cb142b7..4d93a84 100644
|
||||
DELAYIMPORTS = windowscodecs
|
||||
|
||||
diff --git a/dlls/d3dx9_43/Makefile.in b/dlls/d3dx9_43/Makefile.in
|
||||
index 3e6111a..5812d03 100644
|
||||
index 2f6b8634a..17895954a 100644
|
||||
--- a/dlls/d3dx9_43/Makefile.in
|
||||
+++ b/dlls/d3dx9_43/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
@@ -460,5 +460,5 @@ index 3e6111a..5812d03 100644
|
||||
DELAYIMPORTS = windowscodecs
|
||||
|
||||
--
|
||||
1.9.1
|
||||
2.21.0
|
||||
|
||||
|
@@ -3,3 +3,7 @@ Fixes: [33768] Fix texture corruption in CSI: Fatal Conspiracy
|
||||
Fixes: [37391] Exception during start of fr-043 caused by missing DXTn support
|
||||
Fixes: [34692] Fix wrong colors in Wolfenstein (2009)
|
||||
Fixes: [24983] Fix crash in Space Rangers2 caused by missing DXTn support
|
||||
# 9fb5745a7997bbfe033779650f1193d85369cef2 broke this, in a way that's not
|
||||
# trivial to fix. Guess we'll wait to see what Alexandre has in mind for the
|
||||
# other D3D DLLs.
|
||||
Disabled: true
|
||||
|
Reference in New Issue
Block a user