Rebase against 2dd0fb880c005cd5660928d1646a117407cec238.

This commit is contained in:
Sebastian Lackner
2017-01-31 11:19:50 +01:00
parent 8f474115cd
commit 72479040c5
10 changed files with 96 additions and 270 deletions

View File

@@ -1,4 +1,4 @@
From 499d0a3ccd24ffb60e5fe58dd054b71de1f3121f Mon Sep 17 00:00:00 2001
From 33854851913e9046eb6ea4cd765a2f0026729f07 Mon Sep 17 00:00:00 2001
From: Christian Costa <titan.costa@gmail.com>
Date: Sat, 1 Nov 2014 13:08:05 +0100
Subject: d3dx9_36: Add dxtn support.
@@ -29,7 +29,7 @@ Subject: d3dx9_36: Add dxtn support.
22 files changed, 120 insertions(+), 31 deletions(-)
diff --git a/dlls/d3dx9_24/Makefile.in b/dlls/d3dx9_24/Makefile.in
index 7464bd1..bca7d82 100644
index 7464bd1f18f..bca7d826db0 100644
--- a/dlls/d3dx9_24/Makefile.in
+++ b/dlls/d3dx9_24/Makefile.in
@@ -1,5 +1,5 @@
@@ -40,7 +40,7 @@ index 7464bd1..bca7d82 100644
PARENTSRC = ../d3dx9_36
diff --git a/dlls/d3dx9_25/Makefile.in b/dlls/d3dx9_25/Makefile.in
index 1531e66..5d847a2 100644
index 1531e66c1e6..5d847a2828b 100644
--- a/dlls/d3dx9_25/Makefile.in
+++ b/dlls/d3dx9_25/Makefile.in
@@ -1,5 +1,5 @@
@@ -51,7 +51,7 @@ index 1531e66..5d847a2 100644
PARENTSRC = ../d3dx9_36
diff --git a/dlls/d3dx9_26/Makefile.in b/dlls/d3dx9_26/Makefile.in
index 2a58c58..cf0c150 100644
index 2a58c58b8a1..cf0c1509693 100644
--- a/dlls/d3dx9_26/Makefile.in
+++ b/dlls/d3dx9_26/Makefile.in
@@ -1,5 +1,5 @@
@@ -62,7 +62,7 @@ index 2a58c58..cf0c150 100644
PARENTSRC = ../d3dx9_36
diff --git a/dlls/d3dx9_27/Makefile.in b/dlls/d3dx9_27/Makefile.in
index 9ba1e2a..7cc647c 100644
index 9ba1e2ac5bd..7cc647c1647 100644
--- a/dlls/d3dx9_27/Makefile.in
+++ b/dlls/d3dx9_27/Makefile.in
@@ -1,5 +1,5 @@
@@ -73,7 +73,7 @@ index 9ba1e2a..7cc647c 100644
PARENTSRC = ../d3dx9_36
diff --git a/dlls/d3dx9_28/Makefile.in b/dlls/d3dx9_28/Makefile.in
index 15dec71..bbf4140 100644
index 15dec71f2d7..bbf4140e723 100644
--- a/dlls/d3dx9_28/Makefile.in
+++ b/dlls/d3dx9_28/Makefile.in
@@ -1,5 +1,5 @@
@@ -84,7 +84,7 @@ index 15dec71..bbf4140 100644
PARENTSRC = ../d3dx9_36
diff --git a/dlls/d3dx9_29/Makefile.in b/dlls/d3dx9_29/Makefile.in
index 5a5a8fc..1aa1663 100644
index 5a5a8fcad97..1aa1663ea06 100644
--- a/dlls/d3dx9_29/Makefile.in
+++ b/dlls/d3dx9_29/Makefile.in
@@ -1,5 +1,5 @@
@@ -95,7 +95,7 @@ index 5a5a8fc..1aa1663 100644
PARENTSRC = ../d3dx9_36
diff --git a/dlls/d3dx9_30/Makefile.in b/dlls/d3dx9_30/Makefile.in
index bafcdb4..df8f87b 100644
index bafcdb49312..df8f87bfedf 100644
--- a/dlls/d3dx9_30/Makefile.in
+++ b/dlls/d3dx9_30/Makefile.in
@@ -1,5 +1,5 @@
@@ -106,7 +106,7 @@ index bafcdb4..df8f87b 100644
PARENTSRC = ../d3dx9_36
diff --git a/dlls/d3dx9_31/Makefile.in b/dlls/d3dx9_31/Makefile.in
index f5df4d8..6ea8d15 100644
index f5df4d88ae0..6ea8d15b411 100644
--- a/dlls/d3dx9_31/Makefile.in
+++ b/dlls/d3dx9_31/Makefile.in
@@ -1,5 +1,5 @@
@@ -117,7 +117,7 @@ index f5df4d8..6ea8d15 100644
PARENTSRC = ../d3dx9_36
diff --git a/dlls/d3dx9_32/Makefile.in b/dlls/d3dx9_32/Makefile.in
index cce9293..df0759f 100644
index cce9293063c..df0759fedfc 100644
--- a/dlls/d3dx9_32/Makefile.in
+++ b/dlls/d3dx9_32/Makefile.in
@@ -1,5 +1,5 @@
@@ -128,7 +128,7 @@ index cce9293..df0759f 100644
PARENTSRC = ../d3dx9_36
diff --git a/dlls/d3dx9_33/Makefile.in b/dlls/d3dx9_33/Makefile.in
index c9b6587..ecf1b15 100644
index c9b6587e77b..ecf1b1598c9 100644
--- a/dlls/d3dx9_33/Makefile.in
+++ b/dlls/d3dx9_33/Makefile.in
@@ -1,5 +1,5 @@
@@ -139,7 +139,7 @@ index c9b6587..ecf1b15 100644
PARENTSRC = ../d3dx9_36
diff --git a/dlls/d3dx9_34/Makefile.in b/dlls/d3dx9_34/Makefile.in
index 822f621..2dcd721 100644
index 822f621008d..2dcd721c0a9 100644
--- a/dlls/d3dx9_34/Makefile.in
+++ b/dlls/d3dx9_34/Makefile.in
@@ -1,5 +1,5 @@
@@ -150,7 +150,7 @@ index 822f621..2dcd721 100644
PARENTSRC = ../d3dx9_36
diff --git a/dlls/d3dx9_35/Makefile.in b/dlls/d3dx9_35/Makefile.in
index 3c8df66..8c90f16 100644
index 3c8df661029..8c90f16b24f 100644
--- a/dlls/d3dx9_35/Makefile.in
+++ b/dlls/d3dx9_35/Makefile.in
@@ -1,5 +1,5 @@
@@ -161,7 +161,7 @@ index 3c8df66..8c90f16 100644
PARENTSRC = ../d3dx9_36
diff --git a/dlls/d3dx9_36/Makefile.in b/dlls/d3dx9_36/Makefile.in
index 24ce09d..6b78518 100644
index 24ce09daefa..6b78518dc71 100644
--- a/dlls/d3dx9_36/Makefile.in
+++ b/dlls/d3dx9_36/Makefile.in
@@ -1,6 +1,6 @@
@@ -173,7 +173,7 @@ index 24ce09d..6b78518 100644
C_SRCS = \
diff --git a/dlls/d3dx9_36/surface.c b/dlls/d3dx9_36/surface.c
index 1bfe75a..4099cd5 100644
index fc747799d6d..f851e74ee76 100644
--- a/dlls/d3dx9_36/surface.c
+++ b/dlls/d3dx9_36/surface.c
@@ -27,6 +27,8 @@
@@ -225,8 +225,8 @@ index 1bfe75a..4099cd5 100644
}
else /* Stretching or format conversion. */
{
- if (((srcformatdesc->type != FORMAT_ARGB) && (srcformatdesc->type != FORMAT_INDEX)) ||
- (destformatdesc->type != FORMAT_ARGB))
- if (!is_conversion_from_supported(srcformatdesc)
- || !is_conversion_to_supported(destformatdesc))
+ dxtn_conversion_func pre_convert, post_convert;
+ void *tmp_src_memory = NULL, *tmp_dst_memory = NULL;
+ UINT tmp_src_pitch, tmp_dst_pitch;
@@ -234,10 +234,10 @@ index 1bfe75a..4099cd5 100644
+ pre_convert = get_dxtn_conversion_func(srcformatdesc->format, FALSE);
+ post_convert = get_dxtn_conversion_func(destformatdesc->format, TRUE);
+
+ if ((!pre_convert && (srcformatdesc->type != FORMAT_ARGB) && (srcformatdesc->type != FORMAT_INDEX)) ||
+ (!post_convert && (destformatdesc->type != FORMAT_ARGB)))
+ if ((!pre_convert && !is_conversion_from_supported(srcformatdesc)) ||
+ (!post_convert && !is_conversion_to_supported(destformatdesc)))
{
FIXME("Format conversion missing %#x -> %#x\n", src_format, surfdesc.Format);
FIXME("Unsupported format conversion %#x -> %#x.\n", src_format, surfdesc.Format);
return E_NOTIMPL;
@@ -1847,10 +1878,52 @@ HRESULT WINAPI D3DXLoadSurfaceFromMemory(IDirect3DSurface9 *dst_surface,
if (FAILED(IDirect3DSurface9_LockRect(dst_surface, &lockrect, dst_rect, 0)))
@@ -329,7 +329,7 @@ index 1bfe75a..4099cd5 100644
/************************************************************
diff --git a/dlls/d3dx9_36/tests/surface.c b/dlls/d3dx9_36/tests/surface.c
index f2855e8..2be48df 100644
index f2855e8ddb8..2be48dfddab 100644
--- a/dlls/d3dx9_36/tests/surface.c
+++ b/dlls/d3dx9_36/tests/surface.c
@@ -1174,7 +1174,7 @@ static void test_D3DXLoadSurface(IDirect3DDevice9 *device)
@@ -364,7 +364,7 @@ index f2855e8..2be48df 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 672878f..9eecd32 100644
index 672878ff7e4..9eecd32899d 100644
--- a/dlls/d3dx9_37/Makefile.in
+++ b/dlls/d3dx9_37/Makefile.in
@@ -1,5 +1,5 @@
@@ -375,7 +375,7 @@ index 672878f..9eecd32 100644
PARENTSRC = ../d3dx9_36
diff --git a/dlls/d3dx9_38/Makefile.in b/dlls/d3dx9_38/Makefile.in
index 0b537c6..6bb7bac 100644
index 0b537c66b68..6bb7bac0513 100644
--- a/dlls/d3dx9_38/Makefile.in
+++ b/dlls/d3dx9_38/Makefile.in
@@ -1,5 +1,5 @@
@@ -386,7 +386,7 @@ index 0b537c6..6bb7bac 100644
PARENTSRC = ../d3dx9_36
diff --git a/dlls/d3dx9_39/Makefile.in b/dlls/d3dx9_39/Makefile.in
index 58d88f7..5d03e18 100644
index 58d88f78abc..5d03e18feb3 100644
--- a/dlls/d3dx9_39/Makefile.in
+++ b/dlls/d3dx9_39/Makefile.in
@@ -1,5 +1,5 @@
@@ -397,7 +397,7 @@ index 58d88f7..5d03e18 100644
PARENTSRC = ../d3dx9_36
diff --git a/dlls/d3dx9_40/Makefile.in b/dlls/d3dx9_40/Makefile.in
index a4417b5..8982d4e 100644
index a4417b5aa13..8982d4ec5e4 100644
--- a/dlls/d3dx9_40/Makefile.in
+++ b/dlls/d3dx9_40/Makefile.in
@@ -1,5 +1,5 @@
@@ -408,7 +408,7 @@ index a4417b5..8982d4e 100644
PARENTSRC = ../d3dx9_36
diff --git a/dlls/d3dx9_41/Makefile.in b/dlls/d3dx9_41/Makefile.in
index 0463175..e9f3d65 100644
index 0463175210a..e9f3d657e6c 100644
--- a/dlls/d3dx9_41/Makefile.in
+++ b/dlls/d3dx9_41/Makefile.in
@@ -1,5 +1,5 @@
@@ -419,7 +419,7 @@ index 0463175..e9f3d65 100644
PARENTSRC = ../d3dx9_36
diff --git a/dlls/d3dx9_42/Makefile.in b/dlls/d3dx9_42/Makefile.in
index 309324f..a55736d 100644
index 309324f4307..a55736d756f 100644
--- a/dlls/d3dx9_42/Makefile.in
+++ b/dlls/d3dx9_42/Makefile.in
@@ -1,5 +1,5 @@
@@ -430,7 +430,7 @@ index 309324f..a55736d 100644
PARENTSRC = ../d3dx9_36
diff --git a/dlls/d3dx9_43/Makefile.in b/dlls/d3dx9_43/Makefile.in
index 9c1a87d..c2e787c 100644
index 9c1a87da600..c2e787c5836 100644
--- a/dlls/d3dx9_43/Makefile.in
+++ b/dlls/d3dx9_43/Makefile.in
@@ -1,5 +1,5 @@
@@ -441,5 +441,5 @@ index 9c1a87d..c2e787c 100644
PARENTSRC = ../d3dx9_36
--
2.8.0
2.11.0