Rebase against be2b0b1cec5843f0145f376316d6c28507559910.

This commit is contained in:
Zebediah Figura 2020-02-17 18:43:10 -06:00
parent 8b2fd051c9
commit de7c2faf80
7 changed files with 50 additions and 230 deletions

View File

@ -1,4 +1,4 @@
From e70e35f995515223d802e47e139089e964576b1f Mon Sep 17 00:00:00 2001
From 5ce4edd65773a793bc4b4f8ad1fa3b64b5894c7d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Tue, 10 Feb 2015 16:54:21 +0100
Subject: dxva2: Implement stubbed interfaces for
@ -9,15 +9,15 @@ Subject: dxva2: Implement stubbed interfaces for
dlls/dxva2/devicemanager.c | 4 +-
dlls/dxva2/dxva2_private.h | 1 +
dlls/dxva2/main.c | 4 +-
dlls/dxva2/videoservices.c | 467 +++++++++++++++++++++++++++++++++++++++++++++
dlls/dxva2/videoservices.c | 467 +++++++++++++++++++++++++++++++++++++
5 files changed, 474 insertions(+), 5 deletions(-)
create mode 100644 dlls/dxva2/videoservices.c
diff --git a/dlls/dxva2/Makefile.in b/dlls/dxva2/Makefile.in
index 27c653d3f20..b517921190b 100644
index 5c3e3842d..c86b165e8 100644
--- a/dlls/dxva2/Makefile.in
+++ b/dlls/dxva2/Makefile.in
@@ -3,4 +3,5 @@ IMPORTS = ole32
@@ -5,4 +5,5 @@ EXTRADLLFLAGS = -mno-cygwin
C_SRCS = \
devicemanager.c \
@ -25,10 +25,10 @@ index 27c653d3f20..b517921190b 100644
+ main.c \
+ videoservices.c
diff --git a/dlls/dxva2/devicemanager.c b/dlls/dxva2/devicemanager.c
index 15d78aa7ff0..b9ed76c865d 100644
index bba0fbc61..8182adedc 100644
--- a/dlls/dxva2/devicemanager.c
+++ b/dlls/dxva2/devicemanager.c
@@ -169,9 +169,9 @@ static HRESULT WINAPI Direct3DDeviceManager9_GetVideoService( IDirect3DDeviceMan
@@ -170,9 +170,9 @@ static HRESULT WINAPI Direct3DDeviceManager9_GetVideoService( IDirect3DDeviceMan
{
Direct3DDeviceManager9Impl *This = impl_from_Direct3DDeviceManager9(iface);
@ -41,7 +41,7 @@ index 15d78aa7ff0..b9ed76c865d 100644
static const IDirect3DDeviceManager9Vtbl Direct3DDeviceManager9_VTable =
diff --git a/dlls/dxva2/dxva2_private.h b/dlls/dxva2/dxva2_private.h
index d6e59fc6da8..a88809cf7ec 100644
index d6e59fc6d..a88809cf7 100644
--- a/dlls/dxva2/dxva2_private.h
+++ b/dlls/dxva2/dxva2_private.h
@@ -18,4 +18,5 @@
@ -51,7 +51,7 @@ index d6e59fc6da8..a88809cf7ec 100644
+extern HRESULT videoservice_create( IDirect3DDevice9 *device, REFIID riid, void **ppv ) DECLSPEC_HIDDEN;
extern HRESULT devicemanager_create( UINT *resetToken, void **ppv ) DECLSPEC_HIDDEN;
diff --git a/dlls/dxva2/main.c b/dlls/dxva2/main.c
index df8f2030104..0382b5fb00a 100644
index df8f20301..0382b5fb0 100644
--- a/dlls/dxva2/main.c
+++ b/dlls/dxva2/main.c
@@ -49,9 +49,9 @@ HRESULT WINAPI DXVA2CreateDirect3DDeviceManager9( UINT *resetToken, IDirect3DDev
@ -68,7 +68,7 @@ index df8f2030104..0382b5fb00a 100644
BOOL WINAPI DegaussMonitor( HMONITOR monitor )
diff --git a/dlls/dxva2/videoservices.c b/dlls/dxva2/videoservices.c
new file mode 100644
index 00000000000..936aa37b43c
index 000000000..607729502
--- /dev/null
+++ b/dlls/dxva2/videoservices.c
@@ -0,0 +1,467 @@
@ -302,9 +302,9 @@ index 00000000000..936aa37b43c
+
+ /* TODO: Query decoder instead of using hardcoded values */
+
+ memcpy(&config->guidConfigBitstreamEncryption, &DXVA_NoEncrypt, sizeof(GUID));
+ memcpy(&config->guidConfigMBcontrolEncryption, &DXVA_NoEncrypt, sizeof(GUID));
+ memcpy(&config->guidConfigResidDiffEncryption, &DXVA_NoEncrypt, sizeof(GUID));
+ memcpy(&config->guidConfigBitstreamEncryption, &DXVA2_NoEncrypt, sizeof(GUID));
+ memcpy(&config->guidConfigMBcontrolEncryption, &DXVA2_NoEncrypt, sizeof(GUID));
+ memcpy(&config->guidConfigResidDiffEncryption, &DXVA2_NoEncrypt, sizeof(GUID));
+
+ config->ConfigBitstreamRaw = 1;
+ config->ConfigMBcontrolRasterOrder = is_h264_codec(guid) ? 0 : 1;
@ -540,5 +540,5 @@ index 00000000000..936aa37b43c
+ return S_OK;
+}
--
2.11.0
2.25.0

View File

@ -1,4 +1,4 @@
From 935b985d2e4fab7402030c71ff1a6ba0abdd9874 Mon Sep 17 00:00:00 2001
From 95a95d09125707b24f8728c545c7f5b706bafe1c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sun, 22 Feb 2015 01:25:20 +0100
Subject: [PATCH] dxva2: Initial implementation of MPEG2 decoder using vaapi
@ -22,10 +22,10 @@ Subject: [PATCH] dxva2: Initial implementation of MPEG2 decoder using vaapi
create mode 100644 dlls/dxva2/vaapi.c
diff --git a/configure.ac b/configure.ac
index 58e5211e9bc..53aea6188ca 100644
index 39cef46e7..bb89c7ee0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -110,6 +110,8 @@ AC_ARG_WITH(xslt, AS_HELP_STRING([--without-xslt],[do not use XSLT]))
@@ -111,6 +111,8 @@ AC_ARG_WITH(xslt, AS_HELP_STRING([--without-xslt],[do not use XSLT]))
AC_ARG_WITH(xxf86vm, AS_HELP_STRING([--without-xxf86vm],[do not use XFree video mode extension]),
[if test "x$withval" = "xno"; then ac_cv_header_X11_extensions_xf86vmode_h=no; ac_cv_header_X11_extensions_xf86vmproto_h=no; fi])
AC_ARG_WITH(zlib, AS_HELP_STRING([--without-zlib],[do not use Zlib (data compression)]))
@ -34,7 +34,7 @@ index 58e5211e9bc..53aea6188ca 100644
AC_ARG_WITH(wine-tools,AS_HELP_STRING([--with-wine-tools=DIR],[use Wine tools from directory DIR]))
AC_ARG_WITH(wine64, AS_HELP_STRING([--with-wine64=DIR],[use the 64-bit Wine in DIR for a Wow64 build]))
@@ -1292,6 +1294,20 @@ This probably prevents linking to OpenGL. Try deleting the file and restarting c
@@ -1296,6 +1298,20 @@ This probably prevents linking to OpenGL. Try deleting the file and restarting c
WINE_WARNING_WITH(opengl,[test -n "$opengl_msg"],[$opengl_msg
OpenGL and Direct3D won't be supported.])
@ -56,7 +56,7 @@ index 58e5211e9bc..53aea6188ca 100644
else
X_CFLAGS=""
diff --git a/dlls/dxva2/Makefile.in b/dlls/dxva2/Makefile.in
index e4c90b5231e..b42cfae525e 100644
index e4c90b523..b42cfae52 100644
--- a/dlls/dxva2/Makefile.in
+++ b/dlls/dxva2/Makefile.in
@@ -1,10 +1,16 @@
@ -81,7 +81,7 @@ index e4c90b5231e..b42cfae525e 100644
+ videoservices.c
diff --git a/dlls/dxva2/backend.idl b/dlls/dxva2/backend.idl
new file mode 100644
index 00000000000..8d488351ff2
index 000000000..8d488351f
--- /dev/null
+++ b/dlls/dxva2/backend.idl
@@ -0,0 +1,96 @@
@ -182,7 +182,7 @@ index 00000000000..8d488351ff2
+ [out] IWineVideoDecoder **decoder);
+}
diff --git a/dlls/dxva2/dxva2_private.h b/dlls/dxva2/dxva2_private.h
index f0068b68891..f51863739b0 100644
index f0068b688..f51863739 100644
--- a/dlls/dxva2/dxva2_private.h
+++ b/dlls/dxva2/dxva2_private.h
@@ -1,5 +1,5 @@
@ -317,7 +317,7 @@ index f0068b68891..f51863739b0 100644
+#endif /* HAVE_VAAPI */
diff --git a/dlls/dxva2/genericdecoder.c b/dlls/dxva2/genericdecoder.c
new file mode 100644
index 00000000000..3903d6b0b46
index 000000000..3903d6b0b
--- /dev/null
+++ b/dlls/dxva2/genericdecoder.c
@@ -0,0 +1,432 @@
@ -754,7 +754,7 @@ index 00000000000..3903d6b0b46
+ return S_OK;
+}
diff --git a/dlls/dxva2/main.c b/dlls/dxva2/main.c
index 0382b5fb00a..3006f175b7f 100644
index 0382b5fb0..3006f175b 100644
--- a/dlls/dxva2/main.c
+++ b/dlls/dxva2/main.c
@@ -32,6 +32,8 @@
@ -848,7 +848,7 @@ index 0382b5fb00a..3006f175b7f 100644
return TRUE;
diff --git a/dlls/dxva2/tests/dxva2.c b/dlls/dxva2/tests/dxva2.c
index dcbb990ee5c..c28be4d8e3c 100644
index dcbb990ee..c28be4d8e 100644
--- a/dlls/dxva2/tests/dxva2.c
+++ b/dlls/dxva2/tests/dxva2.c
@@ -1,7 +1,7 @@
@ -929,7 +929,7 @@ index dcbb990ee5c..c28be4d8e3c 100644
IDirectXVideoDecoderService_Release(service);
diff --git a/dlls/dxva2/vaapi-mpeg2.c b/dlls/dxva2/vaapi-mpeg2.c
new file mode 100644
index 00000000000..7b7f61db755
index 000000000..7b7f61db7
--- /dev/null
+++ b/dlls/dxva2/vaapi-mpeg2.c
@@ -0,0 +1,753 @@
@ -1688,7 +1688,7 @@ index 00000000000..7b7f61db755
+#endif /* HAVE_VAAPI */
diff --git a/dlls/dxva2/vaapi.c b/dlls/dxva2/vaapi.c
new file mode 100644
index 00000000000..80e63bf38d9
index 000000000..e2a64065e
--- /dev/null
+++ b/dlls/dxva2/vaapi.c
@@ -0,0 +1,767 @@
@ -2306,9 +2306,9 @@ index 00000000000..80e63bf38d9
+ return E_OUTOFMEMORY;
+
+ /* TODO: Query decoder instead of using hardcoded values */
+ memcpy(&config->guidConfigBitstreamEncryption, &DXVA_NoEncrypt, sizeof(GUID));
+ memcpy(&config->guidConfigMBcontrolEncryption, &DXVA_NoEncrypt, sizeof(GUID));
+ memcpy(&config->guidConfigResidDiffEncryption, &DXVA_NoEncrypt, sizeof(GUID));
+ memcpy(&config->guidConfigBitstreamEncryption, &DXVA2_NoEncrypt, sizeof(GUID));
+ memcpy(&config->guidConfigMBcontrolEncryption, &DXVA2_NoEncrypt, sizeof(GUID));
+ memcpy(&config->guidConfigResidDiffEncryption, &DXVA2_NoEncrypt, sizeof(GUID));
+
+ config->ConfigBitstreamRaw = 1;
+ config->ConfigMBcontrolRasterOrder = is_h264_codec(guid) ? 0 : 1;
@ -2460,7 +2460,7 @@ index 00000000000..80e63bf38d9
+
+#endif /* HAVE_VAAPI */
diff --git a/dlls/dxva2/videoservices.c b/dlls/dxva2/videoservices.c
index 46e431a7f29..84222dce558 100644
index 11cba1441..84222dce5 100644
--- a/dlls/dxva2/videoservices.c
+++ b/dlls/dxva2/videoservices.c
@@ -1,5 +1,5 @@
@ -2540,9 +2540,9 @@ index 46e431a7f29..84222dce558 100644
-
- /* TODO: Query decoder instead of using hardcoded values */
-
- memcpy(&config->guidConfigBitstreamEncryption, &DXVA_NoEncrypt, sizeof(GUID));
- memcpy(&config->guidConfigMBcontrolEncryption, &DXVA_NoEncrypt, sizeof(GUID));
- memcpy(&config->guidConfigResidDiffEncryption, &DXVA_NoEncrypt, sizeof(GUID));
- memcpy(&config->guidConfigBitstreamEncryption, &DXVA2_NoEncrypt, sizeof(GUID));
- memcpy(&config->guidConfigMBcontrolEncryption, &DXVA2_NoEncrypt, sizeof(GUID));
- memcpy(&config->guidConfigResidDiffEncryption, &DXVA2_NoEncrypt, sizeof(GUID));
-
- config->ConfigBitstreamRaw = 1;
- config->ConfigMBcontrolRasterOrder = is_h264_codec(guid) ? 0 : 1;
@ -2637,5 +2637,5 @@ index 46e431a7f29..84222dce558 100644
return E_NOINTERFACE;
}
--
2.20.1
2.25.0

View File

@ -1,4 +1,4 @@
From 08fecb796ebe242402b94e46d20e4798f1983cff Mon Sep 17 00:00:00 2001
From aefe1725320bd3053c7c51020b92cc9dfc22c7b4 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Wed, 26 Nov 2014 10:46:09 +0100
Subject: [PATCH] ntdll: Move code to update user shared data into a separate
@ -6,14 +6,14 @@ Subject: [PATCH] ntdll: Move code to update user shared data into a separate
---
dlls/ntdll/ntdll.spec | 3 +++
dlls/ntdll/thread.c | 22 ++++++++++++++++++----
2 files changed, 21 insertions(+), 4 deletions(-)
dlls/ntdll/thread.c | 28 +++++++++++++++++++++-------
2 files changed, 24 insertions(+), 7 deletions(-)
diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec
index 5057e2b07..8ed2a4100 100644
index f6cfe4067..933c8e798 100644
--- a/dlls/ntdll/ntdll.spec
+++ b/dlls/ntdll/ntdll.spec
@@ -1575,3 +1575,6 @@
@@ -1583,3 +1583,6 @@
# Filesystem
@ cdecl wine_nt_to_unix_file_name(ptr ptr long long)
@ cdecl wine_unix_to_nt_file_name(ptr ptr)
@ -21,10 +21,10 @@ index 5057e2b07..8ed2a4100 100644
+# User shared data
+@ cdecl __wine_user_shared_data()
diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c
index d010c0181..01b58ebea 100644
index 843df8905..a02f609e2 100644
--- a/dlls/ntdll/thread.c
+++ b/dlls/ntdll/thread.c
@@ -274,7 +274,6 @@ TEB *thread_init(void)
@@ -275,7 +275,6 @@ TEB *thread_init(void)
TEB *teb;
void *addr;
SIZE_T size;
@ -32,7 +32,7 @@ index d010c0181..01b58ebea 100644
NTSTATUS status;
struct ntdll_thread_data *thread_data;
@@ -349,7 +348,23 @@ TEB *thread_init(void)
@@ -350,7 +349,26 @@ TEB *thread_init(void)
debug_init();
set_process_name( __wine_main_argc, __wine_main_argv );
@ -41,6 +41,9 @@ index d010c0181..01b58ebea 100644
+ __wine_user_shared_data();
+ fill_cpu_info();
+
+ virtual_get_system_info( &sbi );
+ user_shared_data->NumberOfPhysicalPages = sbi.MmNumberOfPhysicalPages;
+
+ return teb;
+}
+
@ -57,17 +60,20 @@ index d010c0181..01b58ebea 100644
NtQuerySystemTime( &now );
user_shared_data->SystemTime.LowPart = now.u.LowPart;
user_shared_data->SystemTime.High1Time = user_shared_data->SystemTime.High2Time = now.u.HighPart;
@@ -357,9 +372,8 @@ TEB *thread_init(void)
@@ -358,12 +376,8 @@ TEB *thread_init(void)
user_shared_data->u.TickCount.High2Time = user_shared_data->u.TickCount.High1Time;
user_shared_data->TickCountLowDeprecated = user_shared_data->u.TickCount.LowPart;
user_shared_data->TickCountMultiplier = 1 << 24;
- fill_cpu_info();
- virtual_get_system_info( &sbi );
- user_shared_data->NumberOfPhysicalPages = sbi.MmNumberOfPhysicalPages;
-
- return teb;
+ return (BYTE *)user_shared_data;
}
BOOL read_process_memory_stats(int unix_pid, VM_COUNTERS *pvmi)
--
2.23.0
2.25.0

View File

@ -1,75 +0,0 @@
From e4b6be33cb122d796f1009761b8f53b4c3e46774 Mon Sep 17 00:00:00 2001
From: Paul Gofman <gofmanp@gmail.com>
Date: Tue, 11 Feb 2020 15:17:55 +0300
Subject: [PATCH] ntdll: Fill NumberOfPhysicalPages field in user shared data
area.
---
dlls/ntdll/tests/virtual.c | 16 ++++++++++++++++
dlls/ntdll/thread.c | 4 ++++
2 files changed, 20 insertions(+)
diff --git a/dlls/ntdll/tests/virtual.c b/dlls/ntdll/tests/virtual.c
index 31eb66c143..20dfeb9830 100644
--- a/dlls/ntdll/tests/virtual.c
+++ b/dlls/ntdll/tests/virtual.c
@@ -25,6 +25,7 @@
#include "windef.h"
#include "winternl.h"
#include "wine/test.h"
+#include "ddk/wdm.h"
static unsigned int page_size;
@@ -513,6 +514,20 @@ static void test_NtMapViewOfSection(void)
CloseHandle(process);
}
+static void test_user_shared_data(void)
+{
+ const KSHARED_USER_DATA *user_shared_data = (void *)0x7ffe0000;
+ SYSTEM_BASIC_INFORMATION sbi;
+ NTSTATUS status;
+
+ memset(&sbi, 0, sizeof(sbi));
+ status = NtQuerySystemInformation(SystemBasicInformation, &sbi, sizeof(sbi), NULL);
+ ok(status == STATUS_SUCCESS, "Unexpected status %#x.\n", status);
+ ok(sbi.MmNumberOfPhysicalPages && sbi.MmNumberOfPhysicalPages == user_shared_data->NumberOfPhysicalPages,
+ "Unexpected number of physical pages %#x, NtQuerySystemInformation() reported %#x.\n",
+ user_shared_data->NumberOfPhysicalPages, sbi.MmNumberOfPhysicalPages);
+}
+
START_TEST(virtual)
{
SYSTEM_BASIC_INFORMATION sbi;
@@ -546,4 +561,5 @@ START_TEST(virtual)
test_NtAllocateVirtualMemory();
test_RtlCreateUserStack();
test_NtMapViewOfSection();
+ test_user_shared_data();
}
diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c
index 35187ba470..cd1fdb4fe8 100644
--- a/dlls/ntdll/thread.c
+++ b/dlls/ntdll/thread.c
@@ -277,6 +277,7 @@ static void set_process_name( int argc, char *argv[] )
*/
TEB *thread_init(void)
{
+ SYSTEM_BASIC_INFORMATION sbi;
TEB *teb;
void *addr;
SIZE_T size;
@@ -370,6 +371,9 @@ TEB *thread_init(void)
__wine_user_shared_data();
fill_cpu_info();
+ virtual_get_system_info(&sbi);
+ user_shared_data->NumberOfPhysicalPages = sbi.MmNumberOfPhysicalPages;
+
return teb;
}
--
2.24.1

View File

@ -1,86 +0,0 @@
From 741e66e7ed773dffc5c5b7f44439f7786adc6c3a Mon Sep 17 00:00:00 2001
From: Paul Gofman <gofmanp@gmail.com>
Date: Mon, 30 Dec 2019 13:36:12 +0300
Subject: [PATCH] ntdll: Detect more processor features on Intel CPU.
---
dlls/ntdll/nt.c | 35 ++++++++++++++++++++---------------
1 file changed, 20 insertions(+), 15 deletions(-)
diff --git a/dlls/ntdll/nt.c b/dlls/ntdll/nt.c
index 524e39144b..d39e487842 100644
--- a/dlls/ntdll/nt.c
+++ b/dlls/ntdll/nt.c
@@ -1172,6 +1172,7 @@ static inline BOOL have_sse_daz_mode(void)
static inline void get_cpuinfo(SYSTEM_CPU_INFORMATION* info)
{
unsigned int regs[4], regs2[4];
+ BOOL amd_or_intel = FALSE;
#if defined(__i386__)
info->Architecture = PROCESSOR_ARCHITECTURE_INTEL;
@@ -1183,6 +1184,8 @@ static inline void get_cpuinfo(SYSTEM_CPU_INFORMATION* info)
info->FeatureSet = CPU_FEATURE_VME | CPU_FEATURE_X86 | CPU_FEATURE_PGE;
info->Level = 3;
+ user_shared_data->ProcessorFeatures[PF_RDWRFSGSBASE_AVAILABLE] = TRUE;
+
if (!have_cpuid()) return;
do_cpuid(0x00000000, regs); /* get standard cpuid level and vendor name */
@@ -1227,15 +1230,7 @@ static inline void get_cpuinfo(SYSTEM_CPU_INFORMATION* info)
info->Revision |= ((regs2[0] >> 4 ) & 0xf) << 8; /* model */
info->Revision |= regs2[0] & 0xf; /* stepping */
- do_cpuid(0x80000000, regs); /* get vendor cpuid level */
- if (regs[0] >= 0x80000001)
- {
- do_cpuid(0x80000001, regs2); /* get vendor features */
- user_shared_data->ProcessorFeatures[PF_VIRT_FIRMWARE_ENABLED] = (regs2[2] >> 2) & 1;
- user_shared_data->ProcessorFeatures[PF_NX_ENABLED] = (regs2[3] >> 20) & 1;
- user_shared_data->ProcessorFeatures[PF_3DNOW_INSTRUCTIONS_AVAILABLE] = (regs2[3] >> 31) & 1;
- if (regs2[3] >> 31) info->FeatureSet |= CPU_FEATURE_3DNOW;
- }
+ amd_or_intel = TRUE;
}
else if (regs[1] == GENU && regs[3] == INEI && regs[2] == NTEL)
{
@@ -1250,12 +1245,7 @@ static inline void get_cpuinfo(SYSTEM_CPU_INFORMATION* info)
if(regs2[3] & (1 << 21)) info->FeatureSet |= CPU_FEATURE_DS;
user_shared_data->ProcessorFeatures[PF_VIRT_FIRMWARE_ENABLED] = (regs2[2] >> 5) & 1;
- do_cpuid(0x80000000, regs); /* get vendor cpuid level */
- if (regs[0] >= 0x80000001)
- {
- do_cpuid(0x80000001, regs2); /* get vendor features */
- user_shared_data->ProcessorFeatures[PF_NX_ENABLED] = (regs2[3] >> 20) & 1;
- }
+ amd_or_intel = TRUE;
}
else
{
@@ -1265,6 +1255,21 @@ static inline void get_cpuinfo(SYSTEM_CPU_INFORMATION* info)
info->Revision = ((regs2[0] >> 4 ) & 0xf) << 8; /* model */
info->Revision |= regs2[0] & 0xf; /* stepping */
}
+
+ if (amd_or_intel)
+ {
+ do_cpuid(0x80000000, regs); /* get vendor cpuid level */
+ if (regs[0] >= 0x80000001)
+ {
+ do_cpuid(0x80000001, regs2); /* get vendor features */
+ user_shared_data->ProcessorFeatures[PF_VIRT_FIRMWARE_ENABLED] = (regs2[2] >> 2) & 1;
+ user_shared_data->ProcessorFeatures[PF_NX_ENABLED] = (regs2[3] >> 20) & 1;
+ user_shared_data->ProcessorFeatures[PF_3DNOW_INSTRUCTIONS_AVAILABLE] = (regs2[3] >> 31) & 1;
+ user_shared_data->ProcessorFeatures[PF_RDTSC_INSTRUCTION_AVAILABLE] = (regs2[3] >> 27) & 1;
+ if (regs2[3] >> 31) info->FeatureSet |= CPU_FEATURE_3DNOW;
+ if ((regs2[3] >> 27) & 1) info->FeatureSet |= CPU_FEATURE_TSC;
+ }
+ }
}
}
--
2.24.1

View File

@ -1,3 +0,0 @@
Fixes: [48386] Some CPU features are not reported for Intel CPU (Detroit: Become Human is affected)
Fixes: [48387] User shared data area should have NumberOfPhysicalPages field filled in (used by Detroit: Become Human)

View File

@ -52,7 +52,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "85bd94f8705115ac0c35eac6ff7e2f3e59be924e"
echo "be2b0b1cec5843f0145f376316d6c28507559910"
}
# Show version information
@ -212,7 +212,6 @@ patch_enable_all ()
enable_ntdll_ThreadTime="$1"
enable_ntdll_Threading="$1"
enable_ntdll_User_Shared_Data="$1"
enable_ntdll_User_shared_data_fields="$1"
enable_ntdll_WRITECOPY="$1"
enable_ntdll_Zero_mod_name="$1"
enable_ntdll_aarch_TEB="$1"
@ -748,9 +747,6 @@ patch_enable ()
ntdll-User_Shared_Data)
enable_ntdll_User_Shared_Data="$2"
;;
ntdll-User_shared_data_fields)
enable_ntdll_User_shared_data_fields="$2"
;;
ntdll-WRITECOPY)
enable_ntdll_WRITECOPY="$2"
;;
@ -4925,24 +4921,6 @@ if test "$enable_ntdll_ThreadHideFromDebugger" -eq 1; then
) >> "$patchlist"
fi
# Patchset ntdll-User_shared_data_fields
# |
# | This patchset fixes the following Wine bugs:
# | * [#48386] Some CPU features are not reported for Intel CPU (Detroit: Become Human is affected)
# | * [#48387] User shared data area should have NumberOfPhysicalPages field filled in (used by Detroit: Become Human)
# |
# | Modified files:
# | * dlls/ntdll/nt.c, dlls/ntdll/tests/virtual.c, dlls/ntdll/thread.c
# |
if test "$enable_ntdll_User_shared_data_fields" -eq 1; then
patch_apply ntdll-User_shared_data_fields/0001-ntdll-Fill-NumberOfPhysicalPages-field-in-user-share.patch
patch_apply ntdll-User_shared_data_fields/0002-ntdll-Detect-more-processor-features-on-Intel-CPU.patch
(
printf '%s\n' '+ { "Paul Gofman", "ntdll: Fill NumberOfPhysicalPages field in user shared data area.", 1 },';
printf '%s\n' '+ { "Paul Gofman", "ntdll: Detect more processor features on Intel CPU.", 1 },';
) >> "$patchlist"
fi
# Patchset ntdll-WRITECOPY
# |
# | This patchset has the following (direct or indirect) dependencies: