You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-04-13 14:42:51 -07:00
Compare commits
216 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
2827fd6727 | ||
|
c55fa81f35 | ||
|
46ac00b4a4 | ||
|
3aed8374fa | ||
|
8b016d206e | ||
|
2e55aa06c2 | ||
|
1f62a67dcc | ||
|
82924e9a17 | ||
|
b7b4fbcd32 | ||
|
83504ec21a | ||
|
0860bc1c5e | ||
|
8bfcd6ad7d | ||
|
d2cf83298d | ||
|
6e8855e1a0 | ||
|
a7511fa5da | ||
|
b3e9ea1058 | ||
|
c4da0a8993 | ||
|
53515d7e75 | ||
|
2736fc8378 | ||
|
594626def2 | ||
|
920fd825cf | ||
|
87c5a4c7a0 | ||
|
b829697078 | ||
|
102992bb70 | ||
|
0d02a7aa99 | ||
|
ea03a5cda2 | ||
|
7f7f0fc98d | ||
|
9763d6e295 | ||
|
5361c0277d | ||
|
05319e0efd | ||
|
cfd8b7de65 | ||
|
cdcdde3d46 | ||
|
520ac85b6f | ||
|
142c3eb080 | ||
|
10a0e0b89e | ||
|
fac630367d | ||
|
da76250fad | ||
|
9d9c5c700a | ||
|
0b96046f15 | ||
|
cc31308c32 | ||
|
559b29238c | ||
|
e2d51dfc4b | ||
|
d3de5eadd9 | ||
|
4fa70d510c | ||
|
505a83ad9e | ||
|
a1e634bca9 | ||
|
13a418812a | ||
|
965789d221 | ||
|
2a2c8b5228 | ||
|
c210ef9f59 | ||
|
dab36ebe1e | ||
|
1ca1b3b602 | ||
|
2b16926188 | ||
|
bbbe9cbbc7 | ||
|
1142823d53 | ||
|
390b1f4127 | ||
|
1942fb8bc1 | ||
|
52f252eeb6 | ||
|
8493f61af5 | ||
|
6b7e43830c | ||
|
4482bd3493 | ||
|
b285e35fca | ||
|
a88d536fba | ||
|
e5cf862a14 | ||
|
df9ad11eef | ||
|
94caef272e | ||
|
d745d08cd7 | ||
|
a6448966cf | ||
|
01fbf6d356 | ||
|
e57244a59e | ||
|
fe6a869e0b | ||
|
a45cfa1ee2 | ||
|
abbfbb8e15 | ||
|
6882ba5e7b | ||
|
b97718a0a9 | ||
|
1fe536ee75 | ||
|
2d8c5f88c3 | ||
|
ef85449de2 | ||
|
d94c192f10 | ||
|
fcff74d6c6 | ||
|
22ba0ef2a3 | ||
|
95679a2f40 | ||
|
a7a75d0d06 | ||
|
e930be3974 | ||
|
d7080ec990 | ||
|
22d9eec489 | ||
|
eb5a19f4fd | ||
|
db6b479557 | ||
|
f14d68c258 | ||
|
117d2b2107 | ||
|
8273be2218 | ||
|
adda594159 | ||
|
710e29cc68 | ||
|
6c167535e3 | ||
|
e9b0c33d65 | ||
|
d44a516142 | ||
|
453c5cda07 | ||
|
d3d87f1a2c | ||
|
42e2a72d37 | ||
|
d7bbcc7ad9 | ||
|
4625289771 | ||
|
cda4a1e125 | ||
|
1039d808e2 | ||
|
6173bd8b0d | ||
|
ba6e2398d7 | ||
|
2dcacd0dbf | ||
|
1039396c8e | ||
|
f8cc3baab3 | ||
|
7665942477 | ||
|
0cd181d0ce | ||
|
a580edefe1 | ||
|
fe6cfefe64 | ||
|
6900845545 | ||
|
3e3ebf5cfc | ||
|
f48794a9ce | ||
|
27397d1764 | ||
|
ca7fc8fb51 | ||
|
cc0df4cd1b | ||
|
8791ceb20d | ||
|
09808df495 | ||
|
9c995c8d8e | ||
|
b72829659d | ||
|
88ffa2bda8 | ||
|
2524bc48fe | ||
|
00ec1171cc | ||
|
277ed0c6fb | ||
|
0c2c469c7b | ||
|
7f36a96808 | ||
|
566a2bcdfd | ||
|
4eb322dc41 | ||
|
182d6c76e3 | ||
|
3e931ce80f | ||
|
716e192182 | ||
|
fba1e773c7 | ||
|
26a1ee0ee9 | ||
|
9d65092519 | ||
|
49dcc78363 | ||
|
64774ec3e5 | ||
|
4211bac798 | ||
|
aaa21bda9c | ||
|
9d5115a9ee | ||
|
9cb0330037 | ||
|
abe75a7741 | ||
|
be92c5d768 | ||
|
6d45ccd523 | ||
|
6dbab0f2e5 | ||
|
e0766792bd | ||
|
df3886edb6 | ||
|
7bcf1f6358 | ||
|
cd4d265f07 | ||
|
cf29ed121d | ||
|
09634de79c | ||
|
68cc39d3ba | ||
|
3a47cfd8a5 | ||
|
fab4cd0932 | ||
|
2ac5cdbf37 | ||
|
e3a3dcd0ce | ||
|
aa36637563 | ||
|
70958b46d0 | ||
|
575f6f67cc | ||
|
9929ac3038 | ||
|
cd22a0fb15 | ||
|
f7b671178c | ||
|
dc43a031be | ||
|
7b0d44f887 | ||
|
0611b4d10c | ||
|
b9421d8376 | ||
|
a11194038c | ||
|
d8293544f4 | ||
|
bf7a234e0c | ||
|
1f76f7faec | ||
|
4d98c8839b | ||
|
53e545fe79 | ||
|
996b5b4cea | ||
|
c1b4af92f7 | ||
|
c542e21406 | ||
|
95f5c850de | ||
|
daff95e4a0 | ||
|
c920a7b45f | ||
|
a737381889 | ||
|
3367490837 | ||
|
b75b4fc0fa | ||
|
c1951fe5d2 | ||
|
7a0d4fb5b3 | ||
|
c26b832223 | ||
|
0159beff44 | ||
|
87f3369577 | ||
|
86a67397f7 | ||
|
f2f8b949b1 | ||
|
dde734350d | ||
|
e113a09752 | ||
|
0e512f9c79 | ||
|
e222e26baa | ||
|
1e9c7533cb | ||
|
89aa62efe0 | ||
|
6d4f5803c8 | ||
|
33879905f2 | ||
|
d6ac81a83b | ||
|
c7feffdb95 | ||
|
fc3f586bd4 | ||
|
5fe0566802 | ||
|
484054b204 | ||
|
e9f69afcab | ||
|
8a7297ab71 | ||
|
8937409359 | ||
|
0a970828aa | ||
|
dc27f103e5 | ||
|
d1bde95011 | ||
|
90d6184697 | ||
|
d10f51a658 | ||
|
bad4d30c2c | ||
|
3a1f2a42bb | ||
|
3aca66f24e | ||
|
32c64aa429 | ||
|
ffc4a7a5a0 | ||
|
13c3e61937 |
10
.github/workflows/macOS.yml
vendored
10
.github/workflows/macOS.yml
vendored
@@ -14,7 +14,6 @@ jobs:
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
brew update
|
||||
brew install --cask xquartz
|
||||
brew install bison \
|
||||
gphoto2 \
|
||||
@@ -34,12 +33,13 @@ jobs:
|
||||
mkdir $GITHUB_WORKSPACE/wine
|
||||
cd wine
|
||||
git init
|
||||
git fetch git://source.winehq.org/git/wine.git $($GITHUB_WORKSPACE/patches/patchinstall.sh --upstream-commit) --depth=1
|
||||
git checkout $($GITHUB_WORKSPACE/patches/patchinstall.sh --upstream-commit)
|
||||
git fetch git://source.winehq.org/git/wine.git $($GITHUB_WORKSPACE/staging/patchinstall.py --upstream-commit) --depth=1
|
||||
git checkout $($GITHUB_WORKSPACE/staging/patchinstall.py --upstream-commit)
|
||||
|
||||
- name: Run patchinstall.sh --all
|
||||
- name: Run patchinstall.py --all
|
||||
run: |
|
||||
$GITHUB_WORKSPACE/patches/patchinstall.sh DESTDIR=$GITHUB_WORKSPACE/wine --all
|
||||
cd wine
|
||||
$GITHUB_WORKSPACE/staging/patchinstall.py DESTDIR=. --all
|
||||
|
||||
- name: Configure wine64
|
||||
env:
|
||||
|
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,3 +1,2 @@
|
||||
staging/wine
|
||||
*.pyc
|
||||
.patchupdate.cache
|
||||
|
@@ -33,11 +33,11 @@ of information about that is collected in the
|
||||
[WineHQ Wiki](http://wiki.winehq.org/BuildingWine).
|
||||
|
||||
In order to apply all Wine Staging patches it is recommended to use the
|
||||
`patchinstall.sh` utility which takes care of applying all patches in the
|
||||
`patchinstall.py` utility which takes care of applying all patches in the
|
||||
correct order. For reference, the possible commandline arguments are:
|
||||
|
||||
```
|
||||
Usage: ./patchinstall.sh [DESTDIR=path] [--all] [-W patchset] [patchset ...]
|
||||
Usage: ./staging/patchinstall.py [DESTDIR=path] [-W patchset] [patchset ...]
|
||||
|
||||
Autogenerated script to apply all Wine Staging patches on your Wine
|
||||
source tree.
|
||||
@@ -55,17 +55,14 @@ Configuration:
|
||||
|
||||
Backends:
|
||||
--backend=patch Use regular 'patch' utility to apply patches (default)
|
||||
--backend=eapply Use 'eapply' to apply patches (Gentoo only)
|
||||
--backend=epatch Use 'epatch' to apply patches (Gentoo only, deprecated)
|
||||
--backend=git-am Use 'git am' to apply patches
|
||||
--backend=git-apply Use 'git apply' to apply patches
|
||||
--backend=stg Import the patches using stacked git
|
||||
```
|
||||
|
||||
If you want to apply *all* patches with the `patch` utility, the commandline
|
||||
should look similar to this:
|
||||
```
|
||||
./patches/patchinstall.sh DESTDIR="/path/to/wine" --all
|
||||
./staging/patchinstall.py DESTDIR="/path/to/wine" --all
|
||||
```
|
||||
|
||||
Before you proceed with the compilation, please make sure that you installed all
|
||||
|
@@ -1,25 +0,0 @@
|
||||
From e35d665256d08ebccee30361867ba57f790d519f Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Tue, 22 Mar 2016 23:01:32 +0100
|
||||
Subject: rpcrt4: Avoid implicit cast of interface pointer.
|
||||
|
||||
---
|
||||
dlls/rpcrt4/cstub.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/rpcrt4/cstub.c b/dlls/rpcrt4/cstub.c
|
||||
index 838ed03..992c235 100644
|
||||
--- a/dlls/rpcrt4/cstub.c
|
||||
+++ b/dlls/rpcrt4/cstub.c
|
||||
@@ -59,7 +59,7 @@ typedef struct
|
||||
|
||||
static inline cstdstubbuffer_delegating_t *impl_from_delegating( IRpcStubBuffer *iface )
|
||||
{
|
||||
- return CONTAINING_RECORD(iface, cstdstubbuffer_delegating_t, stub_buffer);
|
||||
+ return CONTAINING_RECORD((void *)iface, cstdstubbuffer_delegating_t, stub_buffer);
|
||||
}
|
||||
|
||||
HRESULT CStdStubBuffer_Construct(REFIID riid,
|
||||
--
|
||||
2.7.1
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 7362e037e8160046fffcf062a663ea8e7ac45290 Mon Sep 17 00:00:00 2001
|
||||
From f9f5002e4ce6417dd196d53b50c51a3b224015d3 Mon Sep 17 00:00:00 2001
|
||||
From: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
Date: Tue, 12 Nov 2019 18:13:20 +0800
|
||||
Subject: [PATCH] comctl32: Bump version to 6.0.
|
||||
@@ -14,12 +14,12 @@ Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
3 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dlls/comctl32/comctl32.h b/dlls/comctl32/comctl32.h
|
||||
index 7dfdf089eb1..17ec7eeab40 100644
|
||||
index 51f4337add2..3fe8905abea 100644
|
||||
--- a/dlls/comctl32/comctl32.h
|
||||
+++ b/dlls/comctl32/comctl32.h
|
||||
@@ -194,7 +194,7 @@ BOOL Str_SetPtrAtoW (LPWSTR *lppDest, LPCSTR lpSrc) DECLSPEC_HIDDEN;
|
||||
BOOL Str_SetPtrWtoA (LPSTR *lppDest, LPCWSTR lpSrc) DECLSPEC_HIDDEN;
|
||||
BOOL imagelist_has_alpha(HIMAGELIST, UINT) DECLSPEC_HIDDEN;
|
||||
@@ -194,7 +194,7 @@ BOOL Str_SetPtrAtoW(LPWSTR *lppDest, LPCSTR lpSrc);
|
||||
BOOL Str_SetPtrWtoA(LPSTR *lppDest, LPCWSTR lpSrc);
|
||||
BOOL imagelist_has_alpha(HIMAGELIST, UINT);
|
||||
|
||||
-#define COMCTL32_VERSION_MINOR 81
|
||||
+#define COMCTL32_VERSION_MINOR 0
|
||||
@@ -53,5 +53,5 @@ index a54de13d8b2..e0b0e22d4dc 100644
|
||||
#define ICC_LISTVIEW_CLASSES 0x00000001 /* listview, header */
|
||||
#define ICC_TREEVIEW_CLASSES 0x00000002 /* treeview, tooltips */
|
||||
--
|
||||
2.35.1
|
||||
2.40.1
|
||||
|
||||
|
@@ -0,0 +1,69 @@
|
||||
From b30d3de1043cef20b57984035968fc78d5fcd2bb Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Sat, 22 Jul 2023 10:22:03 +1000
|
||||
Subject: [PATCH] d3d12core: Add D3D12GetInterface stub
|
||||
|
||||
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55135
|
||||
---
|
||||
dlls/d3d12core/Makefile.in | 3 +++
|
||||
dlls/d3d12core/d3d12core.spec | 2 +-
|
||||
dlls/d3d12core/d3d12core_main.c | 30 ++++++++++++++++++++++++++++++
|
||||
3 files changed, 34 insertions(+), 1 deletion(-)
|
||||
create mode 100644 dlls/d3d12core/d3d12core_main.c
|
||||
|
||||
diff --git a/dlls/d3d12core/Makefile.in b/dlls/d3d12core/Makefile.in
|
||||
index 8778b66138b..94d8fd4da00 100644
|
||||
--- a/dlls/d3d12core/Makefile.in
|
||||
+++ b/dlls/d3d12core/Makefile.in
|
||||
@@ -1 +1,4 @@
|
||||
MODULE = d3d12core.dll
|
||||
+
|
||||
+C_SRCS = \
|
||||
+ d3d12core_main.c
|
||||
diff --git a/dlls/d3d12core/d3d12core.spec b/dlls/d3d12core/d3d12core.spec
|
||||
index c9c73bd4ee4..3f3e0a0f2e1 100644
|
||||
--- a/dlls/d3d12core/d3d12core.spec
|
||||
+++ b/dlls/d3d12core/d3d12core.spec
|
||||
@@ -1,2 +1,2 @@
|
||||
-@ stub D3D12GetInterface
|
||||
+@ stdcall D3D12GetInterface(ptr ptr ptr)
|
||||
@ stub D3D12SDKVersion
|
||||
diff --git a/dlls/d3d12core/d3d12core_main.c b/dlls/d3d12core/d3d12core_main.c
|
||||
new file mode 100644
|
||||
index 00000000000..75a083ad276
|
||||
--- /dev/null
|
||||
+++ b/dlls/d3d12core/d3d12core_main.c
|
||||
@@ -0,0 +1,30 @@
|
||||
+/*
|
||||
+ * Copyright (c) 2023 Alistair Leslie-Hughes
|
||||
+ *
|
||||
+ * This library is free software; you can redistribute it and/or
|
||||
+ * modify it under the terms of the GNU Lesser General Public
|
||||
+ * License as published by the Free Software Foundation; either
|
||||
+ * version 2.1 of the License, or (at your option) any later version.
|
||||
+ *
|
||||
+ * This library is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
+ * Lesser General Public License for more details.
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU Lesser General Public
|
||||
+ * License along with this library; if not, write to the Free Software
|
||||
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
+ */
|
||||
+
|
||||
+#include <stdarg.h>
|
||||
+
|
||||
+#include "wine/debug.h"
|
||||
+
|
||||
+WINE_DEFAULT_DEBUG_CHANNEL(d3d12core);
|
||||
+
|
||||
+HRESULT WINAPI D3D12GetInterface(REFCLSID rclsid, REFIID riid, void **out)
|
||||
+{
|
||||
+ FIXME("%s, %s, %p\n", debugstr_guid(rclsid), debugstr_guid(riid), out);
|
||||
+
|
||||
+ return E_NOINTERFACE;
|
||||
+}
|
||||
--
|
||||
2.40.1
|
||||
|
1
patches/d3d12core-D3D12GetInterface/definition
Normal file
1
patches/d3d12core-D3D12GetInterface/definition
Normal file
@@ -0,0 +1 @@
|
||||
Fixes: [55135] d3d12core: Add D3D12GetInterface stub
|
@@ -1,7 +1,7 @@
|
||||
From ea3579b5b3d701647f5c7f16de658f1cd7fe876d Mon Sep 17 00:00:00 2001
|
||||
From 0fbce9fe4b69f27b7df82c6517c364aab57de63b Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Fri, 30 Jul 2021 15:57:29 +1000
|
||||
Subject: [PATCH] d3dx11_43: Implement D3DX11GetImageInfoFromMemory
|
||||
Subject: [PATCH 1/2] d3dx11_43: Implement D3DX11GetImageInfoFromMemory
|
||||
|
||||
Wine-bug: https://bugs.winehq.org/show_bug.cgi?id=50210
|
||||
|
||||
@@ -10,8 +10,8 @@ Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
dlls/d3dx11_42/Makefile.in | 1 +
|
||||
dlls/d3dx11_43/Makefile.in | 1 +
|
||||
dlls/d3dx11_43/main.c | 9 --
|
||||
dlls/d3dx11_43/texture.c | 176 +++++++++++++++++++++++++++++++++++++
|
||||
4 files changed, 178 insertions(+), 9 deletions(-)
|
||||
dlls/d3dx11_43/texture.c | 167 +++++++++++++++++++++++++++++++++++++
|
||||
4 files changed, 169 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3dx11_42/Makefile.in b/dlls/d3dx11_42/Makefile.in
|
||||
index 7fcce18a8e1..78ca5f707a7 100644
|
||||
@@ -55,10 +55,10 @@ index 5dad027864f..00c1db35e42 100644
|
||||
- return E_NOTIMPL;
|
||||
-}
|
||||
diff --git a/dlls/d3dx11_43/texture.c b/dlls/d3dx11_43/texture.c
|
||||
index 81ac8ee6db7..6881eec107d 100644
|
||||
index 81ac8ee6db7..bbf937cdab0 100644
|
||||
--- a/dlls/d3dx11_43/texture.c
|
||||
+++ b/dlls/d3dx11_43/texture.c
|
||||
@@ -15,14 +15,190 @@
|
||||
@@ -15,14 +15,181 @@
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
@@ -145,13 +145,11 @@ index 81ac8ee6db7..6881eec107d 100644
|
||||
+HRESULT WINAPI D3DX11GetImageInfoFromMemory(const void *src_data, SIZE_T src_data_size, ID3DX11ThreadPump *pump,
|
||||
+ D3DX11_IMAGE_INFO *img_info, HRESULT *hresult)
|
||||
+{
|
||||
+ IWICBitmapFrameDecode *frame = NULL;
|
||||
+ IWICImagingFactory *factory = NULL;
|
||||
+ IWICDdsDecoder *dds_decoder = NULL;
|
||||
+ IWICBitmapDecoder *decoder = NULL;
|
||||
+ WICDdsParameters dds_params;
|
||||
+ IWICStream *stream = NULL;
|
||||
+ unsigned int frame_count;
|
||||
+ GUID container_format;
|
||||
+ HRESULT hr;
|
||||
+
|
||||
@@ -186,16 +184,6 @@ index 81ac8ee6db7..6881eec107d 100644
|
||||
+ goto end;
|
||||
+ }
|
||||
+
|
||||
+ hr = IWICBitmapDecoder_GetFrameCount(decoder, &frame_count);
|
||||
+ if (FAILED(hr) || !frame_count)
|
||||
+ goto end;
|
||||
+ hr = IWICBitmapDecoder_GetFrame(decoder, 0, &frame);
|
||||
+ if (FAILED(hr))
|
||||
+ goto end;
|
||||
+ hr = IWICBitmapFrameDecode_GetSize(frame, &img_info->Width, &img_info->Height);
|
||||
+ if (FAILED(hr))
|
||||
+ goto end;
|
||||
+
|
||||
+ if (img_info->ImageFileFormat == D3DX11_IFF_DDS)
|
||||
+ {
|
||||
+ hr = IWICBitmapDecoder_QueryInterface(decoder, &IID_IWICDdsDecoder, (void **)&dds_decoder);
|
||||
@@ -204,6 +192,8 @@ index 81ac8ee6db7..6881eec107d 100644
|
||||
+ hr = IWICDdsDecoder_GetParameters(dds_decoder, &dds_params);
|
||||
+ if (FAILED(hr))
|
||||
+ goto end;
|
||||
+ img_info->Width = dds_params.Width;
|
||||
+ img_info->Height = dds_params.Height;
|
||||
+ img_info->ArraySize = dds_params.ArraySize;
|
||||
+ img_info->Depth = dds_params.Depth;
|
||||
+ img_info->MipLevels = dds_params.MipLevels;
|
||||
@@ -218,6 +208,9 @@ index 81ac8ee6db7..6881eec107d 100644
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ FIXME("Unsupported image format %d\n", img_info->ImageFileFormat);
|
||||
+ img_info->Width = 1;
|
||||
+ img_info->Height = 1;
|
||||
+ img_info->ArraySize = 1;
|
||||
+ img_info->Depth = 1;
|
||||
+ img_info->MipLevels = 1;
|
||||
@@ -229,8 +222,6 @@ index 81ac8ee6db7..6881eec107d 100644
|
||||
+end:
|
||||
+ if (dds_decoder)
|
||||
+ IWICDdsDecoder_Release(dds_decoder);
|
||||
+ if (frame)
|
||||
+ IWICBitmapFrameDecode_Release(frame);
|
||||
+ if (decoder)
|
||||
+ IWICBitmapDecoder_Release(decoder);
|
||||
+ if (stream)
|
||||
@@ -250,5 +241,5 @@ index 81ac8ee6db7..6881eec107d 100644
|
||||
SIZE_T data_size, D3DX11_IMAGE_LOAD_INFO *load_info, ID3DX11ThreadPump *pump,
|
||||
ID3D11ShaderResourceView **view, HRESULT *hresult)
|
||||
--
|
||||
2.34.1
|
||||
2.40.1
|
||||
|
||||
|
@@ -1,15 +1,15 @@
|
||||
From 5be34c9e347d4379179eeba742b25986152d4e4f Mon Sep 17 00:00:00 2001
|
||||
From 7285c2c90f43cd46d873a2ddb65e9c6c9d63f750 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Tue, 3 Aug 2021 11:13:18 +1000
|
||||
Subject: [PATCH] d3dx11_42: Implement D3DX11CreateTextureFromMemory
|
||||
Subject: [PATCH 2/2] d3dx11_42: Implement D3DX11CreateTextureFromMemory
|
||||
|
||||
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
---
|
||||
dlls/d3dx11_43/texture.c | 347 ++++++++++++++++++++++++++++++++++++++-
|
||||
1 file changed, 342 insertions(+), 5 deletions(-)
|
||||
dlls/d3dx11_43/texture.c | 359 ++++++++++++++++++++++++++++++++++++++-
|
||||
1 file changed, 354 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3dx11_43/texture.c b/dlls/d3dx11_43/texture.c
|
||||
index 6881eec107d..b91bd8d881a 100644
|
||||
index bbf937cdab0..10dedf30c0f 100644
|
||||
--- a/dlls/d3dx11_43/texture.c
|
||||
+++ b/dlls/d3dx11_43/texture.c
|
||||
@@ -22,6 +22,7 @@
|
||||
@@ -20,7 +20,7 @@ index 6881eec107d..b91bd8d881a 100644
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(d3dx);
|
||||
|
||||
@@ -43,6 +44,32 @@ file_formats[] =
|
||||
@@ -43,6 +44,33 @@ file_formats[] =
|
||||
{ &GUID_ContainerFormatWmp, D3DX11_IFF_WMP },
|
||||
};
|
||||
|
||||
@@ -42,6 +42,7 @@ index 6881eec107d..b91bd8d881a 100644
|
||||
+ { &GUID_WICPixelFormat32bppBGR, DXGI_FORMAT_B8G8R8X8_UNORM },
|
||||
+ { &GUID_WICPixelFormat32bppBGRA, DXGI_FORMAT_B8G8R8A8_UNORM },
|
||||
+ { &GUID_WICPixelFormat32bppRGBA, DXGI_FORMAT_R8G8B8A8_UNORM },
|
||||
+ { &GUID_WICPixelFormat32bppRGBA, DXGI_FORMAT_R8G8B8A8_UNORM_SRGB },
|
||||
+ { &GUID_WICPixelFormat32bppRGBA1010102, DXGI_FORMAT_R10G10B10A2_UNORM },
|
||||
+ { &GUID_WICPixelFormat32bppRGBA1010102XR, DXGI_FORMAT_R10G10B10_XR_BIAS_A2_UNORM },
|
||||
+ { &GUID_WICPixelFormat64bppRGBA, DXGI_FORMAT_R16G16B16A16_UNORM },
|
||||
@@ -53,7 +54,7 @@ index 6881eec107d..b91bd8d881a 100644
|
||||
static D3DX11_IMAGE_FILE_FORMAT wic_container_guid_to_file_format(GUID *container_format)
|
||||
{
|
||||
unsigned int i;
|
||||
@@ -95,6 +122,175 @@ static DXGI_FORMAT get_d3dx11_dds_format(DXGI_FORMAT format)
|
||||
@@ -95,6 +123,175 @@ static DXGI_FORMAT get_d3dx11_dds_format(DXGI_FORMAT format)
|
||||
return format;
|
||||
}
|
||||
|
||||
@@ -229,7 +230,7 @@ index 6881eec107d..b91bd8d881a 100644
|
||||
HRESULT WINAPI D3DX11GetImageInfoFromMemory(const void *src_data, SIZE_T src_data_size, ID3DX11ThreadPump *pump,
|
||||
D3DX11_IMAGE_INFO *img_info, HRESULT *hresult)
|
||||
{
|
||||
@@ -229,14 +425,155 @@ HRESULT WINAPI D3DX11CreateTextureFromFileW(ID3D11Device *device, const WCHAR *f
|
||||
@@ -220,14 +417,166 @@ HRESULT WINAPI D3DX11CreateTextureFromFileW(ID3D11Device *device, const WCHAR *f
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
@@ -264,17 +265,28 @@ index 6881eec107d..b91bd8d881a 100644
|
||||
+
|
||||
+ if (!src_data || !src_data_size || !texture)
|
||||
+ return E_FAIL;
|
||||
+ if (load_info)
|
||||
+ FIXME("load_info is ignored.\n");
|
||||
+ if (pump)
|
||||
+ FIXME("Thread pump is not supported yet.\n");
|
||||
+
|
||||
+ if (FAILED(D3DX11GetImageInfoFromMemory(src_data, src_data_size, NULL, &img_info, NULL)))
|
||||
+ return E_FAIL;
|
||||
+ if (img_info.MiscFlags & D3D11_RESOURCE_MISC_TEXTURECUBE)
|
||||
+ if (load_info)
|
||||
+ {
|
||||
+ FIXME("Cube map is not supported.\n");
|
||||
+ return E_FAIL;
|
||||
+ img_info.Width = load_info->Width;
|
||||
+ img_info.Height = load_info->Height;
|
||||
+ img_info.Depth = load_info->Depth;
|
||||
+ img_info.ArraySize = 1;
|
||||
+ img_info.MipLevels = load_info->MipLevels;
|
||||
+ img_info.MiscFlags = load_info->MiscFlags;
|
||||
+ img_info.Format = load_info->Format;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ if (FAILED(D3DX11GetImageInfoFromMemory(src_data, src_data_size, NULL, &img_info, NULL)))
|
||||
+ return E_FAIL;
|
||||
+ if (img_info.MiscFlags & D3D11_RESOURCE_MISC_TEXTURECUBE)
|
||||
+ {
|
||||
+ FIXME("Cube map is not supported.\n");
|
||||
+ return E_FAIL;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (FAILED(hr = WICCreateImagingFactory_Proxy(WINCODEC_SDK_VERSION, &factory)))
|
||||
@@ -391,5 +403,5 @@ index 6881eec107d..b91bd8d881a 100644
|
||||
|
||||
HRESULT WINAPI D3DX11SaveTextureToFileW(ID3D11DeviceContext *context, ID3D11Resource *texture,
|
||||
--
|
||||
2.34.1
|
||||
2.40.1
|
||||
|
||||
|
@@ -0,0 +1,56 @@
|
||||
From 30d677139afe2af3f72c68ba11f1bbaead6f1c11 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Wed, 2 Aug 2023 08:24:11 +1000
|
||||
Subject: [PATCH] d3dx11_43: D3DX11GetImageInfoFromMemory - Only use frame for
|
||||
non DDS images
|
||||
|
||||
---
|
||||
dlls/d3dx11_43/texture.c | 18 +++++++++++++++---
|
||||
1 file changed, 15 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3dx11_43/texture.c b/dlls/d3dx11_43/texture.c
|
||||
index 10dedf30c0f..f3f7d350131 100644
|
||||
--- a/dlls/d3dx11_43/texture.c
|
||||
+++ b/dlls/d3dx11_43/texture.c
|
||||
@@ -295,6 +295,7 @@ static const GUID *dxgi_format_to_wic_guid(DXGI_FORMAT format)
|
||||
HRESULT WINAPI D3DX11GetImageInfoFromMemory(const void *src_data, SIZE_T src_data_size, ID3DX11ThreadPump *pump,
|
||||
D3DX11_IMAGE_INFO *img_info, HRESULT *hresult)
|
||||
{
|
||||
+ IWICBitmapFrameDecode *frame = NULL;
|
||||
IWICImagingFactory *factory = NULL;
|
||||
IWICDdsDecoder *dds_decoder = NULL;
|
||||
IWICBitmapDecoder *decoder = NULL;
|
||||
@@ -358,9 +359,18 @@ HRESULT WINAPI D3DX11GetImageInfoFromMemory(const void *src_data, SIZE_T src_dat
|
||||
}
|
||||
else
|
||||
{
|
||||
- FIXME("Unsupported image format %d\n", img_info->ImageFileFormat);
|
||||
- img_info->Width = 1;
|
||||
- img_info->Height = 1;
|
||||
+ unsigned int frame_count;
|
||||
+
|
||||
+ hr = IWICBitmapDecoder_GetFrameCount(decoder, &frame_count);
|
||||
+ if (FAILED(hr) || !frame_count)
|
||||
+ goto end;
|
||||
+ hr = IWICBitmapDecoder_GetFrame(decoder, 0, &frame);
|
||||
+ if (FAILED(hr))
|
||||
+ goto end;
|
||||
+ hr = IWICBitmapFrameDecode_GetSize(frame, &img_info->Width, &img_info->Height);
|
||||
+ if (FAILED(hr))
|
||||
+ goto end;
|
||||
+
|
||||
img_info->ArraySize = 1;
|
||||
img_info->Depth = 1;
|
||||
img_info->MipLevels = 1;
|
||||
@@ -372,6 +382,8 @@ HRESULT WINAPI D3DX11GetImageInfoFromMemory(const void *src_data, SIZE_T src_dat
|
||||
end:
|
||||
if (dds_decoder)
|
||||
IWICDdsDecoder_Release(dds_decoder);
|
||||
+ if (frame)
|
||||
+ IWICBitmapFrameDecode_Release(frame);
|
||||
if (decoder)
|
||||
IWICBitmapDecoder_Release(decoder);
|
||||
if (stream)
|
||||
--
|
||||
2.40.1
|
||||
|
@@ -0,0 +1,127 @@
|
||||
From cf47173eec41f4427248796a781e3aa4463a79db Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mu=C5=BCy=C5=82o?= <galtgendo@o2.pl>
|
||||
Date: Wed, 7 Jun 2023 08:17:59 +1000
|
||||
Subject: [PATCH] d3dx9: Improve handling of Sprite render states
|
||||
|
||||
---
|
||||
dlls/d3dx9_36/sprite.c | 76 +++++++++++++++++++++++-------------------
|
||||
1 file changed, 41 insertions(+), 35 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3dx9_36/sprite.c b/dlls/d3dx9_36/sprite.c
|
||||
index 1a072e52cda..0ce2ab977f3 100644
|
||||
--- a/dlls/d3dx9_36/sprite.c
|
||||
+++ b/dlls/d3dx9_36/sprite.c
|
||||
@@ -193,7 +193,7 @@ static HRESULT WINAPI d3dx9_sprite_SetWorldViewLH(ID3DXSprite *iface,
|
||||
}
|
||||
|
||||
/* Helper function */
|
||||
-static void set_states(struct d3dx9_sprite *object)
|
||||
+static void set_states(struct d3dx9_sprite *object, DWORD flags)
|
||||
{
|
||||
D3DXMATRIX mat;
|
||||
D3DVIEWPORT9 vp;
|
||||
@@ -204,32 +204,35 @@ static void set_states(struct d3dx9_sprite *object)
|
||||
IDirect3DDevice9_SetNPatchMode(object->device, 0.0f);
|
||||
|
||||
/* Render states */
|
||||
- IDirect3DDevice9_SetRenderState(object->device, D3DRS_ALPHABLENDENABLE, TRUE);
|
||||
- IDirect3DDevice9_SetRenderState(object->device, D3DRS_ALPHAFUNC, D3DCMP_GREATER);
|
||||
- IDirect3DDevice9_SetRenderState(object->device, D3DRS_ALPHAREF, 0x00);
|
||||
- IDirect3DDevice9_SetRenderState(object->device, D3DRS_ALPHATESTENABLE, object->alphacmp_caps);
|
||||
- IDirect3DDevice9_SetRenderState(object->device, D3DRS_BLENDOP, D3DBLENDOP_ADD);
|
||||
- IDirect3DDevice9_SetRenderState(object->device, D3DRS_CLIPPING, TRUE);
|
||||
- IDirect3DDevice9_SetRenderState(object->device, D3DRS_CLIPPLANEENABLE, 0);
|
||||
- IDirect3DDevice9_SetRenderState(object->device, D3DRS_COLORWRITEENABLE, D3DCOLORWRITEENABLE_ALPHA | D3DCOLORWRITEENABLE_BLUE |
|
||||
- D3DCOLORWRITEENABLE_GREEN | D3DCOLORWRITEENABLE_RED);
|
||||
- IDirect3DDevice9_SetRenderState(object->device, D3DRS_CULLMODE, D3DCULL_NONE);
|
||||
- IDirect3DDevice9_SetRenderState(object->device, D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA);
|
||||
- IDirect3DDevice9_SetRenderState(object->device, D3DRS_DIFFUSEMATERIALSOURCE, D3DMCS_COLOR1);
|
||||
- IDirect3DDevice9_SetRenderState(object->device, D3DRS_ENABLEADAPTIVETESSELLATION, FALSE);
|
||||
- IDirect3DDevice9_SetRenderState(object->device, D3DRS_FILLMODE, D3DFILL_SOLID);
|
||||
- IDirect3DDevice9_SetRenderState(object->device, D3DRS_FOGENABLE, FALSE);
|
||||
- IDirect3DDevice9_SetRenderState(object->device, D3DRS_INDEXEDVERTEXBLENDENABLE, FALSE);
|
||||
- IDirect3DDevice9_SetRenderState(object->device, D3DRS_LIGHTING, FALSE);
|
||||
- IDirect3DDevice9_SetRenderState(object->device, D3DRS_RANGEFOGENABLE, FALSE);
|
||||
- IDirect3DDevice9_SetRenderState(object->device, D3DRS_SEPARATEALPHABLENDENABLE, FALSE);
|
||||
- IDirect3DDevice9_SetRenderState(object->device, D3DRS_SHADEMODE, D3DSHADE_GOURAUD);
|
||||
- IDirect3DDevice9_SetRenderState(object->device, D3DRS_SPECULARENABLE, FALSE);
|
||||
- IDirect3DDevice9_SetRenderState(object->device, D3DRS_SRCBLEND, D3DBLEND_SRCALPHA);
|
||||
- IDirect3DDevice9_SetRenderState(object->device, D3DRS_SRGBWRITEENABLE, FALSE);
|
||||
- IDirect3DDevice9_SetRenderState(object->device, D3DRS_STENCILENABLE, FALSE);
|
||||
- IDirect3DDevice9_SetRenderState(object->device, D3DRS_VERTEXBLEND, FALSE);
|
||||
- IDirect3DDevice9_SetRenderState(object->device, D3DRS_WRAP0, 0);
|
||||
+ if (!(flags & D3DXSPRITE_DONOTMODIFY_RENDERSTATE))
|
||||
+ {
|
||||
+ IDirect3DDevice9_SetRenderState(object->device, D3DRS_ALPHABLENDENABLE, TRUE);
|
||||
+ IDirect3DDevice9_SetRenderState(object->device, D3DRS_ALPHAFUNC, D3DCMP_GREATER);
|
||||
+ IDirect3DDevice9_SetRenderState(object->device, D3DRS_ALPHAREF, 0x00);
|
||||
+ IDirect3DDevice9_SetRenderState(object->device, D3DRS_ALPHATESTENABLE, object->alphacmp_caps);
|
||||
+ IDirect3DDevice9_SetRenderState(object->device, D3DRS_BLENDOP, D3DBLENDOP_ADD);
|
||||
+ IDirect3DDevice9_SetRenderState(object->device, D3DRS_CLIPPING, TRUE);
|
||||
+ IDirect3DDevice9_SetRenderState(object->device, D3DRS_CLIPPLANEENABLE, 0);
|
||||
+ IDirect3DDevice9_SetRenderState(object->device, D3DRS_COLORWRITEENABLE, D3DCOLORWRITEENABLE_ALPHA | D3DCOLORWRITEENABLE_BLUE |
|
||||
+ D3DCOLORWRITEENABLE_GREEN | D3DCOLORWRITEENABLE_RED);
|
||||
+ IDirect3DDevice9_SetRenderState(object->device, D3DRS_CULLMODE, D3DCULL_NONE);
|
||||
+ IDirect3DDevice9_SetRenderState(object->device, D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA);
|
||||
+ IDirect3DDevice9_SetRenderState(object->device, D3DRS_DIFFUSEMATERIALSOURCE, D3DMCS_COLOR1);
|
||||
+ IDirect3DDevice9_SetRenderState(object->device, D3DRS_ENABLEADAPTIVETESSELLATION, FALSE);
|
||||
+ IDirect3DDevice9_SetRenderState(object->device, D3DRS_FILLMODE, D3DFILL_SOLID);
|
||||
+ IDirect3DDevice9_SetRenderState(object->device, D3DRS_FOGENABLE, FALSE);
|
||||
+ IDirect3DDevice9_SetRenderState(object->device, D3DRS_INDEXEDVERTEXBLENDENABLE, FALSE);
|
||||
+ IDirect3DDevice9_SetRenderState(object->device, D3DRS_LIGHTING, FALSE);
|
||||
+ IDirect3DDevice9_SetRenderState(object->device, D3DRS_RANGEFOGENABLE, FALSE);
|
||||
+ IDirect3DDevice9_SetRenderState(object->device, D3DRS_SEPARATEALPHABLENDENABLE, FALSE);
|
||||
+ IDirect3DDevice9_SetRenderState(object->device, D3DRS_SHADEMODE, D3DSHADE_GOURAUD);
|
||||
+ IDirect3DDevice9_SetRenderState(object->device, D3DRS_SPECULARENABLE, FALSE);
|
||||
+ IDirect3DDevice9_SetRenderState(object->device, D3DRS_SRCBLEND, D3DBLEND_SRCALPHA);
|
||||
+ IDirect3DDevice9_SetRenderState(object->device, D3DRS_SRGBWRITEENABLE, FALSE);
|
||||
+ IDirect3DDevice9_SetRenderState(object->device, D3DRS_STENCILENABLE, FALSE);
|
||||
+ IDirect3DDevice9_SetRenderState(object->device, D3DRS_VERTEXBLEND, FALSE);
|
||||
+ IDirect3DDevice9_SetRenderState(object->device, D3DRS_WRAP0, 0);
|
||||
+ }
|
||||
|
||||
/* Texture stage states */
|
||||
IDirect3DDevice9_SetTextureStageState(object->device, 0, D3DTSS_ALPHAARG1, D3DTA_TEXTURE);
|
||||
@@ -266,12 +269,15 @@ static void set_states(struct d3dx9_sprite *object)
|
||||
IDirect3DDevice9_SetSamplerState(object->device, 0, D3DSAMP_SRGBTEXTURE, 0);
|
||||
|
||||
/* Matrices */
|
||||
- D3DXMatrixIdentity(&mat);
|
||||
- IDirect3DDevice9_SetTransform(object->device, D3DTS_WORLD, &mat);
|
||||
- IDirect3DDevice9_SetTransform(object->device, D3DTS_VIEW, &object->view);
|
||||
- IDirect3DDevice9_GetViewport(object->device, &vp);
|
||||
- D3DXMatrixOrthoOffCenterLH(&mat, vp.X+0.5f, (float)vp.Width+vp.X+0.5f, (float)vp.Height+vp.Y+0.5f, vp.Y+0.5f, vp.MinZ, vp.MaxZ);
|
||||
- IDirect3DDevice9_SetTransform(object->device, D3DTS_PROJECTION, &mat);
|
||||
+ if (!(flags & D3DXSPRITE_OBJECTSPACE))
|
||||
+ {
|
||||
+ D3DXMatrixIdentity(&mat);
|
||||
+ IDirect3DDevice9_SetTransform(object->device, D3DTS_WORLD, &mat);
|
||||
+ IDirect3DDevice9_SetTransform(object->device, D3DTS_VIEW, &object->view);
|
||||
+ IDirect3DDevice9_GetViewport(object->device, &vp);
|
||||
+ D3DXMatrixOrthoOffCenterLH(&mat, vp.X+0.5f, (float)vp.Width+vp.X+0.5f, (float)vp.Height+vp.Y+0.5f, vp.Y+0.5f, vp.MinZ, vp.MaxZ);
|
||||
+ IDirect3DDevice9_SetTransform(object->device, D3DTS_PROJECTION, &mat);
|
||||
+ }
|
||||
}
|
||||
|
||||
static HRESULT WINAPI d3dx9_sprite_Begin(ID3DXSprite *iface, DWORD flags)
|
||||
@@ -317,7 +323,7 @@ D3DXSPRITE_SORT_TEXTURE: sort by texture (so that it doesn't change too often)
|
||||
hr=IDirect3DDevice9_BeginStateBlock(This->device);
|
||||
if(hr!=D3D_OK) return hr;
|
||||
|
||||
- set_states(This);
|
||||
+ set_states(This, flags);
|
||||
|
||||
IDirect3DDevice9_SetVertexDeclaration(This->device, This->vdecl);
|
||||
IDirect3DDevice9_SetStreamSource(This->device, 0, NULL, 0, sizeof(struct sprite_vertex));
|
||||
@@ -330,7 +336,7 @@ D3DXSPRITE_SORT_TEXTURE: sort by texture (so that it doesn't change too often)
|
||||
}
|
||||
|
||||
/* Apply device state */
|
||||
- set_states(This);
|
||||
+ set_states(This, flags);
|
||||
|
||||
This->flags=flags;
|
||||
This->ready=TRUE;
|
||||
--
|
||||
2.40.1
|
||||
|
1
patches/d3dx9-sprite-state/definition
Normal file
1
patches/d3dx9-sprite-state/definition
Normal file
@@ -0,0 +1 @@
|
||||
Fixes: [54034] d3dx9: Improve sprite rendering state handling.
|
@@ -1,4 +1,4 @@
|
||||
From 6c3aa646aff81104eb7783138a71d4bb8cf192a7 Mon Sep 17 00:00:00 2001
|
||||
From 0ba05ea85f8f2de3c802083340eb3a9ee8df209e Mon Sep 17 00:00:00 2001
|
||||
From: Christian Costa <titan.costa@gmail.com>
|
||||
Date: Sat, 13 Feb 2016 15:29:37 +0100
|
||||
Subject: [PATCH] d3dx9_36: Implement D3DXDisassembleShader. (v2)
|
||||
@@ -6,11 +6,11 @@ Subject: [PATCH] d3dx9_36: Implement D3DXDisassembleShader. (v2)
|
||||
Changes in v2 (by Christian Costa):
|
||||
* More generic code for D3DXDisassembleShader.
|
||||
---
|
||||
dlls/d3dx9_36/shader.c | 332 ++++++++++++++++++++++++++++++++++++++++-
|
||||
1 file changed, 327 insertions(+), 5 deletions(-)
|
||||
dlls/d3dx9_36/shader.c | 335 ++++++++++++++++++++++++++++++++++++++++-
|
||||
1 file changed, 329 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3dx9_36/shader.c b/dlls/d3dx9_36/shader.c
|
||||
index fe0f99180ac..54d0b158568 100644
|
||||
index 1aa75d64dc5..d98345e2288 100644
|
||||
--- a/dlls/d3dx9_36/shader.c
|
||||
+++ b/dlls/d3dx9_36/shader.c
|
||||
@@ -1,6 +1,7 @@
|
||||
@@ -21,22 +21,27 @@ index fe0f99180ac..54d0b158568 100644
|
||||
* Copyright 2011 Travis Athougies
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
@@ -18,7 +19,7 @@
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
@@ -19,6 +20,7 @@
|
||||
*/
|
||||
|
||||
-
|
||||
#include <assert.h>
|
||||
+#include <stdio.h>
|
||||
|
||||
#include "d3dx9_private.h"
|
||||
#include "d3dcommon.h"
|
||||
#include "d3dcompiler.h"
|
||||
@@ -2336,13 +2337,334 @@ HRESULT WINAPI D3DXGetShaderSamplers(const DWORD *byte_code, const char **sample
|
||||
@@ -2347,13 +2349,334 @@ HRESULT WINAPI D3DXGetShaderSamplers(const DWORD *byte_code, const char **sample
|
||||
return D3D_OK;
|
||||
}
|
||||
|
||||
-HRESULT WINAPI D3DXDisassembleShader(const DWORD *shader, BOOL colorcode, const char *comments,
|
||||
- ID3DXBuffer **buffer)
|
||||
-{
|
||||
- TRACE("shader %p, colorcode %d, comments %s, buffer %p.\n", shader, colorcode, debugstr_a(comments), buffer);
|
||||
+static const char *decl_usage[] = { "position", "blendweight", "blendindices", "normal", "psize", "texcoord",
|
||||
+ "tangent", "binormal", "tessfactor", "positiont", "color" };
|
||||
+
|
||||
|
||||
- return D3DDisassemble(shader, D3DXGetShaderSize(shader), colorcode ? D3D_DISASM_ENABLE_COLOR_CODE : 0,
|
||||
- comments, (ID3DBlob **)buffer);
|
||||
+static const char *tex_type[] = { "", "1d", "2d", "cube", "volume" };
|
||||
+
|
||||
+static int add_modifier(char *buffer, DWORD param)
|
||||
@@ -298,11 +303,9 @@ index fe0f99180ac..54d0b158568 100644
|
||||
+ { D3DSIO_COMMENT, "", 0, instr_comment, 0x0100, 0xFFFF }
|
||||
+};
|
||||
+
|
||||
HRESULT WINAPI D3DXDisassembleShader(const DWORD *shader, BOOL colorcode, const char *comments,
|
||||
- ID3DXBuffer **buffer)
|
||||
+HRESULT WINAPI D3DXDisassembleShader(const DWORD *shader, BOOL colorcode, const char *comments,
|
||||
+ ID3DXBuffer **disassembly)
|
||||
{
|
||||
- TRACE("shader %p, colorcode %d, comments %s, buffer %p.\n", shader, colorcode, debugstr_a(comments), buffer);
|
||||
+{
|
||||
+ DWORD *ptr = (DWORD *)shader;
|
||||
+ char *buffer, *buf;
|
||||
+ UINT capacity = 4096;
|
||||
@@ -314,9 +317,7 @@ index fe0f99180ac..54d0b158568 100644
|
||||
+
|
||||
+ if (!shader || !disassembly)
|
||||
+ return D3DERR_INVALIDCALL;
|
||||
|
||||
- return D3DDisassemble(shader, D3DXGetShaderSize(shader), colorcode ? D3D_DISASM_ENABLE_COLOR_CODE : 0,
|
||||
- comments, (ID3DBlob **)buffer);
|
||||
+
|
||||
+ buf = buffer = HeapAlloc(GetProcessHeap(), 0, capacity);
|
||||
+ if (!buffer)
|
||||
+ return E_OUTOFMEMORY;
|
||||
@@ -370,5 +371,5 @@ index fe0f99180ac..54d0b158568 100644
|
||||
|
||||
struct d3dx9_texture_shader
|
||||
--
|
||||
2.32.0
|
||||
2.39.0
|
||||
|
||||
|
@@ -254,14 +254,14 @@ index f437a83cbd8..c5faae520c9 100644
|
||||
+ hr = D3DXOptimizeVertices(indices, num_faces,
|
||||
+ num_vertices, FALSE,
|
||||
+ vertex_remap);
|
||||
+ ok(hr == D3D_OK, "D3DXOptimizeVertices failed. Got %x, expected D3D_OK.\n", hr);
|
||||
+ ok(hr == D3D_OK, "D3DXOptimizeVertices failed. Got %lx, expected D3D_OK.\n", hr);
|
||||
+
|
||||
+ /* vertex_remap must not be NULL */
|
||||
+ hr = D3DXOptimizeVertices(indices, num_faces,
|
||||
+ num_vertices, FALSE,
|
||||
+ NULL);
|
||||
+ ok(hr == D3DERR_INVALIDCALL, "D3DXOptimizeVertices passed NULL vertex_remap "
|
||||
+ "pointer. Got %x, expected D3DERR_INVALIDCALL.\n", hr);
|
||||
+ "pointer. Got %lx, expected D3DERR_INVALIDCALL.\n", hr);
|
||||
+}
|
||||
+
|
||||
static void test_optimize_faces(void)
|
||||
|
@@ -210,7 +210,7 @@ index 984b2f6..a206e06 100644
|
||||
+HRESULT WINAPI D3DXComputeTangent(ID3DXMesh *mesh, DWORD stage_idx, DWORD tangent_idx,
|
||||
+ DWORD binorm_idx, DWORD wrap, const DWORD *adjacency)
|
||||
+{
|
||||
+ TRACE("mesh %p, stage_idx %d, tangent_idx %d, binorm_idx %d, wrap %d, adjacency %p.\n",
|
||||
+ TRACE("mesh %p, stage_idx %ld, tangent_idx %ld, binorm_idx %ld, wrap %ld, adjacency %p.\n",
|
||||
+ mesh, stage_idx, tangent_idx, binorm_idx, wrap, adjacency);
|
||||
+
|
||||
+ return D3DXComputeTangentFrameEx( mesh, D3DDECLUSAGE_TEXCOORD, stage_idx,
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From f22ce02d880a9a6723d202eaf959d1eaa7a4c3df Mon Sep 17 00:00:00 2001
|
||||
From 28b0030ac5f486875dff6f5f34779844f1a031cf Mon Sep 17 00:00:00 2001
|
||||
From: Christian Costa <titan.costa@gmail.com>
|
||||
Date: Sun, 11 Jan 2015 16:29:30 +0100
|
||||
Subject: [PATCH] d3dx9_36: Improve D3DXSaveTextureToFile to save simple
|
||||
@@ -11,23 +11,23 @@ Subject: [PATCH] d3dx9_36: Improve D3DXSaveTextureToFile to save simple
|
||||
3 files changed, 65 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3dx9_36/d3dx9_private.h b/dlls/d3dx9_36/d3dx9_private.h
|
||||
index 9497343f422..679b57b2626 100644
|
||||
index 5d8f5b332f8..f1f41c6e4d7 100644
|
||||
--- a/dlls/d3dx9_36/d3dx9_private.h
|
||||
+++ b/dlls/d3dx9_36/d3dx9_private.h
|
||||
@@ -125,6 +125,8 @@ HRESULT lock_surface(IDirect3DSurface9 *surface, const RECT *surface_rect, D3DLO
|
||||
IDirect3DSurface9 **temp_surface, BOOL write) DECLSPEC_HIDDEN;
|
||||
@@ -127,6 +127,8 @@ HRESULT lock_surface(IDirect3DSurface9 *surface, const RECT *surface_rect, D3DLO
|
||||
IDirect3DSurface9 **temp_surface, BOOL write);
|
||||
HRESULT unlock_surface(IDirect3DSurface9 *surface, const RECT *surface_rect,
|
||||
IDirect3DSurface9 *temp_surface, BOOL update) DECLSPEC_HIDDEN;
|
||||
IDirect3DSurface9 *temp_surface, BOOL update);
|
||||
+HRESULT save_dds_texture_to_memory(ID3DXBuffer **dst_buffer, IDirect3DBaseTexture9 *src_texture,
|
||||
+ const PALETTEENTRY *src_palette) DECLSPEC_HIDDEN;
|
||||
+ const PALETTEENTRY *src_palette);
|
||||
|
||||
unsigned short float_32_to_16(const float in) DECLSPEC_HIDDEN;
|
||||
float float_16_to_32(const unsigned short in) DECLSPEC_HIDDEN;
|
||||
unsigned short float_32_to_16(const float in);
|
||||
float float_16_to_32(const unsigned short in);
|
||||
diff --git a/dlls/d3dx9_36/surface.c b/dlls/d3dx9_36/surface.c
|
||||
index aa9ee891b54..9871d211a7c 100644
|
||||
index ca40018af24..9ff5b4901b8 100644
|
||||
--- a/dlls/d3dx9_36/surface.c
|
||||
+++ b/dlls/d3dx9_36/surface.c
|
||||
@@ -636,6 +636,68 @@ static HRESULT save_dds_surface_to_memory(ID3DXBuffer **dst_buffer, IDirect3DSur
|
||||
@@ -650,6 +650,68 @@ static HRESULT save_dds_surface_to_memory(ID3DXBuffer **dst_buffer, IDirect3DSur
|
||||
return D3D_OK;
|
||||
}
|
||||
|
||||
@@ -97,10 +97,10 @@ index aa9ee891b54..9871d211a7c 100644
|
||||
const D3DBOX *dst_box, const void *src_data, const D3DBOX *src_box, DWORD filter, D3DCOLOR color_key,
|
||||
const D3DXIMAGE_INFO *src_info)
|
||||
diff --git a/dlls/d3dx9_36/texture.c b/dlls/d3dx9_36/texture.c
|
||||
index 26d07ca9f66..b743d5cfad0 100644
|
||||
index 2ee79b51f79..7ceef158d07 100644
|
||||
--- a/dlls/d3dx9_36/texture.c
|
||||
+++ b/dlls/d3dx9_36/texture.c
|
||||
@@ -1904,10 +1904,7 @@ HRESULT WINAPI D3DXSaveTextureToFileInMemory(ID3DXBuffer **dst_buffer, D3DXIMAGE
|
||||
@@ -1858,10 +1858,7 @@ HRESULT WINAPI D3DXSaveTextureToFileInMemory(ID3DXBuffer **dst_buffer, D3DXIMAGE
|
||||
if (!dst_buffer || !src_texture) return D3DERR_INVALIDCALL;
|
||||
|
||||
if (file_format == D3DXIFF_DDS)
|
||||
@@ -113,5 +113,5 @@ index 26d07ca9f66..b743d5cfad0 100644
|
||||
type = IDirect3DBaseTexture9_GetType(src_texture);
|
||||
switch (type)
|
||||
--
|
||||
2.17.1
|
||||
2.40.1
|
||||
|
||||
|
@@ -174,18 +174,18 @@ index 1daec158a5f..64b02276843 100644
|
||||
+ }
|
||||
+
|
||||
+ hr = D3DXCreateSkinInfoFVF(4, D3DFVF_XYZ | D3DFVF_NORMAL, 2, &skin_info);
|
||||
+ ok(hr == D3D_OK, "Expected D3D_OK, got %#x\n", hr);
|
||||
+ ok(hr == D3D_OK, "Expected D3D_OK, got %#lx\n", hr);
|
||||
+
|
||||
+ skin_info->lpVtbl->SetBoneInfluence(skin_info, 0, 2, bone0_vertices, bone0_weights);
|
||||
+ ok(hr == D3D_OK, "Expected D3D_OK, got %#x\n", hr);
|
||||
+ ok(hr == D3D_OK, "Expected D3D_OK, got %#lx\n", hr);
|
||||
+ skin_info->lpVtbl->SetBoneOffsetMatrix(skin_info, 0, &matrix);
|
||||
+ ok(hr == D3D_OK, "Expected D3D_OK, got %#x\n", hr);
|
||||
+ ok(hr == D3D_OK, "Expected D3D_OK, got %#lx\n", hr);
|
||||
+ skin_info->lpVtbl->SetBoneInfluence(skin_info, 1, 2, bone1_vertices, bone1_weights);
|
||||
+ ok(hr == D3D_OK, "Expected D3D_OK, got %#x\n", hr);
|
||||
+ ok(hr == D3D_OK, "Expected D3D_OK, got %#lx\n", hr);
|
||||
+ skin_info->lpVtbl->SetBoneOffsetMatrix(skin_info, 1, &matrix);
|
||||
+ ok(hr == D3D_OK, "Expected D3D_OK, got %#x\n", hr);
|
||||
+ ok(hr == D3D_OK, "Expected D3D_OK, got %#lx\n", hr);
|
||||
+ skin_info->lpVtbl->UpdateSkinnedMesh(skin_info, bones_matrix, NULL, vertices_src, vertices_dest);
|
||||
+ ok(hr == D3D_OK, "Expected D3D_OK, got %#x\n", hr);
|
||||
+ ok(hr == D3D_OK, "Expected D3D_OK, got %#lx\n", hr);
|
||||
+ for (i = 0; i < 4; i++)
|
||||
+ {
|
||||
+ ok(compare(vertices_dest[i*2].x, vertices_ref[i*2].x), "Vertex[%d].position.x: got %g, expected %g\n",
|
||||
|
@@ -0,0 +1,27 @@
|
||||
From 1772b5826cbd3adef3f5c09e6c0138a8d367fc8b Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Thu, 28 Sep 2023 09:14:00 +1000
|
||||
Subject: [PATCH 1/3] d3dx9: D3DXLoadMeshHierarchyFromXInMemory return default
|
||||
Animation Controller
|
||||
|
||||
---
|
||||
dlls/d3dx9_36/mesh.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/d3dx9_36/mesh.c b/dlls/d3dx9_36/mesh.c
|
||||
index 8aa4ece69fb..442b56a7e19 100644
|
||||
--- a/dlls/d3dx9_36/mesh.c
|
||||
+++ b/dlls/d3dx9_36/mesh.c
|
||||
@@ -4019,7 +4019,8 @@ HRESULT WINAPI D3DXLoadMeshHierarchyFromXInMemory(const void *memory, DWORD memo
|
||||
if (anim_controller)
|
||||
{
|
||||
*anim_controller = NULL;
|
||||
- FIXME("Animation controller creation not implemented.\n");
|
||||
+ /*FIXME("Animation controller creation not implemented.\n");*/
|
||||
+ D3DXCreateAnimationController(1, 1, 1, 1, anim_controller);
|
||||
}
|
||||
|
||||
cleanup:
|
||||
--
|
||||
2.40.1
|
||||
|
@@ -0,0 +1,169 @@
|
||||
From c79c2913f06f0fe703f00ca324270e0551ca7027 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Thu, 28 Sep 2023 12:35:29 +1000
|
||||
Subject: [PATCH] d3dx9: D3DXLoadMeshHierarchyFromXInMemory support empty mesh.
|
||||
|
||||
---
|
||||
dlls/d3dx9_36/mesh.c | 36 ++++++++++++++++++++++++-----
|
||||
dlls/d3dx9_36/tests/mesh.c | 46 ++++++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 77 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3dx9_36/mesh.c b/dlls/d3dx9_36/mesh.c
|
||||
index 442b56a7e19..c85a9774fdd 100644
|
||||
--- a/dlls/d3dx9_36/mesh.c
|
||||
+++ b/dlls/d3dx9_36/mesh.c
|
||||
@@ -3506,6 +3506,16 @@ HRESULT WINAPI D3DXLoadSkinMeshFromXof(struct ID3DXFileData *filedata, DWORD opt
|
||||
hr = parse_mesh(filedata, &mesh_data, provide_flags);
|
||||
if (FAILED(hr)) goto cleanup;
|
||||
|
||||
+ if (mesh_data.num_vertices == 0)
|
||||
+ {
|
||||
+ if (adjacency_out) *adjacency_out = NULL;
|
||||
+ if (materials_out) *materials_out = NULL;
|
||||
+ if (effects_out) *effects_out = NULL;
|
||||
+ *mesh_out = NULL;
|
||||
+ hr = D3D_OK;
|
||||
+ goto cleanup;
|
||||
+ }
|
||||
+
|
||||
total_vertices = mesh_data.num_vertices;
|
||||
if (mesh_data.fvf & D3DFVF_NORMAL) {
|
||||
/* duplicate vertices with multiple normals */
|
||||
@@ -3815,7 +3825,8 @@ static HRESULT load_mesh_container(struct ID3DXFileData *filedata, DWORD options
|
||||
hr = filedata_get_name(filedata, &name);
|
||||
if (FAILED(hr)) goto cleanup;
|
||||
|
||||
- hr = alloc_hier->lpVtbl->CreateMeshContainer(alloc_hier, name, &mesh_data,
|
||||
+ if (mesh_data.pMesh)
|
||||
+ hr = alloc_hier->lpVtbl->CreateMeshContainer(alloc_hier, name, &mesh_data,
|
||||
materials ? ID3DXBuffer_GetBufferPointer(materials) : NULL,
|
||||
effects ? ID3DXBuffer_GetBufferPointer(effects) : NULL,
|
||||
num_materials,
|
||||
@@ -4201,13 +4212,21 @@ static HRESULT parse_frame(struct ID3DXFileData *filedata, DWORD options, struct
|
||||
hr = E_OUTOFMEMORY;
|
||||
goto err;
|
||||
}
|
||||
- list_add_tail(container_list, &container->entry);
|
||||
- container->transform = transform;
|
||||
|
||||
hr = D3DXLoadSkinMeshFromXof(child, options, device,
|
||||
(provide_flags & PROVIDE_ADJACENCY) ? &container->adjacency : NULL,
|
||||
(provide_flags & PROVIDE_MATERIALS) ? &container->materials : NULL,
|
||||
NULL, &container->num_materials, NULL, &container->mesh);
|
||||
+
|
||||
+ if (container->mesh)
|
||||
+ {
|
||||
+ list_add_tail(container_list, &container->entry);
|
||||
+ container->transform = transform;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ HeapFree(GetProcessHeap(), HEAP_ZERO_MEMORY, container);
|
||||
+ }
|
||||
} else if (IsEqualGUID(&type, &TID_D3DRMFrameTransformMatrix)) {
|
||||
D3DXMATRIX new_transform;
|
||||
hr = parse_transform_matrix(child, &new_transform);
|
||||
@@ -4295,13 +4314,20 @@ HRESULT WINAPI D3DXLoadMeshFromXInMemory(const void *memory, DWORD memory_size,
|
||||
hr = E_OUTOFMEMORY;
|
||||
goto cleanup;
|
||||
}
|
||||
- list_add_tail(&container_list, &container_ptr->entry);
|
||||
- D3DXMatrixIdentity(&container_ptr->transform);
|
||||
|
||||
hr = D3DXLoadSkinMeshFromXof(filedata, options, device,
|
||||
(provide_flags & PROVIDE_ADJACENCY) ? &container_ptr->adjacency : NULL,
|
||||
(provide_flags & PROVIDE_MATERIALS) ? &container_ptr->materials : NULL,
|
||||
NULL, &container_ptr->num_materials, NULL, &container_ptr->mesh);
|
||||
+ if (container_ptr->mesh)
|
||||
+ {
|
||||
+ list_add_tail(&container_list, &container_ptr->entry);
|
||||
+ D3DXMatrixIdentity(&container_ptr->transform);
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ HeapFree(GetProcessHeap(), 0, container_ptr);
|
||||
+ }
|
||||
} else if (IsEqualGUID(&guid, &TID_D3DRMFrame)) {
|
||||
hr = parse_frame(filedata, options, device, &identity, &container_list, provide_flags);
|
||||
}
|
||||
diff --git a/dlls/d3dx9_36/tests/mesh.c b/dlls/d3dx9_36/tests/mesh.c
|
||||
index ce0f238412d..21428f12e26 100644
|
||||
--- a/dlls/d3dx9_36/tests/mesh.c
|
||||
+++ b/dlls/d3dx9_36/tests/mesh.c
|
||||
@@ -2068,6 +2068,14 @@ static void D3DXLoadMeshTest(void)
|
||||
"}"
|
||||
"Mesh { 3; 0.0; 0.0; 0.0;, 0.0; 1.0; 0.0;, 3.0; 1.0; 0.0;; 1; 3; 0, 1, 2;; }"
|
||||
"}";
|
||||
+ static const char framed_xfile2[] =
|
||||
+ "xof 0303txt 0032"
|
||||
+ "Frame Box01 {"
|
||||
+ "Mesh { 0;; 0;;"
|
||||
+ "MeshNormals { 0;; 0;; }"
|
||||
+ "}"
|
||||
+ "}";
|
||||
+
|
||||
static const WORD framed_index_buffer[] = { 0, 1, 2 };
|
||||
static const D3DXVECTOR3 framed_vertex_buffers[3][3] = {
|
||||
{{0.0, 0.0, 0.0}, {0.0, 1.0, 0.0}, {1.0, 1.0, 0.0}},
|
||||
@@ -2513,6 +2521,19 @@ static void D3DXLoadMeshTest(void)
|
||||
frame_hier = NULL;
|
||||
}
|
||||
|
||||
+ hr = D3DXLoadMeshHierarchyFromXInMemory(framed_xfile2, sizeof(framed_xfile2) - 1,
|
||||
+ D3DXMESH_MANAGED, device, &alloc_hier, NULL, &frame_hier, NULL);
|
||||
+ ok(hr == D3D_OK, "Expected D3D_OK, got %#lx\n", hr);
|
||||
+ if (SUCCEEDED(hr)) {
|
||||
+ D3DXMESHCONTAINER *container = frame_hier->pMeshContainer;
|
||||
+
|
||||
+ ok(!strcmp(frame_hier->Name, "Box01"), "Expected '', got '%s'\n", frame_hier->Name);
|
||||
+ ok(container == NULL, "Expected NULL, got %p\n", container);
|
||||
+
|
||||
+ hr = D3DXFrameDestroy(frame_hier, &alloc_hier);
|
||||
+ ok(hr == D3D_OK, "Expected D3D_OK, got %#lx\n", hr);
|
||||
+ frame_hier = NULL;
|
||||
+ }
|
||||
|
||||
hr = D3DXLoadMeshFromXInMemory(NULL, 0, D3DXMESH_MANAGED,
|
||||
device, NULL, NULL, NULL, NULL, &mesh);
|
||||
@@ -11426,6 +11447,9 @@ static void test_load_skin_mesh_from_xof(void)
|
||||
"1;"
|
||||
"3; 0, 1, 2;;"
|
||||
"}";
|
||||
+ static const char simple_xfile_empty[] =
|
||||
+ "xof 0303txt 0032"
|
||||
+ "Mesh { 0;; 0;; }";
|
||||
static const D3DVERTEXELEMENT9 expected_declaration[] =
|
||||
{
|
||||
{0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0},
|
||||
@@ -11537,6 +11561,28 @@ static void test_load_skin_mesh_from_xof(void)
|
||||
mesh->lpVtbl->Release(mesh);
|
||||
adjacency->lpVtbl->Release(adjacency);
|
||||
file_data->lpVtbl->Release(file_data);
|
||||
+
|
||||
+ /* Empty Mesh Test */
|
||||
+ file_data = get_mesh_data(simple_xfile_empty, sizeof(simple_xfile_empty) - 1);
|
||||
+ ok(!!file_data, "Failed to load mesh data.\n");
|
||||
+
|
||||
+ adjacency = materials = effects = (void *)0xdeadbeef;
|
||||
+ count = ~0u;
|
||||
+ skin_info = (void *)0xdeadbeef;
|
||||
+ mesh = (void *)0xdeadbeef;
|
||||
+
|
||||
+ hr = D3DXLoadSkinMeshFromXof(file_data, 0, device, &adjacency, &materials, &effects, &count,
|
||||
+ &skin_info, &mesh);
|
||||
+ todo_wine ok(hr == D3DXERR_LOADEDMESHASNODATA, "Got unexpected hr %#lx.\n", hr);
|
||||
+ ok(!adjacency, "Got unexpected value %p.\n", adjacency);
|
||||
+ ok(!materials, "Got unexpected value %p.\n", materials);
|
||||
+ ok(!effects, "Got unexpected value %p.\n", effects);
|
||||
+ ok(count == ~0u, "Got unexpected value %lu.\n", count);
|
||||
+ ok(skin_info == (void *)0xdeadbeef, "Got unexpected value %p.\n", skin_info);
|
||||
+ ok(!mesh, "Got unexpected value %p.\n", mesh);
|
||||
+
|
||||
+ file_data->lpVtbl->Release(file_data);
|
||||
+
|
||||
refcount = IDirect3DDevice9_Release(device);
|
||||
ok(!refcount, "Device has %lu references left.\n", refcount);
|
||||
DestroyWindow(hwnd);
|
||||
--
|
||||
2.42.0
|
||||
|
@@ -0,0 +1,28 @@
|
||||
From 164c33e29bfe06d99c58c1ee73dfd6f31dc4c663 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Sat, 30 Sep 2023 10:18:54 +1000
|
||||
Subject: [PATCH] d3dx9: [HACK] D3DXIntersect - Assign hit to FALSE
|
||||
|
||||
This functions needs to be implement to make "Humanity Asset" to work correctly.
|
||||
|
||||
Added to stop the Infinite loop - Doesn't make the game playable.
|
||||
---
|
||||
dlls/d3dx9_36/mesh.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/dlls/d3dx9_36/mesh.c b/dlls/d3dx9_36/mesh.c
|
||||
index 822b2d7d410..fdc642c4e0c 100644
|
||||
--- a/dlls/d3dx9_36/mesh.c
|
||||
+++ b/dlls/d3dx9_36/mesh.c
|
||||
@@ -7645,6 +7645,8 @@ HRESULT WINAPI D3DXIntersect(ID3DXBaseMesh *mesh, const D3DXVECTOR3 *ray_pos, co
|
||||
FIXME("mesh %p, ray_pos %p, ray_dir %p, hit %p, face_index %p, u %p, v %p, distance %p, all_hits %p, "
|
||||
"count_of_hits %p stub!\n", mesh, ray_pos, ray_dir, hit, face_index, u, v, distance, all_hits, count_of_hits);
|
||||
|
||||
+ *hit = FALSE;
|
||||
+
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
--
|
||||
2.42.0
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user