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
64 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
f8851f16b0 | ||
|
7ed2565d7e | ||
|
013f32ceeb | ||
|
5f6802dae2 | ||
|
8a2658a2ce | ||
|
aae6c7b961 | ||
|
100f108822 | ||
|
640f5f7d0a | ||
|
a1db1dfc16 | ||
|
2771ab8cee | ||
|
fc40539f6d | ||
|
fdcc8bec48 | ||
|
3a06c15dd2 | ||
|
e7c298c616 | ||
|
7b01b9eb20 | ||
|
afb9dcf2a5 | ||
|
d918a0ca3f | ||
|
ad56d6b3d3 | ||
|
5f19a81589 | ||
|
1033d3990b | ||
|
a896148be0 | ||
|
ef11bb63ce | ||
|
f3b03ce5a1 | ||
|
4b48df5032 | ||
|
24319dc308 | ||
|
931daeffec | ||
|
d923cf9418 | ||
|
66c0fdc159 | ||
|
6f3825b11f | ||
|
8d34769ef1 | ||
|
5a5c5a5743 | ||
|
5c01355ada | ||
|
270f893aea | ||
|
dc0aa10ad7 | ||
|
d7b8304e38 | ||
|
b09fe464be | ||
|
4b6879f30f | ||
|
94337e021c | ||
|
05c42b1df2 | ||
|
1bc4da9d59 | ||
|
16476ce303 | ||
|
bdb9f49c3e | ||
|
82118b0d67 | ||
|
00985bf311 | ||
|
3c8c7910e7 | ||
|
069adfd1b0 | ||
|
c91c63a5da | ||
|
f7c80250ec | ||
|
b059114710 | ||
|
f27610e7e7 | ||
|
9da0fe04d3 | ||
|
dc38777093 | ||
|
b57bf86ec0 | ||
|
4e99d1b2a8 | ||
|
8ad669e434 | ||
|
52dd338148 | ||
|
f841424edd | ||
|
5e8fbbf200 | ||
|
183fd3e089 | ||
|
092f3b1ed1 | ||
|
e59eb7639a | ||
|
a0716c9cfe | ||
|
fcf7b80107 | ||
|
163f74fe61 |
@@ -1,15 +1,15 @@
|
||||
From e51b05c3a9d03e4dd84a107a30841d95f8a519c3 Mon Sep 17 00:00:00 2001
|
||||
From 916189d1cdf149f16867870121171e20f129da9f Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Thu, 2 Oct 2014 19:44:31 +0200
|
||||
Subject: [PATCH] ntdll: Print a warning message specifying the wine-staging
|
||||
branch name and version.
|
||||
|
||||
---
|
||||
dlls/ntdll/loader.c | 16 ++++++++++++++++
|
||||
1 file changed, 16 insertions(+)
|
||||
dlls/ntdll/loader.c | 15 +++++++++++++++
|
||||
1 file changed, 15 insertions(+)
|
||||
|
||||
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
|
||||
index ee453700e51..c2d4b3c2f86 100644
|
||||
index 3339596944a..1d435f88755 100644
|
||||
--- a/dlls/ntdll/loader.c
|
||||
+++ b/dlls/ntdll/loader.c
|
||||
@@ -44,6 +44,7 @@ WINE_DECLARE_DEBUG_CHANNEL(relay);
|
||||
@@ -20,7 +20,7 @@ index ee453700e51..c2d4b3c2f86 100644
|
||||
|
||||
#ifdef _WIN64
|
||||
#define DEFAULT_SECURITY_COOKIE_64 (((ULONGLONG)0x00002b99 << 32) | 0x2ddfa232)
|
||||
@@ -3307,6 +3308,7 @@ void WINAPI LdrShutdownProcess(void)
|
||||
@@ -3373,6 +3374,7 @@ void WINAPI LdrShutdownProcess(void)
|
||||
process_detach();
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ index ee453700e51..c2d4b3c2f86 100644
|
||||
|
||||
/******************************************************************
|
||||
* RtlExitUserProcess (NTDLL.@)
|
||||
@@ -3673,6 +3675,9 @@ static void init_wow64(void)
|
||||
@@ -3783,6 +3785,9 @@ static void init_wow64( CONTEXT *context )
|
||||
*/
|
||||
void WINAPI LdrInitializeThunk( CONTEXT *context, ULONG_PTR unknown2, ULONG_PTR unknown3, ULONG_PTR unknown4 )
|
||||
{
|
||||
@@ -38,9 +38,9 @@ index ee453700e51..c2d4b3c2f86 100644
|
||||
static int attach_done;
|
||||
int i;
|
||||
NTSTATUS status;
|
||||
@@ -3753,6 +3758,17 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, ULONG_PTR unknown2, ULONG_PTR
|
||||
}
|
||||
else wm = get_modref( NtCurrentTeb()->Peb->ImageBaseAddress );
|
||||
@@ -3869,6 +3874,16 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, ULONG_PTR unknown2, ULONG_PTR
|
||||
if (NtCurrentTeb()->WowTebOffset) init_wow64( context );
|
||||
#endif
|
||||
|
||||
+ RtlInitUnicodeString( &staging_event_string, L"\\__wine_staging_warn_event" );
|
||||
+ InitializeObjectAttributes( &staging_event_attr, &staging_event_string, OBJ_OPENIF, NULL, NULL );
|
||||
@@ -51,7 +51,6 @@ index ee453700e51..c2d4b3c2f86 100644
|
||||
+ }
|
||||
+ else
|
||||
+ WARN_(winediag)("wine-staging %s is a testing version containing experimental patches.\n", wine_get_version());
|
||||
+
|
||||
+
|
||||
RtlAcquirePebLock();
|
||||
InsertHeadList( &tls_links, &NtCurrentTeb()->TlsLinks );
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 0e65ed108eb8bab24668f9a58c5757a3ad36104f Mon Sep 17 00:00:00 2001
|
||||
From ffea83bdf88a4b7d35c2f9a7e1a773d3110b5771 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Tue, 12 Apr 2016 01:02:34 +0200
|
||||
Subject: [PATCH] uiautomationcore: Add dll and stub some functions.
|
||||
@@ -9,7 +9,7 @@ Subject: [PATCH] uiautomationcore: Add dll and stub some functions.
|
||||
2 files changed, 48 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/dlls/uiautomationcore/Makefile.in b/dlls/uiautomationcore/Makefile.in
|
||||
index 5c4acb232a4..412f1dbbe19 100644
|
||||
index 71ea7b99c94..3e6c2d7688a 100644
|
||||
--- a/dlls/uiautomationcore/Makefile.in
|
||||
+++ b/dlls/uiautomationcore/Makefile.in
|
||||
@@ -1,5 +1,6 @@
|
||||
@@ -17,10 +17,10 @@ index 5c4acb232a4..412f1dbbe19 100644
|
||||
IMPORTLIB = uiautomationcore
|
||||
+IMPORTS = uuid
|
||||
|
||||
EXTRADLLFLAGS = -mno-cygwin -Wb,--prefer-native
|
||||
EXTRADLLFLAGS = -Wb,--prefer-native
|
||||
|
||||
diff --git a/dlls/uiautomationcore/uia_main.c b/dlls/uiautomationcore/uia_main.c
|
||||
index 42014af6035..61e165d83c0 100644
|
||||
index 2dada95af80..a32ef552f15 100644
|
||||
--- a/dlls/uiautomationcore/uia_main.c
|
||||
+++ b/dlls/uiautomationcore/uia_main.c
|
||||
@@ -1,4 +1,5 @@
|
||||
@@ -121,5 +121,5 @@ index 42014af6035..61e165d83c0 100644
|
||||
}
|
||||
|
||||
--
|
||||
2.20.1
|
||||
2.33.0
|
||||
|
||||
|
@@ -1,27 +0,0 @@
|
||||
From ebf3df9837ac6707fe831722c7ed24ccd80f95ce Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Crider <gloriouseggroll@gmail.com>
|
||||
Date: Sat, 29 May 2021 14:39:08 -0600
|
||||
Subject: [PATCH] api-ms-win-core-psapi-l1-1-0: Add K32GetModuleBaseNameW and
|
||||
K32GetModuleInformation.
|
||||
|
||||
Needed for Mass Effect Legendary Edition.
|
||||
|
||||
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51199
|
||||
Signed-off-by: Thomas Crider <gloriouseggroll@gmail.com>
|
||||
---
|
||||
.../api-ms-win-core-psapi-l1-1-0.spec | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/dlls/api-ms-win-core-psapi-l1-1-0/api-ms-win-core-psapi-l1-1-0.spec b/dlls/api-ms-win-core-psapi-l1-1-0/api-ms-win-core-psapi-l1-1-0.spec
|
||||
index c54c1077843..321fc3fe928 100644
|
||||
--- a/dlls/api-ms-win-core-psapi-l1-1-0/api-ms-win-core-psapi-l1-1-0.spec
|
||||
+++ b/dlls/api-ms-win-core-psapi-l1-1-0/api-ms-win-core-psapi-l1-1-0.spec
|
||||
@@ -14,3 +14,5 @@
|
||||
@ stdcall K32QueryWorkingSet(long ptr long) kernel32.K32QueryWorkingSet
|
||||
@ stdcall K32QueryWorkingSetEx(long ptr long) kernel32.K32QueryWorkingSetEx
|
||||
@ stdcall QueryFullProcessImageNameW(ptr long ptr ptr) kernel32.QueryFullProcessImageNameW
|
||||
+@ stdcall K32GetModuleBaseNameW(long long ptr long) kernel32.K32GetModuleBaseNameW
|
||||
+@ stdcall K32GetModuleInformation(long long ptr long) kernel32.K32GetModuleInformation
|
||||
--
|
||||
2.30.2
|
||||
|
@@ -1,25 +0,0 @@
|
||||
From c96b3a0632721f8849fb1d8404272b5007c1d1b4 Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Crider <gloriouseggroll@gmail.com>
|
||||
Date: Sat, 29 May 2021 14:39:09 -0600
|
||||
Subject: [PATCH] api-ms-win-core-psapi-ansi-l1-1-0: add K32GetModuleBaseNameA
|
||||
|
||||
Needed for Mass Effect Legendary Edition.
|
||||
|
||||
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51199
|
||||
Signed-off-by: Thomas Crider <gloriouseggroll@gmail.com>
|
||||
---
|
||||
.../api-ms-win-core-psapi-ansi-l1-1-0.spec | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/dlls/api-ms-win-core-psapi-ansi-l1-1-0/api-ms-win-core-psapi-ansi-l1-1-0.spec b/dlls/api-ms-win-core-psapi-ansi-l1-1-0/api-ms-win-core-psapi-ansi-l1-1-0.spec
|
||||
index e4f758581f6..340198c6edf 100644
|
||||
--- a/dlls/api-ms-win-core-psapi-ansi-l1-1-0/api-ms-win-core-psapi-ansi-l1-1-0.spec
|
||||
+++ b/dlls/api-ms-win-core-psapi-ansi-l1-1-0/api-ms-win-core-psapi-ansi-l1-1-0.spec
|
||||
@@ -4,3 +4,4 @@
|
||||
@ stdcall K32GetMappedFileNameA(long ptr ptr long) kernel32.K32GetMappedFileNameA
|
||||
@ stdcall K32GetProcessImageFileNameA(long ptr long) kernel32.K32GetProcessImageFileNameA
|
||||
@ stdcall QueryFullProcessImageNameA(ptr long ptr ptr) kernel32.QueryFullProcessImageNameA
|
||||
+@ stdcall K32GetModuleBaseNameA(long long ptr long) kernel32.K32GetModuleBaseNameA
|
||||
--
|
||||
2.30.2
|
||||
|
@@ -1 +0,0 @@
|
||||
Fixes: [51199] Add missing api-ms-win-core-psapi forwards
|
@@ -1,4 +1,4 @@
|
||||
From 50bd67fb1fd718eaaf9f5600fba7ab86e4b71a76 Mon Sep 17 00:00:00 2001
|
||||
From a5045503cf3310058cc64814ff9626f4877a13bb Mon Sep 17 00:00:00 2001
|
||||
From: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
Date: Fri, 5 Jul 2019 13:20:23 +0800
|
||||
Subject: [PATCH] cryptext: Implement CryptExtOpenCER.
|
||||
@@ -17,10 +17,10 @@ Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
create mode 100644 dlls/cryptext/tests/cryptext.c
|
||||
|
||||
diff --git a/configure b/configure
|
||||
index 2b20133cd65..f3ef3aef3a9 100755
|
||||
index db592f0868d..ba13abacc46 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -20350,6 +20350,7 @@ wine_fn_config_makefile dlls/crypt32/tests enable_tests
|
||||
@@ -20291,6 +20291,7 @@ wine_fn_config_makefile dlls/crypt32/tests enable_tests
|
||||
wine_fn_config_makefile dlls/cryptdlg enable_cryptdlg
|
||||
wine_fn_config_makefile dlls/cryptdll enable_cryptdll
|
||||
wine_fn_config_makefile dlls/cryptext enable_cryptext
|
||||
@@ -29,10 +29,10 @@ index 2b20133cd65..f3ef3aef3a9 100755
|
||||
wine_fn_config_makefile dlls/cryptnet/tests enable_tests
|
||||
wine_fn_config_makefile dlls/cryptsp enable_cryptsp
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 24f5c8847d6..f71fb6f401d 100644
|
||||
index d449b88fb19..af75e0e80ab 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -3083,6 +3083,7 @@ WINE_CONFIG_MAKEFILE(dlls/crypt32/tests)
|
||||
@@ -3029,6 +3029,7 @@ WINE_CONFIG_MAKEFILE(dlls/crypt32/tests)
|
||||
WINE_CONFIG_MAKEFILE(dlls/cryptdlg)
|
||||
WINE_CONFIG_MAKEFILE(dlls/cryptdll)
|
||||
WINE_CONFIG_MAKEFILE(dlls/cryptext)
|
||||
@@ -41,7 +41,7 @@ index 24f5c8847d6..f71fb6f401d 100644
|
||||
WINE_CONFIG_MAKEFILE(dlls/cryptnet/tests)
|
||||
WINE_CONFIG_MAKEFILE(dlls/cryptsp)
|
||||
diff --git a/dlls/cryptext/Makefile.in b/dlls/cryptext/Makefile.in
|
||||
index 3acce60ae88..590074a806f 100644
|
||||
index 0ec2b8a2045..76accca43eb 100644
|
||||
--- a/dlls/cryptext/Makefile.in
|
||||
+++ b/dlls/cryptext/Makefile.in
|
||||
@@ -1,4 +1,5 @@
|
||||
@@ -49,10 +49,10 @@ index 3acce60ae88..590074a806f 100644
|
||||
+MODULE = cryptext.dll
|
||||
+IMPORTS = crypt32 cryptui user32
|
||||
|
||||
EXTRADLLFLAGS = -mno-cygwin -Wb,--prefer-native
|
||||
EXTRADLLFLAGS = -Wb,--prefer-native
|
||||
|
||||
diff --git a/dlls/cryptext/cryptext.spec b/dlls/cryptext/cryptext.spec
|
||||
index 0dba38e3934..911ab2f4ba4 100644
|
||||
index ee3e155f457..24b4794c198 100644
|
||||
--- a/dlls/cryptext/cryptext.spec
|
||||
+++ b/dlls/cryptext/cryptext.spec
|
||||
@@ -12,8 +12,8 @@
|
||||
@@ -227,5 +227,5 @@ index 00000000000..cc62a772b59
|
||||
+ test_CryptExtOpenCER();
|
||||
+}
|
||||
--
|
||||
2.20.1
|
||||
2.33.0
|
||||
|
||||
|
@@ -0,0 +1,254 @@
|
||||
From e3a6b75cbce69e18742135fdd8e105132d8ca9dd 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
|
||||
|
||||
Wine-bug: https://bugs.winehq.org/show_bug.cgi?id=50210
|
||||
|
||||
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(-)
|
||||
|
||||
diff --git a/dlls/d3dx11_42/Makefile.in b/dlls/d3dx11_42/Makefile.in
|
||||
index 7fcce18a8e1..78ca5f707a7 100644
|
||||
--- a/dlls/d3dx11_42/Makefile.in
|
||||
+++ b/dlls/d3dx11_42/Makefile.in
|
||||
@@ -2,6 +2,7 @@ EXTRADEFS = -DD3DX11_SDK_VERSION=42
|
||||
MODULE = d3dx11_42.dll
|
||||
IMPORTLIB = d3dx11_42
|
||||
IMPORTS = d3dcompiler
|
||||
+DELAYIMPORTS = windowscodecs
|
||||
PARENTSRC = ../d3dx11_43
|
||||
|
||||
EXTRADLLFLAGS = -Wb,--prefer-native
|
||||
diff --git a/dlls/d3dx11_43/Makefile.in b/dlls/d3dx11_43/Makefile.in
|
||||
index ccd4319ace2..6854c73ebcb 100644
|
||||
--- a/dlls/d3dx11_43/Makefile.in
|
||||
+++ b/dlls/d3dx11_43/Makefile.in
|
||||
@@ -2,6 +2,7 @@ EXTRADEFS = -DD3DX11_SDK_VERSION=43
|
||||
MODULE = d3dx11_43.dll
|
||||
IMPORTLIB = d3dx11
|
||||
IMPORTS = d3dcompiler
|
||||
+DELAYIMPORTS = windowscodecs
|
||||
|
||||
EXTRADLLFLAGS = -Wb,--prefer-native
|
||||
|
||||
diff --git a/dlls/d3dx11_43/main.c b/dlls/d3dx11_43/main.c
|
||||
index 950f6d76f5c..00c1db35e42 100644
|
||||
--- a/dlls/d3dx11_43/main.c
|
||||
+++ b/dlls/d3dx11_43/main.c
|
||||
@@ -66,12 +66,3 @@ HRESULT WINAPI D3DX11GetImageInfoFromFileW(const WCHAR *filename, ID3DX11ThreadP
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
-
|
||||
-HRESULT WINAPI D3DX11GetImageInfoFromMemory(const void *src_data, SIZE_T src_data_size, ID3DX11ThreadPump *pump,
|
||||
- D3DX11_IMAGE_INFO *img_info, HRESULT *hresult)
|
||||
-{
|
||||
- FIXME("src_data %p, src_data_size %lu, pump %p, img_info %p, hresult %p stub!\n",
|
||||
- src_data, src_data_size, pump, img_info, hresult);
|
||||
-
|
||||
- return E_NOTIMPL;
|
||||
-}
|
||||
diff --git a/dlls/d3dx11_43/texture.c b/dlls/d3dx11_43/texture.c
|
||||
index ee6808d76d6..8addf4f84d3 100644
|
||||
--- a/dlls/d3dx11_43/texture.c
|
||||
+++ b/dlls/d3dx11_43/texture.c
|
||||
@@ -15,14 +15,190 @@
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
+#define COBJMACROS
|
||||
|
||||
#include "d3dx11.h"
|
||||
#include "d3dcompiler.h"
|
||||
+#include "wincodec.h"
|
||||
|
||||
#include "wine/debug.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(d3dx);
|
||||
|
||||
+HRESULT WINAPI WICCreateImagingFactory_Proxy(UINT sdk_version, IWICImagingFactory **imaging_factory);
|
||||
+
|
||||
+static const struct
|
||||
+{
|
||||
+ const GUID *wic_container_guid;
|
||||
+ D3DX11_IMAGE_FILE_FORMAT d3dx_file_format;
|
||||
+}
|
||||
+file_formats[] =
|
||||
+{
|
||||
+ { &GUID_ContainerFormatBmp, D3DX11_IFF_BMP },
|
||||
+ { &GUID_ContainerFormatJpeg, D3DX11_IFF_JPG },
|
||||
+ { &GUID_ContainerFormatPng, D3DX11_IFF_PNG },
|
||||
+ { &GUID_ContainerFormatDds, D3DX11_IFF_DDS },
|
||||
+ { &GUID_ContainerFormatTiff, D3DX11_IFF_TIFF },
|
||||
+ { &GUID_ContainerFormatGif, D3DX11_IFF_GIF },
|
||||
+ { &GUID_ContainerFormatWmp, D3DX11_IFF_WMP },
|
||||
+};
|
||||
+
|
||||
+static D3DX11_IMAGE_FILE_FORMAT wic_container_guid_to_file_format(GUID *container_format)
|
||||
+{
|
||||
+ unsigned int i;
|
||||
+
|
||||
+ for (i = 0; i < ARRAY_SIZE(file_formats); ++i)
|
||||
+ {
|
||||
+ if (IsEqualGUID(file_formats[i].wic_container_guid, container_format))
|
||||
+ return file_formats[i].d3dx_file_format;
|
||||
+ }
|
||||
+ return D3DX11_IFF_FORCE_DWORD;
|
||||
+}
|
||||
+
|
||||
+static D3D11_RESOURCE_DIMENSION wic_dimension_to_d3dx11_dimension(WICDdsDimension wic_dimension)
|
||||
+{
|
||||
+ switch (wic_dimension)
|
||||
+ {
|
||||
+ case WICDdsTexture1D:
|
||||
+ return D3D11_RESOURCE_DIMENSION_TEXTURE1D;
|
||||
+ case WICDdsTexture2D:
|
||||
+ case WICDdsTextureCube:
|
||||
+ return D3D11_RESOURCE_DIMENSION_TEXTURE2D;
|
||||
+ case WICDdsTexture3D:
|
||||
+ return D3D11_RESOURCE_DIMENSION_TEXTURE3D;
|
||||
+ default:
|
||||
+ return D3D11_RESOURCE_DIMENSION_UNKNOWN;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static const DXGI_FORMAT to_be_converted_format[] =
|
||||
+{
|
||||
+ DXGI_FORMAT_UNKNOWN,
|
||||
+ DXGI_FORMAT_R8_UNORM,
|
||||
+ DXGI_FORMAT_R8G8_UNORM,
|
||||
+ DXGI_FORMAT_B5G6R5_UNORM,
|
||||
+ DXGI_FORMAT_B4G4R4A4_UNORM,
|
||||
+ DXGI_FORMAT_B5G5R5A1_UNORM,
|
||||
+ DXGI_FORMAT_B8G8R8X8_UNORM,
|
||||
+ DXGI_FORMAT_B8G8R8A8_UNORM
|
||||
+};
|
||||
+
|
||||
+static DXGI_FORMAT get_d3dx11_dds_format(DXGI_FORMAT format)
|
||||
+{
|
||||
+ unsigned int i;
|
||||
+
|
||||
+ for (i = 0; i < ARRAY_SIZE(to_be_converted_format); ++i)
|
||||
+ {
|
||||
+ if (format == to_be_converted_format[i])
|
||||
+ return DXGI_FORMAT_R8G8B8A8_UNORM;
|
||||
+ }
|
||||
+ return 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;
|
||||
+ WICDdsParameters dds_params;
|
||||
+ IWICStream *stream = NULL;
|
||||
+ unsigned int frame_count;
|
||||
+ GUID container_format;
|
||||
+ HRESULT hr;
|
||||
+
|
||||
+ TRACE("src_data %p, src_data_size %lu, pump %p, img_info %p, hresult %p.\n",
|
||||
+ src_data, src_data_size, pump, img_info, hresult);
|
||||
+
|
||||
+ if (!src_data || !src_data_size || !img_info)
|
||||
+ return E_FAIL;
|
||||
+ if (pump)
|
||||
+ FIXME("Thread pump is not supported yet.\n");
|
||||
+
|
||||
+ WICCreateImagingFactory_Proxy(WINCODEC_SDK_VERSION, &factory);
|
||||
+ IWICImagingFactory_CreateStream(factory, &stream);
|
||||
+ hr = IWICStream_InitializeFromMemory(stream, (BYTE *)src_data, src_data_size);
|
||||
+ if (FAILED(hr))
|
||||
+ {
|
||||
+ WARN("Failed to initialize stream.\n");
|
||||
+ goto end;
|
||||
+ }
|
||||
+ hr = IWICImagingFactory_CreateDecoderFromStream(factory, (IStream *)stream, NULL, 0, &decoder);
|
||||
+ if (FAILED(hr))
|
||||
+ goto end;
|
||||
+
|
||||
+ hr = IWICBitmapDecoder_GetContainerFormat(decoder, &container_format);
|
||||
+ if (FAILED(hr))
|
||||
+ goto end;
|
||||
+ img_info->ImageFileFormat = wic_container_guid_to_file_format(&container_format);
|
||||
+ if (img_info->ImageFileFormat == D3DX11_IFF_FORCE_DWORD)
|
||||
+ {
|
||||
+ hr = E_FAIL;
|
||||
+ WARN("Unsupported image file format %s.\n", debugstr_guid(&container_format));
|
||||
+ 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);
|
||||
+ if (FAILED(hr))
|
||||
+ goto end;
|
||||
+ hr = IWICDdsDecoder_GetParameters(dds_decoder, &dds_params);
|
||||
+ if (FAILED(hr))
|
||||
+ goto end;
|
||||
+ img_info->ArraySize = dds_params.ArraySize;
|
||||
+ img_info->Depth = dds_params.Depth;
|
||||
+ img_info->MipLevels = dds_params.MipLevels;
|
||||
+ img_info->ResourceDimension = wic_dimension_to_d3dx11_dimension(dds_params.Dimension);
|
||||
+ img_info->Format = get_d3dx11_dds_format(dds_params.DxgiFormat);
|
||||
+ img_info->MiscFlags = 0;
|
||||
+ if (dds_params.Dimension == WICDdsTextureCube)
|
||||
+ {
|
||||
+ img_info->MiscFlags = D3D11_RESOURCE_MISC_TEXTURECUBE;
|
||||
+ img_info->ArraySize *= 6;
|
||||
+ }
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ img_info->ArraySize = 1;
|
||||
+ img_info->Depth = 1;
|
||||
+ img_info->MipLevels = 1;
|
||||
+ img_info->ResourceDimension = D3D11_RESOURCE_DIMENSION_TEXTURE2D;
|
||||
+ img_info->Format = DXGI_FORMAT_R8G8B8A8_UNORM;
|
||||
+ img_info->MiscFlags = 0;
|
||||
+ }
|
||||
+
|
||||
+end:
|
||||
+ if (dds_decoder)
|
||||
+ IWICDdsDecoder_Release(dds_decoder);
|
||||
+ if (frame)
|
||||
+ IWICBitmapFrameDecode_Release(frame);
|
||||
+ if (decoder)
|
||||
+ IWICBitmapDecoder_Release(decoder);
|
||||
+ if (stream)
|
||||
+ IWICStream_Release(stream);
|
||||
+ if (factory)
|
||||
+ IWICImagingFactory_Release(factory);
|
||||
+
|
||||
+ if (hr != S_OK)
|
||||
+ {
|
||||
+ WARN("Invalid or unsupported image file.\n");
|
||||
+ return E_FAIL;
|
||||
+ }
|
||||
+ return S_OK;
|
||||
+}
|
||||
+
|
||||
HRESULT WINAPI D3DX11CreateShaderResourceViewFromMemory(ID3D11Device *device, const void *data,
|
||||
SIZE_T data_size, D3DX11_IMAGE_LOAD_INFO *load_info, ID3DX11ThreadPump *pump,
|
||||
ID3D11ShaderResourceView **view, HRESULT *hresult)
|
||||
--
|
||||
2.33.0
|
||||
|
@@ -0,0 +1,395 @@
|
||||
From 2f65959901f62bfc6a48c683e6eaa5d6ed5f7416 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
|
||||
|
||||
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
---
|
||||
dlls/d3dx11_43/texture.c | 347 ++++++++++++++++++++++++++++++++++++++-
|
||||
1 file changed, 342 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3dx11_43/texture.c b/dlls/d3dx11_43/texture.c
|
||||
index 8addf4f84d3..f47b8583c6c 100644
|
||||
--- a/dlls/d3dx11_43/texture.c
|
||||
+++ b/dlls/d3dx11_43/texture.c
|
||||
@@ -22,6 +22,7 @@
|
||||
#include "wincodec.h"
|
||||
|
||||
#include "wine/debug.h"
|
||||
+#include "wine/heap.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(d3dx);
|
||||
|
||||
@@ -43,6 +44,32 @@ file_formats[] =
|
||||
{ &GUID_ContainerFormatWmp, D3DX11_IFF_WMP },
|
||||
};
|
||||
|
||||
+static const struct
|
||||
+{
|
||||
+ const GUID *wic_guid;
|
||||
+ DXGI_FORMAT dxgi_format;
|
||||
+}
|
||||
+wic_pixel_formats[] =
|
||||
+{
|
||||
+ { &GUID_WICPixelFormatBlackWhite, DXGI_FORMAT_R1_UNORM },
|
||||
+ { &GUID_WICPixelFormat8bppAlpha, DXGI_FORMAT_A8_UNORM },
|
||||
+ { &GUID_WICPixelFormat8bppGray, DXGI_FORMAT_R8_UNORM },
|
||||
+ { &GUID_WICPixelFormat16bppGray, DXGI_FORMAT_R16_UNORM },
|
||||
+ { &GUID_WICPixelFormat16bppGrayHalf, DXGI_FORMAT_R16_FLOAT },
|
||||
+ { &GUID_WICPixelFormat32bppGrayFloat, DXGI_FORMAT_R32_FLOAT },
|
||||
+ { &GUID_WICPixelFormat16bppBGR565, DXGI_FORMAT_B5G6R5_UNORM },
|
||||
+ { &GUID_WICPixelFormat16bppBGRA5551, DXGI_FORMAT_B5G5R5A1_UNORM },
|
||||
+ { &GUID_WICPixelFormat32bppBGR, DXGI_FORMAT_B8G8R8X8_UNORM },
|
||||
+ { &GUID_WICPixelFormat32bppBGRA, DXGI_FORMAT_B8G8R8A8_UNORM },
|
||||
+ { &GUID_WICPixelFormat32bppRGBA, DXGI_FORMAT_R8G8B8A8_UNORM },
|
||||
+ { &GUID_WICPixelFormat32bppRGBA1010102, DXGI_FORMAT_R10G10B10A2_UNORM },
|
||||
+ { &GUID_WICPixelFormat32bppRGBA1010102XR, DXGI_FORMAT_R10G10B10_XR_BIAS_A2_UNORM },
|
||||
+ { &GUID_WICPixelFormat64bppRGBA, DXGI_FORMAT_R16G16B16A16_UNORM },
|
||||
+ { &GUID_WICPixelFormat64bppRGBAHalf, DXGI_FORMAT_R16G16B16A16_FLOAT },
|
||||
+ { &GUID_WICPixelFormat96bppRGBFloat, DXGI_FORMAT_R32G32B32_FLOAT },
|
||||
+ { &GUID_WICPixelFormat128bppRGBAFloat, DXGI_FORMAT_R32G32B32A32_FLOAT }
|
||||
+};
|
||||
+
|
||||
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)
|
||||
return format;
|
||||
}
|
||||
|
||||
+static const DXGI_FORMAT block_compressed_formats[] =
|
||||
+{
|
||||
+ DXGI_FORMAT_BC1_TYPELESS, DXGI_FORMAT_BC1_UNORM, DXGI_FORMAT_BC1_UNORM_SRGB,
|
||||
+ DXGI_FORMAT_BC2_TYPELESS, DXGI_FORMAT_BC2_UNORM, DXGI_FORMAT_BC2_UNORM_SRGB,
|
||||
+ DXGI_FORMAT_BC3_TYPELESS, DXGI_FORMAT_BC3_UNORM, DXGI_FORMAT_BC3_UNORM_SRGB,
|
||||
+ DXGI_FORMAT_BC4_TYPELESS, DXGI_FORMAT_BC4_UNORM, DXGI_FORMAT_BC4_SNORM,
|
||||
+ DXGI_FORMAT_BC5_TYPELESS, DXGI_FORMAT_BC5_UNORM, DXGI_FORMAT_BC5_SNORM,
|
||||
+ DXGI_FORMAT_BC6H_TYPELESS, DXGI_FORMAT_BC6H_UF16, DXGI_FORMAT_BC6H_SF16,
|
||||
+ DXGI_FORMAT_BC7_TYPELESS, DXGI_FORMAT_BC7_UNORM, DXGI_FORMAT_BC7_UNORM_SRGB
|
||||
+};
|
||||
+
|
||||
+static BOOL is_block_compressed(DXGI_FORMAT format)
|
||||
+{
|
||||
+ unsigned int i;
|
||||
+
|
||||
+ for (i = 0; i < ARRAY_SIZE(block_compressed_formats); ++i)
|
||||
+ if (format == block_compressed_formats[i])
|
||||
+ return TRUE;
|
||||
+
|
||||
+ return FALSE;
|
||||
+}
|
||||
+
|
||||
+static unsigned int get_bpp_from_format(DXGI_FORMAT format)
|
||||
+{
|
||||
+ switch (format)
|
||||
+ {
|
||||
+ case DXGI_FORMAT_R32G32B32A32_TYPELESS:
|
||||
+ case DXGI_FORMAT_R32G32B32A32_FLOAT:
|
||||
+ case DXGI_FORMAT_R32G32B32A32_UINT:
|
||||
+ case DXGI_FORMAT_R32G32B32A32_SINT:
|
||||
+ return 128;
|
||||
+ case DXGI_FORMAT_R32G32B32_TYPELESS:
|
||||
+ case DXGI_FORMAT_R32G32B32_FLOAT:
|
||||
+ case DXGI_FORMAT_R32G32B32_UINT:
|
||||
+ case DXGI_FORMAT_R32G32B32_SINT:
|
||||
+ return 96;
|
||||
+ case DXGI_FORMAT_R16G16B16A16_TYPELESS:
|
||||
+ case DXGI_FORMAT_R16G16B16A16_FLOAT:
|
||||
+ case DXGI_FORMAT_R16G16B16A16_UNORM:
|
||||
+ case DXGI_FORMAT_R16G16B16A16_UINT:
|
||||
+ case DXGI_FORMAT_R16G16B16A16_SNORM:
|
||||
+ case DXGI_FORMAT_R16G16B16A16_SINT:
|
||||
+ case DXGI_FORMAT_R32G32_TYPELESS:
|
||||
+ case DXGI_FORMAT_R32G32_FLOAT:
|
||||
+ case DXGI_FORMAT_R32G32_UINT:
|
||||
+ case DXGI_FORMAT_R32G32_SINT:
|
||||
+ case DXGI_FORMAT_R32G8X24_TYPELESS:
|
||||
+ case DXGI_FORMAT_D32_FLOAT_S8X24_UINT:
|
||||
+ case DXGI_FORMAT_R32_FLOAT_X8X24_TYPELESS:
|
||||
+ case DXGI_FORMAT_X32_TYPELESS_G8X24_UINT:
|
||||
+ case DXGI_FORMAT_Y416:
|
||||
+ case DXGI_FORMAT_Y210:
|
||||
+ case DXGI_FORMAT_Y216:
|
||||
+ return 64;
|
||||
+ case DXGI_FORMAT_R10G10B10A2_TYPELESS:
|
||||
+ case DXGI_FORMAT_R10G10B10A2_UNORM:
|
||||
+ case DXGI_FORMAT_R10G10B10A2_UINT:
|
||||
+ case DXGI_FORMAT_R11G11B10_FLOAT:
|
||||
+ case DXGI_FORMAT_R8G8B8A8_TYPELESS:
|
||||
+ case DXGI_FORMAT_R8G8B8A8_UNORM:
|
||||
+ case DXGI_FORMAT_R8G8B8A8_UNORM_SRGB:
|
||||
+ case DXGI_FORMAT_R8G8B8A8_UINT:
|
||||
+ case DXGI_FORMAT_R8G8B8A8_SNORM:
|
||||
+ case DXGI_FORMAT_R8G8B8A8_SINT:
|
||||
+ case DXGI_FORMAT_R16G16_TYPELESS:
|
||||
+ case DXGI_FORMAT_R16G16_FLOAT:
|
||||
+ case DXGI_FORMAT_R16G16_UNORM:
|
||||
+ case DXGI_FORMAT_R16G16_UINT:
|
||||
+ case DXGI_FORMAT_R16G16_SNORM:
|
||||
+ case DXGI_FORMAT_R16G16_SINT:
|
||||
+ case DXGI_FORMAT_R32_TYPELESS:
|
||||
+ case DXGI_FORMAT_D32_FLOAT:
|
||||
+ case DXGI_FORMAT_R32_FLOAT:
|
||||
+ case DXGI_FORMAT_R32_UINT:
|
||||
+ case DXGI_FORMAT_R32_SINT:
|
||||
+ case DXGI_FORMAT_R24G8_TYPELESS:
|
||||
+ case DXGI_FORMAT_D24_UNORM_S8_UINT:
|
||||
+ case DXGI_FORMAT_R24_UNORM_X8_TYPELESS:
|
||||
+ case DXGI_FORMAT_X24_TYPELESS_G8_UINT:
|
||||
+ case DXGI_FORMAT_R9G9B9E5_SHAREDEXP:
|
||||
+ case DXGI_FORMAT_R8G8_B8G8_UNORM:
|
||||
+ case DXGI_FORMAT_G8R8_G8B8_UNORM:
|
||||
+ case DXGI_FORMAT_B8G8R8A8_UNORM:
|
||||
+ case DXGI_FORMAT_B8G8R8X8_UNORM:
|
||||
+ case DXGI_FORMAT_R10G10B10_XR_BIAS_A2_UNORM:
|
||||
+ case DXGI_FORMAT_B8G8R8A8_TYPELESS:
|
||||
+ case DXGI_FORMAT_B8G8R8A8_UNORM_SRGB:
|
||||
+ case DXGI_FORMAT_B8G8R8X8_TYPELESS:
|
||||
+ case DXGI_FORMAT_B8G8R8X8_UNORM_SRGB:
|
||||
+ case DXGI_FORMAT_AYUV:
|
||||
+ case DXGI_FORMAT_Y410:
|
||||
+ case DXGI_FORMAT_YUY2:
|
||||
+ return 32;
|
||||
+ case DXGI_FORMAT_P010:
|
||||
+ case DXGI_FORMAT_P016:
|
||||
+ return 24;
|
||||
+ case DXGI_FORMAT_R8G8_TYPELESS:
|
||||
+ case DXGI_FORMAT_R8G8_UNORM:
|
||||
+ case DXGI_FORMAT_R8G8_UINT:
|
||||
+ case DXGI_FORMAT_R8G8_SNORM:
|
||||
+ case DXGI_FORMAT_R8G8_SINT:
|
||||
+ case DXGI_FORMAT_R16_TYPELESS:
|
||||
+ case DXGI_FORMAT_R16_FLOAT:
|
||||
+ case DXGI_FORMAT_D16_UNORM:
|
||||
+ case DXGI_FORMAT_R16_UNORM:
|
||||
+ case DXGI_FORMAT_R16_UINT:
|
||||
+ case DXGI_FORMAT_R16_SNORM:
|
||||
+ case DXGI_FORMAT_R16_SINT:
|
||||
+ case DXGI_FORMAT_B5G6R5_UNORM:
|
||||
+ case DXGI_FORMAT_B5G5R5A1_UNORM:
|
||||
+ case DXGI_FORMAT_A8P8:
|
||||
+ case DXGI_FORMAT_B4G4R4A4_UNORM:
|
||||
+ return 16;
|
||||
+ case DXGI_FORMAT_NV12:
|
||||
+ case DXGI_FORMAT_420_OPAQUE:
|
||||
+ case DXGI_FORMAT_NV11:
|
||||
+ return 12;
|
||||
+ case DXGI_FORMAT_R8_TYPELESS:
|
||||
+ case DXGI_FORMAT_R8_UNORM:
|
||||
+ case DXGI_FORMAT_R8_UINT:
|
||||
+ case DXGI_FORMAT_R8_SNORM:
|
||||
+ case DXGI_FORMAT_R8_SINT:
|
||||
+ case DXGI_FORMAT_A8_UNORM:
|
||||
+ case DXGI_FORMAT_AI44:
|
||||
+ case DXGI_FORMAT_IA44:
|
||||
+ case DXGI_FORMAT_P8:
|
||||
+ case DXGI_FORMAT_BC2_TYPELESS:
|
||||
+ case DXGI_FORMAT_BC2_UNORM:
|
||||
+ case DXGI_FORMAT_BC2_UNORM_SRGB:
|
||||
+ case DXGI_FORMAT_BC3_TYPELESS:
|
||||
+ case DXGI_FORMAT_BC3_UNORM:
|
||||
+ case DXGI_FORMAT_BC3_UNORM_SRGB:
|
||||
+ case DXGI_FORMAT_BC5_TYPELESS:
|
||||
+ case DXGI_FORMAT_BC5_UNORM:
|
||||
+ case DXGI_FORMAT_BC5_SNORM:
|
||||
+ case DXGI_FORMAT_BC6H_TYPELESS:
|
||||
+ case DXGI_FORMAT_BC6H_UF16:
|
||||
+ case DXGI_FORMAT_BC6H_SF16:
|
||||
+ case DXGI_FORMAT_BC7_TYPELESS:
|
||||
+ case DXGI_FORMAT_BC7_UNORM:
|
||||
+ case DXGI_FORMAT_BC7_UNORM_SRGB:
|
||||
+ return 8;
|
||||
+ case DXGI_FORMAT_BC1_TYPELESS:
|
||||
+ case DXGI_FORMAT_BC1_UNORM:
|
||||
+ case DXGI_FORMAT_BC1_UNORM_SRGB:
|
||||
+ case DXGI_FORMAT_BC4_TYPELESS:
|
||||
+ case DXGI_FORMAT_BC4_UNORM:
|
||||
+ case DXGI_FORMAT_BC4_SNORM:
|
||||
+ return 4;
|
||||
+ case DXGI_FORMAT_R1_UNORM:
|
||||
+ return 1;
|
||||
+ default:
|
||||
+ return 0;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static const GUID *dxgi_format_to_wic_guid(DXGI_FORMAT format)
|
||||
+{
|
||||
+ unsigned int i;
|
||||
+
|
||||
+ for (i = 0; i < ARRAY_SIZE(wic_pixel_formats); ++i)
|
||||
+ {
|
||||
+ if (wic_pixel_formats[i].dxgi_format == format)
|
||||
+ return wic_pixel_formats[i].wic_guid;
|
||||
+ }
|
||||
+
|
||||
+ return NULL;
|
||||
+}
|
||||
+
|
||||
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
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
-HRESULT WINAPI D3DX11CreateTextureFromMemory(ID3D11Device *device, const void *data,
|
||||
- SIZE_T data_size, D3DX11_IMAGE_LOAD_INFO *load_info, ID3DX11ThreadPump *pump,
|
||||
+HRESULT WINAPI D3DX11CreateTextureFromMemory(ID3D11Device *device, const void *src_data,
|
||||
+ SIZE_T src_data_size, D3DX11_IMAGE_LOAD_INFO *load_info, ID3DX11ThreadPump *pump,
|
||||
ID3D11Resource **texture, HRESULT *hresult)
|
||||
{
|
||||
- FIXME("device %p, data %p, data_size %lu, load_info %p, pump %p, texture %p, hresult %p stub.\n",
|
||||
- device, data, data_size, load_info, pump, texture, hresult);
|
||||
+ unsigned int frame_count, width, height, stride, frame_size;
|
||||
+ IWICFormatConverter *converter = NULL;
|
||||
+ IWICDdsFrameDecode *dds_frame = NULL;
|
||||
+ D3D11_TEXTURE2D_DESC texture_2d_desc;
|
||||
+ D3D11_SUBRESOURCE_DATA resource_data;
|
||||
+ IWICBitmapFrameDecode *frame = NULL;
|
||||
+ IWICImagingFactory *factory = NULL;
|
||||
+ IWICBitmapDecoder *decoder = NULL;
|
||||
+ ID3D11Texture2D *texture_2d;
|
||||
+ D3DX11_IMAGE_INFO img_info;
|
||||
+ IWICStream *stream = NULL;
|
||||
+ const GUID *dst_format;
|
||||
+ BYTE *buffer = NULL;
|
||||
+ BOOL can_convert;
|
||||
+ GUID src_format;
|
||||
+ HRESULT hr;
|
||||
|
||||
- return E_NOTIMPL;
|
||||
+ TRACE("device %p, src_data %p, src_data_size %lu, load_info %p, pump %p, texture %p, hresult %p.\n",
|
||||
+ device, src_data, src_data_size, load_info, pump, texture, hresult);
|
||||
+
|
||||
+ 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)
|
||||
+ {
|
||||
+ FIXME("Cube map is not supported.\n");
|
||||
+ return E_FAIL;
|
||||
+ }
|
||||
+
|
||||
+ if (FAILED(hr = WICCreateImagingFactory_Proxy(WINCODEC_SDK_VERSION, &factory)))
|
||||
+ goto end;
|
||||
+ if (FAILED(hr = IWICImagingFactory_CreateStream(factory, &stream)))
|
||||
+ goto end;
|
||||
+ if (FAILED(hr = IWICStream_InitializeFromMemory(stream, (BYTE *)src_data, src_data_size)))
|
||||
+ goto end;
|
||||
+ if (FAILED(hr = IWICImagingFactory_CreateDecoderFromStream(factory, (IStream *)stream, NULL, 0, &decoder)))
|
||||
+ goto end;
|
||||
+ if (FAILED(hr = IWICBitmapDecoder_GetFrameCount(decoder, &frame_count)) || !frame_count)
|
||||
+ goto end;
|
||||
+ if (FAILED(hr = IWICBitmapDecoder_GetFrame(decoder, 0, &frame)))
|
||||
+ goto end;
|
||||
+ if (FAILED(hr = IWICBitmapFrameDecode_GetPixelFormat(frame, &src_format)))
|
||||
+ goto end;
|
||||
+
|
||||
+ width = img_info.Width;
|
||||
+ height = img_info.Height;
|
||||
+ if (is_block_compressed(img_info.Format))
|
||||
+ {
|
||||
+ width = (width + 3) & ~3;
|
||||
+ height = (height + 3) & ~3;
|
||||
+ }
|
||||
+ stride = (width * get_bpp_from_format(img_info.Format) + 7) / 8;
|
||||
+ frame_size = stride * height;
|
||||
+
|
||||
+ if (!(buffer = heap_alloc(frame_size)))
|
||||
+ {
|
||||
+ hr = E_FAIL;
|
||||
+ goto end;
|
||||
+ }
|
||||
+
|
||||
+ if (is_block_compressed(img_info.Format))
|
||||
+ {
|
||||
+ if (FAILED(hr = IWICBitmapFrameDecode_QueryInterface(frame, &IID_IWICDdsFrameDecode, (void **)&dds_frame)))
|
||||
+ goto end;
|
||||
+ if (FAILED(hr = IWICDdsFrameDecode_CopyBlocks(dds_frame, NULL, stride * 4, frame_size, buffer)))
|
||||
+ goto end;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ if (!(dst_format = dxgi_format_to_wic_guid(img_info.Format)))
|
||||
+ {
|
||||
+ hr = E_FAIL;
|
||||
+ FIXME("Unsupported DXGI format %#x.\n", img_info.Format);
|
||||
+ goto end;
|
||||
+ }
|
||||
+
|
||||
+ if (IsEqualGUID(&src_format, dst_format))
|
||||
+ {
|
||||
+ if (FAILED(hr = IWICBitmapFrameDecode_CopyPixels(frame, NULL, stride, frame_size, buffer)))
|
||||
+ goto end;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ if (FAILED(hr = IWICImagingFactory_CreateFormatConverter(factory, &converter)))
|
||||
+ goto end;
|
||||
+ if (FAILED(hr = IWICFormatConverter_CanConvert(converter, &src_format, dst_format, &can_convert)))
|
||||
+ goto end;
|
||||
+ if (!can_convert)
|
||||
+ {
|
||||
+ WARN("Format converting %s to %s is not supported by WIC.\n",
|
||||
+ debugstr_guid(&src_format), debugstr_guid(dst_format));
|
||||
+ goto end;
|
||||
+ }
|
||||
+ if (FAILED(hr = IWICFormatConverter_Initialize(converter, (IWICBitmapSource *)frame, dst_format,
|
||||
+ WICBitmapDitherTypeErrorDiffusion, 0, 0, WICBitmapPaletteTypeCustom)))
|
||||
+ goto end;
|
||||
+ if (FAILED(hr = IWICFormatConverter_CopyPixels(converter, NULL, stride, frame_size, buffer)))
|
||||
+ goto end;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ memset(&texture_2d_desc, 0, sizeof(texture_2d_desc));
|
||||
+ texture_2d_desc.Width = width;
|
||||
+ texture_2d_desc.Height = height;
|
||||
+ texture_2d_desc.MipLevels = 1;
|
||||
+ texture_2d_desc.ArraySize = img_info.ArraySize;
|
||||
+ texture_2d_desc.Format = img_info.Format;
|
||||
+ texture_2d_desc.SampleDesc.Count = 1;
|
||||
+ texture_2d_desc.Usage = D3D11_USAGE_DEFAULT;
|
||||
+ texture_2d_desc.BindFlags = D3D11_BIND_SHADER_RESOURCE;
|
||||
+ texture_2d_desc.MiscFlags = img_info.MiscFlags;
|
||||
+
|
||||
+ resource_data.pSysMem = buffer;
|
||||
+ resource_data.SysMemPitch = stride;
|
||||
+ resource_data.SysMemSlicePitch = frame_size;
|
||||
+
|
||||
+ if (FAILED(hr = ID3D11Device_CreateTexture2D(device, &texture_2d_desc, &resource_data, &texture_2d)))
|
||||
+ goto end;
|
||||
+
|
||||
+ *texture = (ID3D11Resource *)texture_2d;
|
||||
+ hr = S_OK;
|
||||
+
|
||||
+end:
|
||||
+ if (converter)
|
||||
+ IWICFormatConverter_Release(converter);
|
||||
+ if (dds_frame)
|
||||
+ IWICDdsFrameDecode_Release(dds_frame);
|
||||
+ if (buffer)
|
||||
+ heap_free(buffer);
|
||||
+ if (frame)
|
||||
+ IWICBitmapFrameDecode_Release(frame);
|
||||
+ if (decoder)
|
||||
+ IWICBitmapDecoder_Release(decoder);
|
||||
+ if (stream)
|
||||
+ IWICStream_Release(stream);
|
||||
+ if (factory)
|
||||
+ IWICImagingFactory_Release(factory);
|
||||
+
|
||||
+ return hr;
|
||||
}
|
||||
|
||||
HRESULT WINAPI D3DX11SaveTextureToFileW(ID3D11DeviceContext *context, ID3D11Resource *texture,
|
||||
--
|
||||
2.30.2
|
||||
|
@@ -0,0 +1,4 @@
|
||||
Fixes: [50210] - Implement D3DX11GetImageInfoFromMemory
|
||||
Fixes: [45533] - Implement D3DX11CreateTextureFromMemory
|
||||
|
||||
# This patchset will need to wait until the new wined3dx dll implemented.
|
@@ -1,4 +1,4 @@
|
||||
From 27517cacf7df657e32e7ca7068c3e86723cb4a3c Mon Sep 17 00:00:00 2001
|
||||
From 6c3aa646aff81104eb7783138a71d4bb8cf192a7 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 | 331 ++++++++++++++++++++++++++++++++++++++++-
|
||||
1 file changed, 328 insertions(+), 3 deletions(-)
|
||||
dlls/d3dx9_36/shader.c | 332 ++++++++++++++++++++++++++++++++++++++++-
|
||||
1 file changed, 327 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3dx9_36/shader.c b/dlls/d3dx9_36/shader.c
|
||||
index c59fc791e..79d47b95c 100644
|
||||
index fe0f99180ac..54d0b158568 100644
|
||||
--- a/dlls/d3dx9_36/shader.c
|
||||
+++ b/dlls/d3dx9_36/shader.c
|
||||
@@ -1,6 +1,7 @@
|
||||
@@ -30,11 +30,10 @@ index c59fc791e..79d47b95c 100644
|
||||
#include "d3dx9_private.h"
|
||||
#include "d3dcommon.h"
|
||||
#include "d3dcompiler.h"
|
||||
@@ -2138,10 +2139,334 @@ HRESULT WINAPI D3DXGetShaderSamplers(const DWORD *byte_code, const char **sample
|
||||
@@ -2336,13 +2337,334 @@ HRESULT WINAPI D3DXGetShaderSamplers(const DWORD *byte_code, const char **sample
|
||||
return D3D_OK;
|
||||
}
|
||||
|
||||
+
|
||||
+static const char *decl_usage[] = { "position", "blendweight", "blendindices", "normal", "psize", "texcoord",
|
||||
+ "tangent", "binormal", "tessfactor", "positiont", "color" };
|
||||
+
|
||||
@@ -299,10 +298,11 @@ index c59fc791e..79d47b95c 100644
|
||||
+ { D3DSIO_COMMENT, "", 0, instr_comment, 0x0100, 0xFFFF }
|
||||
+};
|
||||
+
|
||||
HRESULT WINAPI D3DXDisassembleShader(const DWORD *shader, BOOL colorcode, const char *comments, ID3DXBuffer **disassembly)
|
||||
HRESULT WINAPI D3DXDisassembleShader(const DWORD *shader, BOOL colorcode, const char *comments,
|
||||
- ID3DXBuffer **buffer)
|
||||
+ ID3DXBuffer **disassembly)
|
||||
{
|
||||
- FIXME("%p %d %s %p: stub\n", shader, colorcode, debugstr_a(comments), disassembly);
|
||||
- return E_OUTOFMEMORY;
|
||||
- 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,7 +314,9 @@ index c59fc791e..79d47b95c 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;
|
||||
@@ -331,7 +333,7 @@ index c59fc791e..79d47b95c 100644
|
||||
+ if ((buf - buffer + 128) > capacity)
|
||||
+ {
|
||||
+ UINT count = buf - buffer;
|
||||
+ char *new_buffer = HeapReAlloc(GetProcessHeap(), 0, buffer, capacity * 2);
|
||||
+ char *new_buffer = HeapReAlloc(GetProcessHeap(), 0, buffer, capacity * 2);
|
||||
+ if (!new_buffer)
|
||||
+ {
|
||||
+ HeapFree(GetProcessHeap(), 0, buffer);
|
||||
@@ -368,5 +370,5 @@ index c59fc791e..79d47b95c 100644
|
||||
|
||||
struct d3dx9_texture_shader
|
||||
--
|
||||
2.21.0
|
||||
2.32.0
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 30c01cb08a47b706a4ae49ddbd28f39cb065b5c9 Mon Sep 17 00:00:00 2001
|
||||
From f73bf747238e157fc73f8b62941d3d8aa4b6bb33 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Mon, 6 Oct 2014 05:06:06 +0200
|
||||
Subject: [PATCH] dbghelp: Always check for debug symbols in BINDIR.
|
||||
@@ -9,7 +9,7 @@ Subject: [PATCH] dbghelp: Always check for debug symbols in BINDIR.
|
||||
2 files changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/dbghelp/Makefile.in b/dlls/dbghelp/Makefile.in
|
||||
index 076c50323dda..ddb69c96dd42 100644
|
||||
index b2a5e2037e9..7140cc9f181 100644
|
||||
--- a/dlls/dbghelp/Makefile.in
|
||||
+++ b/dlls/dbghelp/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
@@ -19,12 +19,12 @@ index 076c50323dda..ddb69c96dd42 100644
|
||||
+EXTRADEFS = -D_IMAGEHLP_SOURCE_ -DBINDIR="L\"${bindir}\""
|
||||
DELAYIMPORTS = version
|
||||
|
||||
EXTRADLLFLAGS = -mno-cygwin
|
||||
C_SRCS = \
|
||||
diff --git a/dlls/dbghelp/elf_module.c b/dlls/dbghelp/elf_module.c
|
||||
index e44629f016e1..923608f35e31 100644
|
||||
index 553b212c526..3584a27953e 100644
|
||||
--- a/dlls/dbghelp/elf_module.c
|
||||
+++ b/dlls/dbghelp/elf_module.c
|
||||
@@ -1436,6 +1436,7 @@ static BOOL elf_search_and_load_file(struct process* pcs, const WCHAR* filename,
|
||||
@@ -1451,6 +1451,7 @@ static BOOL elf_search_and_load_file(struct process* pcs, const WCHAR* filename,
|
||||
load_elf.elf_info = elf_info;
|
||||
|
||||
ret = search_unix_path(filename, process_getenv(pcs, L"LD_LIBRARY_PATH"), elf_load_file_cb, &load_elf)
|
||||
@@ -33,5 +33,5 @@ index e44629f016e1..923608f35e31 100644
|
||||
}
|
||||
|
||||
--
|
||||
2.26.2
|
||||
2.33.0
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 2c404d618908f4655623611ce720b6b27d0c1de6 Mon Sep 17 00:00:00 2001
|
||||
From 7d5631535b26bea474584a75254da6d91e623e4f Mon Sep 17 00:00:00 2001
|
||||
From: Andrew Church <achurch@achurch.org>
|
||||
Date: Mon, 25 Feb 2019 11:21:03 +1100
|
||||
Subject: [PATCH] dinput: Allow remapping of joystick buttons
|
||||
@@ -18,10 +18,10 @@ Wine-bug: https://bugs.winehq.org/show_bug.cgi?id=35815
|
||||
5 files changed, 42 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/dinput/joystick.c b/dlls/dinput/joystick.c
|
||||
index 2354ff3b822..36086f0035f 100644
|
||||
index d4f5b819471..e1fc80f41bf 100644
|
||||
--- a/dlls/dinput/joystick.c
|
||||
+++ b/dlls/dinput/joystick.c
|
||||
@@ -1034,6 +1034,7 @@ HRESULT setup_dinput_options(JoystickGenericImpl *This, const int *default_axis_
|
||||
@@ -883,6 +883,7 @@ HRESULT setup_dinput_options(JoystickGenericImpl *This, const int *default_axis_
|
||||
int tokens = 0;
|
||||
int axis = 0;
|
||||
int pov = 0;
|
||||
@@ -29,7 +29,7 @@ index 2354ff3b822..36086f0035f 100644
|
||||
|
||||
get_app_key(&hkey, &appkey);
|
||||
|
||||
@@ -1045,6 +1046,34 @@ HRESULT setup_dinput_options(JoystickGenericImpl *This, const int *default_axis_
|
||||
@@ -894,6 +895,34 @@ HRESULT setup_dinput_options(JoystickGenericImpl *This, const int *default_axis_
|
||||
TRACE("setting default deadzone to: \"%s\" %d\n", buffer, This->deadzone);
|
||||
}
|
||||
|
||||
@@ -65,10 +65,10 @@ index 2354ff3b822..36086f0035f 100644
|
||||
if (!This->axis_map) return DIERR_OUTOFMEMORY;
|
||||
|
||||
diff --git a/dlls/dinput/joystick_linux.c b/dlls/dinput/joystick_linux.c
|
||||
index ec4cb94c034..7dc9deff8c4 100644
|
||||
index c439cca81c3..d1194197f66 100644
|
||||
--- a/dlls/dinput/joystick_linux.c
|
||||
+++ b/dlls/dinput/joystick_linux.c
|
||||
@@ -856,10 +856,13 @@ static void joy_polldev( IDirectInputDevice8W *iface )
|
||||
@@ -735,10 +735,13 @@ static void joy_polldev( IDirectInputDevice8W *iface )
|
||||
jse.type,jse.number,jse.value);
|
||||
if (jse.type & JS_EVENT_BUTTON)
|
||||
{
|
||||
@@ -85,10 +85,10 @@ index ec4cb94c034..7dc9deff8c4 100644
|
||||
else if (jse.type & JS_EVENT_AXIS)
|
||||
{
|
||||
diff --git a/dlls/dinput/joystick_linuxinput.c b/dlls/dinput/joystick_linuxinput.c
|
||||
index ef7b160ba58..7830cce3ced 100644
|
||||
index 8279ffbf74a..a6a658ac57b 100644
|
||||
--- a/dlls/dinput/joystick_linuxinput.c
|
||||
+++ b/dlls/dinput/joystick_linuxinput.c
|
||||
@@ -908,6 +908,8 @@ static void joy_polldev( IDirectInputDevice8W *iface )
|
||||
@@ -742,6 +742,8 @@ static void joy_polldev( IDirectInputDevice8W *iface )
|
||||
if (btn & 0x80)
|
||||
{
|
||||
btn &= 0x7F;
|
||||
@@ -98,10 +98,10 @@ index ef7b160ba58..7830cce3ced 100644
|
||||
This->generic.js.rgbButtons[btn] = value = ie.value ? 0x80 : 0x00;
|
||||
}
|
||||
diff --git a/dlls/dinput/joystick_osx.c b/dlls/dinput/joystick_osx.c
|
||||
index 174a78b7fd4..60e3967d921 100644
|
||||
index e8732bd696c..866df41c392 100644
|
||||
--- a/dlls/dinput/joystick_osx.c
|
||||
+++ b/dlls/dinput/joystick_osx.c
|
||||
@@ -844,6 +844,8 @@ static void poll_osx_device_state( IDirectInputDevice8W *iface )
|
||||
@@ -838,6 +838,8 @@ static void poll_osx_device_state( IDirectInputDevice8W *iface )
|
||||
TRACE("valueRef %s val %d oldVal %d newVal %d\n", debugstr_cf(valueRef), val, oldVal, newVal);
|
||||
if (oldVal != newVal)
|
||||
{
|
||||
@@ -109,9 +109,9 @@ index 174a78b7fd4..60e3967d921 100644
|
||||
+
|
||||
inst_id = DIDFT_MAKEINSTANCE(button_idx) | DIDFT_PSHBUTTON;
|
||||
queue_event(iface,inst_id,newVal,GetCurrentTime(),device->generic.base.dinput->evsequence++);
|
||||
}
|
||||
if (device->generic.base.hEvent)
|
||||
diff --git a/dlls/dinput/joystick_private.h b/dlls/dinput/joystick_private.h
|
||||
index 0f191787158..606475759ef 100644
|
||||
index 4fe51d17067..01b35fa40fc 100644
|
||||
--- a/dlls/dinput/joystick_private.h
|
||||
+++ b/dlls/dinput/joystick_private.h
|
||||
@@ -33,6 +33,9 @@
|
||||
@@ -133,5 +133,5 @@ index 0f191787158..606475759ef 100644
|
||||
|
||||
joy_polldev_handler *joy_polldev;
|
||||
--
|
||||
2.30.2
|
||||
2.33.0
|
||||
|
||||
|
@@ -1,144 +0,0 @@
|
||||
From cca287da02e2946705ad89f6e8c052b68199ad31 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Tue, 1 Jun 2021 17:15:44 +1000
|
||||
Subject: [PATCH v3] dpnet: Implement IDirectPlay8Server EnumServiceProviders
|
||||
|
||||
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
---
|
||||
dlls/dpnet/server.c | 14 ++++++-
|
||||
dlls/dpnet/tests/server.c | 86 +++++++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 98 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/dpnet/server.c b/dlls/dpnet/server.c
|
||||
index 977771697ac..26dd76388b1 100644
|
||||
--- a/dlls/dpnet/server.c
|
||||
+++ b/dlls/dpnet/server.c
|
||||
@@ -126,9 +126,19 @@ static HRESULT WINAPI IDirectPlay8ServerImpl_EnumServiceProviders(IDirectPlay8Se
|
||||
PDWORD pcReturned, DWORD dwFlags)
|
||||
{
|
||||
IDirectPlay8ServerImpl *This = impl_from_IDirectPlay8Server(iface);
|
||||
- FIXME("(%p)->(%s %s %p %p %p %d)\n", This, debugstr_guid(pguidServiceProvider), debugstr_guid(pguidApplication),
|
||||
+ TRACE("(%p)->(%s %s %p %p %p %d)\n", This, debugstr_guid(pguidServiceProvider), debugstr_guid(pguidApplication),
|
||||
pSPInfoBuffer, pcbEnumData, pcReturned, dwFlags);
|
||||
- return E_NOTIMPL;
|
||||
+
|
||||
+ if(!This->msghandler)
|
||||
+ return DPNERR_UNINITIALIZED;
|
||||
+
|
||||
+ if(dwFlags)
|
||||
+ FIXME("Unhandled flags %x\n", dwFlags);
|
||||
+
|
||||
+ if(pguidApplication)
|
||||
+ FIXME("Application guid %s is currently being ignored\n", debugstr_guid(pguidApplication));
|
||||
+
|
||||
+ return enum_services_providers(pguidServiceProvider, pSPInfoBuffer, pcbEnumData, pcReturned);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IDirectPlay8ServerImpl_CancelAsyncOperation(IDirectPlay8Server *iface, DPNHANDLE hAsyncHandle, DWORD dwFlags)
|
||||
diff --git a/dlls/dpnet/tests/server.c b/dlls/dpnet/tests/server.c
|
||||
index 74a0e5adfcf..ae7e876522d 100644
|
||||
--- a/dlls/dpnet/tests/server.c
|
||||
+++ b/dlls/dpnet/tests/server.c
|
||||
@@ -184,6 +184,91 @@ static void test_server_info(void)
|
||||
}
|
||||
}
|
||||
|
||||
+static void test_enum_service_providers(void)
|
||||
+{
|
||||
+ DPN_SERVICE_PROVIDER_INFO *serv_prov_info;
|
||||
+ IDirectPlay8Server *server = NULL;
|
||||
+ DWORD items, size;
|
||||
+ DWORD i;
|
||||
+ HRESULT hr;
|
||||
+
|
||||
+ hr = CoCreateInstance( &CLSID_DirectPlay8Server, NULL, CLSCTX_ALL, &IID_IDirectPlay8Server, (LPVOID*)&server);
|
||||
+ ok(hr == S_OK, "Failed to create IDirectPlay8Server object\n");
|
||||
+ if (FAILED(hr))
|
||||
+ return;
|
||||
+
|
||||
+ size = 0;
|
||||
+ items = 0;
|
||||
+ hr = IDirectPlay8Server_EnumServiceProviders(server, NULL, NULL, serv_prov_info, &size, &items, 0);
|
||||
+ ok(hr == DPNERR_UNINITIALIZED, "got %x\n", hr);
|
||||
+
|
||||
+ hr = IDirectPlay8Server_Initialize(server, NULL, DirectPlayMessageHandler, 0);
|
||||
+ ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
+ if (FAILED(hr))
|
||||
+ {
|
||||
+ IDirectPlay8Server_Release(server);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ size = 0;
|
||||
+ items = 0;
|
||||
+
|
||||
+ hr = IDirectPlay8Server_EnumServiceProviders(server, NULL, NULL, NULL, &size, NULL, 0);
|
||||
+ ok(hr == E_POINTER, "IDirectPlay8Server_EnumServiceProviders failed with %x\n", hr);
|
||||
+
|
||||
+ hr = IDirectPlay8Server_EnumServiceProviders(server, NULL, NULL, NULL, NULL, &items, 0);
|
||||
+ ok(hr == E_POINTER, "IDirectPlay8Server_EnumServiceProviders failed with %x\n", hr);
|
||||
+
|
||||
+ hr = IDirectPlay8Server_EnumServiceProviders(server, NULL, NULL, NULL, &size, &items, 0);
|
||||
+ ok(hr == DPNERR_BUFFERTOOSMALL, "IDirectPlay8Server_EnumServiceProviders failed with %x\n", hr);
|
||||
+ ok(size != 0, "size is unexpectedly 0\n");
|
||||
+
|
||||
+ serv_prov_info = HeapAlloc(GetProcessHeap(), 0, size);
|
||||
+
|
||||
+ hr = IDirectPlay8Server_EnumServiceProviders(server, NULL, NULL, serv_prov_info, &size, &items, 0);
|
||||
+ ok(hr == S_OK, "IDirectPlay8Server_EnumServiceProviders failed with %x\n", hr);
|
||||
+ ok(items != 0, "Found unexpectedly no service providers\n");
|
||||
+
|
||||
+ trace("number of items found: %d\n", items);
|
||||
+
|
||||
+ for (i=0;i<items;i++)
|
||||
+ {
|
||||
+ trace("Found Service Provider: %s\n", wine_dbgstr_w(serv_prov_info[i].pwszName));
|
||||
+ trace("Found guid: %s\n", wine_dbgstr_guid(&serv_prov_info[i].guid));
|
||||
+ }
|
||||
+
|
||||
+ ok(HeapFree(GetProcessHeap(), 0, serv_prov_info), "Failed freeing server provider info\n");
|
||||
+
|
||||
+ size = 0;
|
||||
+ items = 0;
|
||||
+
|
||||
+ hr = IDirectPlay8Server_EnumServiceProviders(server, &CLSID_DP8SP_TCPIP, NULL, NULL, &size, &items, 0);
|
||||
+ ok(hr == DPNERR_BUFFERTOOSMALL, "IDirectPlay8Server_EnumServiceProviders failed with %x\n", hr);
|
||||
+ ok(size != 0, "size is unexpectedly 0\n");
|
||||
+
|
||||
+ serv_prov_info = HeapAlloc(GetProcessHeap(), 0, size);
|
||||
+
|
||||
+ hr = IDirectPlay8Server_EnumServiceProviders(server, &CLSID_DP8SP_TCPIP, NULL, serv_prov_info, &size, &items, 0);
|
||||
+ ok(hr == S_OK, "IDirectPlay8Server_EnumServiceProviders failed with %x\n", hr);
|
||||
+ ok(items != 0, "Found unexpectedly no adapter\n");
|
||||
+
|
||||
+
|
||||
+ for (i=0;i<items;i++)
|
||||
+ {
|
||||
+ trace("Found adapter: %s\n", wine_dbgstr_w(serv_prov_info[i].pwszName));
|
||||
+ trace("Found adapter guid: %s\n", wine_dbgstr_guid(&serv_prov_info[i].guid));
|
||||
+ }
|
||||
+
|
||||
+ /* Invalid GUID */
|
||||
+ items = 88;
|
||||
+ hr = IDirectPlay8Server_EnumServiceProviders(server, &appguid, NULL, serv_prov_info, &size, &items, 0);
|
||||
+ ok(hr == DPNERR_DOESNOTEXIST, "IDirectPlay8Peer_EnumServiceProviders failed with %x\n", hr);
|
||||
+ ok(items == 88, "Found adapter %d\n", items);
|
||||
+
|
||||
+ HeapFree(GetProcessHeap(), 0, serv_prov_info);
|
||||
+ IDirectPlay8Server_Release(server);
|
||||
+}
|
||||
+
|
||||
BOOL is_process_elevated(void)
|
||||
{
|
||||
HANDLE token;
|
||||
@@ -398,6 +483,7 @@ START_TEST(server)
|
||||
|
||||
create_server();
|
||||
test_server_info();
|
||||
+ test_enum_service_providers();
|
||||
|
||||
CoUninitialize();
|
||||
|
||||
--
|
||||
2.30.2
|
||||
|
@@ -1 +0,0 @@
|
||||
Fixes: [51221] dpnet: Impelment IDirectPlay8Server EnumServiceProviders.
|
@@ -1,20 +1,20 @@
|
||||
From f02dd0110ae95771a6e44a608c724d964fab7f68 Mon Sep 17 00:00:00 2001
|
||||
From 2af1ec49d958424e2b78f52ae3e3daca1d562b35 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Sat, 28 Mar 2015 08:18:10 +0100
|
||||
Subject: dsound: Apply filters before sound is multiplied to speakers.
|
||||
Subject: [PATCH] dsound: Apply filters before sound is multiplied to speakers.
|
||||
|
||||
Based on a patch by Mark Harmstone.
|
||||
---
|
||||
dlls/dsound/dsound.c | 2 +
|
||||
dlls/dsound/dsound_private.h | 4 +-
|
||||
dlls/dsound/mixer.c | 110 ++++++++++++++++++++++++-----------
|
||||
3 files changed, 81 insertions(+), 35 deletions(-)
|
||||
dlls/dsound/mixer.c | 109 ++++++++++++++++++++++++-----------
|
||||
3 files changed, 80 insertions(+), 35 deletions(-)
|
||||
|
||||
diff --git a/dlls/dsound/dsound.c b/dlls/dsound/dsound.c
|
||||
index 71ede7d8..cc8b4444 100644
|
||||
index 3085d86e5b5..91fa94b943e 100644
|
||||
--- a/dlls/dsound/dsound.c
|
||||
+++ b/dlls/dsound/dsound.c
|
||||
@@ -233,6 +233,8 @@ static ULONG DirectSoundDevice_Release(DirectSoundDevice * device)
|
||||
@@ -234,6 +234,8 @@ static ULONG DirectSoundDevice_Release(DirectSoundDevice * device)
|
||||
if(device->mmdevice)
|
||||
IMMDevice_Release(device->mmdevice);
|
||||
CloseHandle(device->sleepev);
|
||||
@@ -24,10 +24,10 @@ index 71ede7d8..cc8b4444 100644
|
||||
HeapFree(GetProcessHeap(), 0, device->cp_buffer);
|
||||
HeapFree(GetProcessHeap(), 0, device->buffer);
|
||||
diff --git a/dlls/dsound/dsound_private.h b/dlls/dsound/dsound_private.h
|
||||
index c9ae7fd7..371cc5fb 100644
|
||||
index 2408f80ba82..2e23f222b03 100644
|
||||
--- a/dlls/dsound/dsound_private.h
|
||||
+++ b/dlls/dsound/dsound_private.h
|
||||
@@ -90,8 +90,8 @@ struct DirectSoundDevice
|
||||
@@ -89,8 +89,8 @@ struct DirectSoundDevice
|
||||
int speaker_num[DS_MAX_CHANNELS];
|
||||
int num_speakers;
|
||||
int lfe_channel;
|
||||
@@ -39,11 +39,11 @@ index c9ae7fd7..371cc5fb 100644
|
||||
DSVOLUMEPAN volpan;
|
||||
|
||||
diff --git a/dlls/dsound/mixer.c b/dlls/dsound/mixer.c
|
||||
index 1643e7d4..d4dbdc15 100644
|
||||
index 1877d61cbf0..13bff1b9ae7 100644
|
||||
--- a/dlls/dsound/mixer.c
|
||||
+++ b/dlls/dsound/mixer.c
|
||||
@@ -278,23 +278,22 @@ static inline float get_current_sample(const IDirectSoundBufferImpl *dsb,
|
||||
return dsb->get(dsb, mixpos % dsb->buflen, channel);
|
||||
@@ -283,10 +283,9 @@ static inline float get_current_sample(const IDirectSoundBufferImpl *dsb,
|
||||
return dsb->get(dsb, buffer + (mixpos % buflen), channel);
|
||||
}
|
||||
|
||||
-static UINT cp_fields_noresample(IDirectSoundBufferImpl *dsb, UINT count)
|
||||
@@ -51,13 +51,17 @@ index 1643e7d4..d4dbdc15 100644
|
||||
{
|
||||
UINT istride = dsb->pwfx->nBlockAlign;
|
||||
- UINT ostride = dsb->device->pwfx->nChannels * sizeof(float);
|
||||
UINT committed_samples = 0;
|
||||
DWORD channel, i;
|
||||
for (i = 0; i < count; i++)
|
||||
|
||||
@@ -302,17 +301,16 @@ static UINT cp_fields_noresample(IDirectSoundBufferImpl *dsb, UINT count)
|
||||
|
||||
for (; i < count; i++)
|
||||
for (channel = 0; channel < dsb->mix_channels; channel++)
|
||||
- dsb->put(dsb, i * ostride, channel, get_current_sample(dsb,
|
||||
- dsb->sec_mixpos + i * istride, channel));
|
||||
+ put(dsb, i * ostride, channel, get_current_sample(dsb,
|
||||
+ dsb->sec_mixpos + i * istride, channel));
|
||||
- dsb->put(dsb, i * ostride, channel, get_current_sample(dsb, dsb->buffer->memory,
|
||||
+ put(dsb, i * ostride, channel, get_current_sample(dsb, dsb->buffer->memory,
|
||||
dsb->buflen, dsb->sec_mixpos + i * istride, channel));
|
||||
-
|
||||
return count;
|
||||
}
|
||||
|
||||
@@ -71,16 +75,16 @@ index 1643e7d4..d4dbdc15 100644
|
||||
UINT channels = dsb->mix_channels;
|
||||
|
||||
LONG64 freqAcc_start = *freqAccNum;
|
||||
@@ -322,7 +321,7 @@ static UINT cp_fields_resample_lq(IDirectSoundBufferImpl *dsb, UINT count, LONG6
|
||||
float s1 = get_current_sample(dsb, idx, channel);
|
||||
float s2 = get_current_sample(dsb, idx + istride, channel);
|
||||
@@ -340,7 +338,7 @@ static UINT cp_fields_resample_lq(IDirectSoundBufferImpl *dsb, UINT count, LONG6
|
||||
float s1 = get_current_sample(dsb, dsb->buffer->memory, dsb->buflen, idx, channel);
|
||||
float s2 = get_current_sample(dsb, dsb->buffer->memory, dsb->buflen, idx + istride, channel);
|
||||
float result = s1 * cur_freqAcc2 + s2 * cur_freqAcc;
|
||||
- dsb->put(dsb, i * ostride, channel, result);
|
||||
+ put(dsb, i * ostride, channel, result);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -330,11 +329,11 @@ static UINT cp_fields_resample_lq(IDirectSoundBufferImpl *dsb, UINT count, LONG6
|
||||
@@ -348,11 +346,11 @@ static UINT cp_fields_resample_lq(IDirectSoundBufferImpl *dsb, UINT count, LONG6
|
||||
return max_ipos;
|
||||
}
|
||||
|
||||
@@ -91,10 +95,10 @@ index 1643e7d4..d4dbdc15 100644
|
||||
UINT i, channel;
|
||||
UINT istride = dsb->pwfx->nBlockAlign;
|
||||
- UINT ostride = dsb->device->pwfx->nChannels * sizeof(float);
|
||||
UINT committed_samples = 0;
|
||||
|
||||
LONG64 freqAcc_start = *freqAccNum;
|
||||
LONG64 freqAcc_end = freqAcc_start + count * dsb->freqAdjustNum;
|
||||
@@ -395,7 +394,7 @@ static UINT cp_fields_resample_hq(IDirectSoundBufferImpl *dsb, UINT count, LONG6
|
||||
@@ -422,7 +420,7 @@ static UINT cp_fields_resample_hq(IDirectSoundBufferImpl *dsb, UINT count, LONG6
|
||||
float* cache = &intermediate[channel * required_input + ipos];
|
||||
for (j = 0; j < fir_used; j++)
|
||||
sum += fir_copy[j] * cache[j];
|
||||
@@ -103,7 +107,7 @@ index 1643e7d4..d4dbdc15 100644
|
||||
}
|
||||
}
|
||||
|
||||
@@ -404,16 +403,17 @@ static UINT cp_fields_resample_hq(IDirectSoundBufferImpl *dsb, UINT count, LONG6
|
||||
@@ -431,16 +429,17 @@ static UINT cp_fields_resample_hq(IDirectSoundBufferImpl *dsb, UINT count, LONG6
|
||||
return max_ipos;
|
||||
}
|
||||
|
||||
@@ -125,7 +129,7 @@ index 1643e7d4..d4dbdc15 100644
|
||||
|
||||
ipos = dsb->sec_mixpos + adv * dsb->pwfx->nBlockAlign;
|
||||
if (ipos >= dsb->buflen) {
|
||||
@@ -443,6 +443,21 @@ static inline DWORD DSOUND_BufPtrDiff(DWORD buflen, DWORD ptr1, DWORD ptr2)
|
||||
@@ -476,6 +475,21 @@ static inline DWORD DSOUND_BufPtrDiff(DWORD buflen, DWORD ptr1, DWORD ptr2)
|
||||
return buflen + ptr1 - ptr2;
|
||||
}
|
||||
}
|
||||
@@ -147,7 +151,7 @@ index 1643e7d4..d4dbdc15 100644
|
||||
/**
|
||||
* Mix at most the given amount of data into the allocated temporary buffer
|
||||
* of the given secondary buffer, starting from the dsb's first currently
|
||||
@@ -458,34 +473,63 @@ static inline DWORD DSOUND_BufPtrDiff(DWORD buflen, DWORD ptr1, DWORD ptr2)
|
||||
@@ -491,34 +505,63 @@ static inline DWORD DSOUND_BufPtrDiff(DWORD buflen, DWORD ptr1, DWORD ptr2)
|
||||
*/
|
||||
static void DSOUND_MixToTemporary(IDirectSoundBufferImpl *dsb, DWORD frames)
|
||||
{
|
||||
@@ -231,5 +235,5 @@ index 1643e7d4..d4dbdc15 100644
|
||||
|
||||
static void DSOUND_MixerVol(const IDirectSoundBufferImpl *dsb, INT frames)
|
||||
--
|
||||
2.19.1
|
||||
2.33.0
|
||||
|
||||
|
@@ -1,22 +1,22 @@
|
||||
From 43637cb46c48e84e7f1b127ba4427900c76f2470 Mon Sep 17 00:00:00 2001
|
||||
From f4e3bbf1a91a5a99d703d3fee9a81a5c5089ab79 Mon Sep 17 00:00:00 2001
|
||||
From: Mark Harmstone <mark@harmstone.com>
|
||||
Date: Fri, 27 Mar 2015 20:48:19 +0000
|
||||
Subject: dsound: Support getting and setting EAX buffer properties.
|
||||
Subject: [PATCH] dsound: Support getting and setting EAX buffer properties.
|
||||
|
||||
---
|
||||
dlls/dsound/buffer.c | 2 ++
|
||||
dlls/dsound/dsound_eax.h | 4 +++
|
||||
dlls/dsound/dsound_private.h | 2 ++
|
||||
dlls/dsound/eax.c | 64 ++++++++++++++++++++++++++++++++++++++++++++
|
||||
dlls/dsound/eax.c | 64 ++++++++++++++++++++++++++++++++++++
|
||||
4 files changed, 72 insertions(+)
|
||||
|
||||
diff --git a/dlls/dsound/buffer.c b/dlls/dsound/buffer.c
|
||||
index 0596ce3..1c318f5 100644
|
||||
index b7a0fb26c4b..0aff7c96842 100644
|
||||
--- a/dlls/dsound/buffer.c
|
||||
+++ b/dlls/dsound/buffer.c
|
||||
@@ -1092,6 +1092,8 @@ HRESULT IDirectSoundBufferImpl_Create(
|
||||
/* calculate fragment size and write lead */
|
||||
DSOUND_RecalcFormat(dsb);
|
||||
@@ -1127,6 +1127,8 @@ HRESULT secondarybuffer_create(DirectSoundDevice *device, const DSBUFFERDESC *ds
|
||||
return DSERR_OUTOFMEMORY;
|
||||
}
|
||||
|
||||
+ dsb->eax.reverb_mix = EAX_REVERBMIX_USEDISTANCE;
|
||||
+
|
||||
@@ -24,7 +24,7 @@ index 0596ce3..1c318f5 100644
|
||||
dsb->ds3db_ds3db.dwSize = sizeof(DS3DBUFFER);
|
||||
dsb->ds3db_ds3db.vPosition.x = 0.0;
|
||||
diff --git a/dlls/dsound/dsound_eax.h b/dlls/dsound/dsound_eax.h
|
||||
index c90d82d..2ee83b9 100644
|
||||
index c90d82d9a3f..2ee83b94ff9 100644
|
||||
--- a/dlls/dsound/dsound_eax.h
|
||||
+++ b/dlls/dsound/dsound_eax.h
|
||||
@@ -119,6 +119,10 @@ typedef struct {
|
||||
@@ -39,10 +39,10 @@ index c90d82d..2ee83b9 100644
|
||||
}
|
||||
#endif
|
||||
diff --git a/dlls/dsound/dsound_private.h b/dlls/dsound/dsound_private.h
|
||||
index c16f770..c732b52 100644
|
||||
index a11379f0f88..9b537ad80a5 100644
|
||||
--- a/dlls/dsound/dsound_private.h
|
||||
+++ b/dlls/dsound/dsound_private.h
|
||||
@@ -176,6 +176,8 @@ struct IDirectSoundBufferImpl
|
||||
@@ -177,6 +177,8 @@ struct IDirectSoundBufferImpl
|
||||
int num_filters;
|
||||
DSFilter* filters;
|
||||
|
||||
@@ -52,13 +52,14 @@ index c16f770..c732b52 100644
|
||||
};
|
||||
|
||||
diff --git a/dlls/dsound/eax.c b/dlls/dsound/eax.c
|
||||
index cdd03be..3931681 100644
|
||||
index cdd03becbee..3931681d295 100644
|
||||
--- a/dlls/dsound/eax.c
|
||||
+++ b/dlls/dsound/eax.c
|
||||
@@ -179,6 +179,38 @@ HRESULT WINAPI EAX_Get(IDirectSoundBufferImpl *buf, REFGUID guidPropSet,
|
||||
@@ -178,6 +178,38 @@ HRESULT WINAPI EAX_Get(IDirectSoundBufferImpl *buf, REFGUID guidPropSet,
|
||||
return E_PROP_ID_UNSUPPORTED;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
+ return S_OK;
|
||||
+ } else if (IsEqualGUID(&DSPROPSETID_EAXBUFFER_ReverbProperties, guidPropSet)) {
|
||||
+ EAXBUFFER_REVERBPROPERTIES *props;
|
||||
+
|
||||
@@ -90,14 +91,14 @@ index cdd03be..3931681 100644
|
||||
+ return E_PROP_ID_UNSUPPORTED;
|
||||
+ }
|
||||
+
|
||||
+ return S_OK;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
return E_PROP_ID_UNSUPPORTED;
|
||||
@@ -276,6 +308,38 @@ HRESULT WINAPI EAX_Set(IDirectSoundBufferImpl *buf, REFGUID guidPropSet,
|
||||
@@ -275,6 +307,38 @@ HRESULT WINAPI EAX_Set(IDirectSoundBufferImpl *buf, REFGUID guidPropSet,
|
||||
return E_PROP_ID_UNSUPPORTED;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
+ return S_OK;
|
||||
+ } else if (IsEqualGUID(&DSPROPSETID_EAXBUFFER_ReverbProperties, guidPropSet)) {
|
||||
+ EAXBUFFER_REVERBPROPERTIES *props;
|
||||
+
|
||||
@@ -129,10 +130,9 @@ index cdd03be..3931681 100644
|
||||
+ return E_PROP_ID_UNSUPPORTED;
|
||||
+ }
|
||||
+
|
||||
+ return S_OK;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
return E_PROP_ID_UNSUPPORTED;
|
||||
--
|
||||
2.3.3
|
||||
2.33.0
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 66c0779d339d5d27753e6f0ac6509741b908cca1 Mon Sep 17 00:00:00 2001
|
||||
From 3760db8daceee555842425400af01de2075b4568 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Sat, 4 Apr 2015 21:09:18 +0200
|
||||
Subject: [PATCH] dsound: Various improvements to EAX support.
|
||||
@@ -16,28 +16,19 @@ update it later when necessary (-> much faster). Moreover, to avoid unnecessary
|
||||
locking, we initialize the EAX-specific properties always (for both the device and
|
||||
the buffers).
|
||||
---
|
||||
dlls/dsound/buffer.c | 6 ++--
|
||||
dlls/dsound/buffer.c | 4 ++-
|
||||
dlls/dsound/dsound.c | 2 ++
|
||||
dlls/dsound/dsound_eax.h | 1 +
|
||||
dlls/dsound/dsound_private.h | 1 +
|
||||
dlls/dsound/eax.c | 68 ++++++++++++++++--------------------
|
||||
5 files changed, 37 insertions(+), 41 deletions(-)
|
||||
5 files changed, 37 insertions(+), 39 deletions(-)
|
||||
|
||||
diff --git a/dlls/dsound/buffer.c b/dlls/dsound/buffer.c
|
||||
index 030f0849fed..252122d0374 100644
|
||||
index 6b7414d34ff..b1efa0d3012 100644
|
||||
--- a/dlls/dsound/buffer.c
|
||||
+++ b/dlls/dsound/buffer.c
|
||||
@@ -1084,8 +1084,6 @@ HRESULT secondarybuffer_create(DirectSoundDevice *device, const DSBUFFERDESC *ds
|
||||
/* calculate fragment size and write lead */
|
||||
DSOUND_RecalcFormat(dsb);
|
||||
|
||||
- dsb->eax.reverb_mix = EAX_REVERBMIX_USEDISTANCE;
|
||||
-
|
||||
if (dsb->dsbd.dwFlags & DSBCAPS_CTRL3D) {
|
||||
dsb->ds3db_ds3db.dwSize = sizeof(DS3DBUFFER);
|
||||
dsb->ds3db_ds3db.vPosition.x = 0.0;
|
||||
@@ -1168,7 +1166,7 @@ HRESULT IDirectSoundBufferImpl_Duplicate(
|
||||
HRESULT hres = DS_OK;
|
||||
@@ -1213,7 +1213,7 @@ HRESULT IDirectSoundBufferImpl_Duplicate(
|
||||
VOID *committedbuff;
|
||||
TRACE("(%p,%p,%p)\n", device, ppdsb, pdsb);
|
||||
|
||||
- dsb = HeapAlloc(GetProcessHeap(),0,sizeof(*dsb));
|
||||
@@ -45,7 +36,7 @@ index 030f0849fed..252122d0374 100644
|
||||
if (dsb == NULL) {
|
||||
WARN("out of memory\n");
|
||||
*ppdsb = NULL;
|
||||
@@ -1205,6 +1203,8 @@ HRESULT IDirectSoundBufferImpl_Duplicate(
|
||||
@@ -1261,6 +1261,8 @@ HRESULT IDirectSoundBufferImpl_Duplicate(
|
||||
|
||||
InitializeSRWLock(&dsb->lock);
|
||||
|
||||
@@ -80,10 +71,10 @@ index a650108f570..a555a75e458 100644
|
||||
|
||||
float *SampleBuffer;
|
||||
diff --git a/dlls/dsound/dsound_private.h b/dlls/dsound/dsound_private.h
|
||||
index 110dfe2c207..bca2bf46601 100644
|
||||
index 43e62626161..065fe820055 100644
|
||||
--- a/dlls/dsound/dsound_private.h
|
||||
+++ b/dlls/dsound/dsound_private.h
|
||||
@@ -234,6 +234,7 @@ HRESULT WINAPI EAX_Get(IDirectSoundBufferImpl *buf, REFGUID guidPropSet,
|
||||
@@ -239,6 +239,7 @@ HRESULT WINAPI EAX_Get(IDirectSoundBufferImpl *buf, REFGUID guidPropSet,
|
||||
HRESULT WINAPI EAX_Set(IDirectSoundBufferImpl *buf, REFGUID guidPropSet,
|
||||
ULONG dwPropID, void *pInstanceData, ULONG cbInstanceData, void *pPropData,
|
||||
ULONG cbPropData) DECLSPEC_HIDDEN;
|
||||
@@ -92,7 +83,7 @@ index 110dfe2c207..bca2bf46601 100644
|
||||
void init_eax_buffer(IDirectSoundBufferImpl *dsb) DECLSPEC_HIDDEN;
|
||||
void process_eax_buffer(IDirectSoundBufferImpl *dsb, float *buf, DWORD count) DECLSPEC_HIDDEN;
|
||||
diff --git a/dlls/dsound/eax.c b/dlls/dsound/eax.c
|
||||
index a05b00e1c02..535ff92d44d 100644
|
||||
index a05b00e1c02..ef802b95a7d 100644
|
||||
--- a/dlls/dsound/eax.c
|
||||
+++ b/dlls/dsound/eax.c
|
||||
@@ -114,6 +114,8 @@ static const float LATE_LINE_MULTIPLIER = 4.0f;
|
||||
@@ -253,5 +244,5 @@ index a05b00e1c02..535ff92d44d 100644
|
||||
switch (dwPropID) {
|
||||
case DSPROPERTY_EAXBUFFER_ALL:
|
||||
--
|
||||
2.27.0
|
||||
2.33.0
|
||||
|
||||
|
@@ -87,8 +87,8 @@ index a6402b09eff..28f32e9d092 100644
|
||||
+ * So far, this possibility of saving calls to
|
||||
+ * get_current_sample() is ignored.
|
||||
+ */
|
||||
+ float s1 = get_current_sample(dsb, idx, channel);
|
||||
+ float s2 = get_current_sample(dsb, idx + istride, channel);
|
||||
+ float s1 = get_current_sample(dsb, dsb->buffer->memory, dsb->buflen, idx, channel);
|
||||
+ float s2 = get_current_sample(dsb, dsb->buffer->memory, dsb->buflen, idx + istride, channel);
|
||||
+ float result = s1 * cur_freqAcc2 + s2 * cur_freqAcc;
|
||||
+ dsb->put(dsb, i * ostride, channel, result);
|
||||
+ }
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 723ccff12d0b9516490e34519e244a6486d11b8b Mon Sep 17 00:00:00 2001
|
||||
From 4d8244be2c89fe601d75bd17631d87f504dcd63a Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <z.figura12@gmail.com>
|
||||
Date: Wed, 13 Jun 2018 10:44:49 -0500
|
||||
Subject: [PATCH] configure: Check for sys/eventfd.h, ppoll(), and shm_open().
|
||||
@@ -13,10 +13,10 @@ Although perhaps we shouldn't since the server doesn't do this.
|
||||
3 files changed, 89 insertions(+)
|
||||
|
||||
diff --git a/configure b/configure
|
||||
index 5672688a0d7..24ae489c3a9 100755
|
||||
index 97b5dcfb38b..367008886d7 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -7467,6 +7467,7 @@ for ac_header in \
|
||||
@@ -7543,6 +7543,7 @@ for ac_header in \
|
||||
sys/cdio.h \
|
||||
sys/epoll.h \
|
||||
sys/event.h \
|
||||
@@ -24,15 +24,15 @@ index 5672688a0d7..24ae489c3a9 100755
|
||||
sys/filio.h \
|
||||
sys/ioctl.h \
|
||||
sys/ipc.h \
|
||||
@@ -17815,6 +17816,7 @@ for ac_func in \
|
||||
pipe2 \
|
||||
poll \
|
||||
@@ -18009,6 +18010,7 @@ for ac_func in \
|
||||
port_create \
|
||||
posix_fadvise \
|
||||
posix_fallocate \
|
||||
+ ppoll \
|
||||
prctl \
|
||||
pread \
|
||||
proc_pidinfo \
|
||||
@@ -18224,6 +18226,72 @@ fi
|
||||
readlink \
|
||||
@@ -18402,6 +18404,72 @@ fi
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -106,10 +106,10 @@ index 5672688a0d7..24ae489c3a9 100755
|
||||
then
|
||||
if ${LDAP_CFLAGS:+false} :; then :
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 7a03cbc1cab..bfa64a8d68a 100644
|
||||
index 0e65c78a81d..a3c9a627117 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -494,6 +494,7 @@ AC_CHECK_HEADERS(\
|
||||
@@ -510,6 +510,7 @@ AC_CHECK_HEADERS(\
|
||||
sys/cdio.h \
|
||||
sys/epoll.h \
|
||||
sys/event.h \
|
||||
@@ -117,15 +117,15 @@ index 7a03cbc1cab..bfa64a8d68a 100644
|
||||
sys/filio.h \
|
||||
sys/ioctl.h \
|
||||
sys/ipc.h \
|
||||
@@ -2207,6 +2208,7 @@ AC_CHECK_FUNCS(\
|
||||
pipe2 \
|
||||
poll \
|
||||
@@ -2212,6 +2213,7 @@ AC_CHECK_FUNCS(\
|
||||
port_create \
|
||||
posix_fadvise \
|
||||
posix_fallocate \
|
||||
+ ppoll \
|
||||
prctl \
|
||||
pread \
|
||||
proc_pidinfo \
|
||||
@@ -2271,6 +2273,16 @@ case $host_os in
|
||||
readlink \
|
||||
@@ -2262,6 +2264,16 @@ case $host_os in
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -143,12 +143,12 @@ index 7a03cbc1cab..bfa64a8d68a 100644
|
||||
if test "x$with_ldap" != "xno"
|
||||
then
|
||||
diff --git a/include/config.h.in b/include/config.h.in
|
||||
index 4adb6325e14..6f1323311d9 100644
|
||||
index f66444fd715..bf8fc85e6c5 100644
|
||||
--- a/include/config.h.in
|
||||
+++ b/include/config.h.in
|
||||
@@ -687,6 +687,9 @@
|
||||
/* Define to 1 if you have the <port.h> header file. */
|
||||
#undef HAVE_PORT_H
|
||||
@@ -507,6 +507,9 @@
|
||||
/* Define to 1 if you have the `posix_fallocate' function. */
|
||||
#undef HAVE_POSIX_FALLOCATE
|
||||
|
||||
+/* Define to 1 if you have the `ppoll' function. */
|
||||
+#undef HAVE_PPOLL
|
||||
@@ -156,7 +156,7 @@ index 4adb6325e14..6f1323311d9 100644
|
||||
/* Define to 1 if you have the `prctl' function. */
|
||||
#undef HAVE_PRCTL
|
||||
|
||||
@@ -804,6 +807,9 @@
|
||||
@@ -585,6 +588,9 @@
|
||||
/* Define to 1 if `interface_id' is a member of `sg_io_hdr_t'. */
|
||||
#undef HAVE_SG_IO_HDR_T_INTERFACE_ID
|
||||
|
||||
@@ -166,7 +166,7 @@ index 4adb6325e14..6f1323311d9 100644
|
||||
/* Define if sigaddset is supported */
|
||||
#undef HAVE_SIGADDSET
|
||||
|
||||
@@ -1004,6 +1010,9 @@
|
||||
@@ -749,6 +755,9 @@
|
||||
/* Define to 1 if you have the <sys/epoll.h> header file. */
|
||||
#undef HAVE_SYS_EPOLL_H
|
||||
|
||||
@@ -177,5 +177,5 @@ index 4adb6325e14..6f1323311d9 100644
|
||||
#undef HAVE_SYS_EVENT_H
|
||||
|
||||
--
|
||||
2.28.0
|
||||
2.33.0
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 70c7589e029a19a3b048cdf5c222fb36e489ba69 Mon Sep 17 00:00:00 2001
|
||||
From 4af235c5bc5797cae39578991b302b47052afcbb Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <zfigura@codeweavers.com>
|
||||
Date: Mon, 6 Jul 2020 14:40:43 -0500
|
||||
Subject: [PATCH] ntdll, server: Implement NtCreateEvent().
|
||||
@@ -77,12 +77,12 @@ index 87516e7597a..d9c7df967f8 100644
|
||||
BOOLEAN alertable, const LARGE_INTEGER *timeout ) DECLSPEC_HIDDEN;
|
||||
|
||||
diff --git a/dlls/ntdll/unix/sync.c b/dlls/ntdll/unix/sync.c
|
||||
index 1abc691811b..de4c75afcea 100644
|
||||
index f5be91e09d4..b54874b5d3d 100644
|
||||
--- a/dlls/ntdll/unix/sync.c
|
||||
+++ b/dlls/ntdll/unix/sync.c
|
||||
@@ -435,6 +435,10 @@ NTSTATUS WINAPI NtCreateEvent( HANDLE *handle, ACCESS_MASK access, const OBJECT_
|
||||
struct object_attributes *objattr;
|
||||
@@ -440,6 +440,10 @@ NTSTATUS WINAPI NtCreateEvent( HANDLE *handle, ACCESS_MASK access, const OBJECT_
|
||||
|
||||
*handle = 0;
|
||||
if (type != NotificationEvent && type != SynchronizationEvent) return STATUS_INVALID_PARAMETER;
|
||||
+
|
||||
+ if (do_esync())
|
||||
@@ -92,7 +92,7 @@ index 1abc691811b..de4c75afcea 100644
|
||||
|
||||
SERVER_START_REQ( create_event )
|
||||
diff --git a/server/esync.c b/server/esync.c
|
||||
index 226e70cd1ad..b9e0a455629 100644
|
||||
index e41bbbf9349..f89f29150ea 100644
|
||||
--- a/server/esync.c
|
||||
+++ b/server/esync.c
|
||||
@@ -203,6 +203,13 @@ struct semaphore
|
||||
@@ -125,5 +125,5 @@ index 226e70cd1ad..b9e0a455629 100644
|
||||
assert( 0 );
|
||||
}
|
||||
--
|
||||
2.29.2
|
||||
2.30.2
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user