diff --git a/patches/ntdll-NtQueryVirtualMemory/0005-ntdll-tests-Add-test-to-ensure-section-name-is-full-.patch b/patches/ntdll-NtQueryVirtualMemory/0005-ntdll-tests-Add-test-to-ensure-section-name-is-full-.patch index 2380bd2c..0d92e522 100644 --- a/patches/ntdll-NtQueryVirtualMemory/0005-ntdll-tests-Add-test-to-ensure-section-name-is-full-.patch +++ b/patches/ntdll-NtQueryVirtualMemory/0005-ntdll-tests-Add-test-to-ensure-section-name-is-full-.patch @@ -1,4 +1,4 @@ -From ace7d4f4d6f6de1e2ba60c43d8e79d2b54d03523 Mon Sep 17 00:00:00 2001 +From 0d410dfc4dea7a5f7422d4c066c2f1d66d7d7f7c Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Sun, 28 May 2017 10:33:40 +0200 Subject: ntdll/tests: Add test to ensure section name is full path. @@ -8,7 +8,7 @@ Subject: ntdll/tests: Add test to ensure section name is full path. 1 file changed, 9 insertions(+) diff --git a/dlls/ntdll/tests/info.c b/dlls/ntdll/tests/info.c -index 1b54bd41320..4bd4b755de5 100644 +index 4ad639ca81..44d1213b98 100644 --- a/dlls/ntdll/tests/info.c +++ b/dlls/ntdll/tests/info.c @@ -22,6 +22,7 @@ @@ -17,17 +17,17 @@ index 1b54bd41320..4bd4b755de5 100644 +static NTSTATUS (WINAPI * pRtlDowncaseUnicodeString)(UNICODE_STRING *, const UNICODE_STRING *, BOOLEAN); static NTSTATUS (WINAPI * pNtQuerySystemInformation)(SYSTEM_INFORMATION_CLASS, PVOID, ULONG, PULONG); + static NTSTATUS (WINAPI * pRtlGetNativeSystemInformation)(SYSTEM_INFORMATION_CLASS, PVOID, ULONG, PULONG); static NTSTATUS (WINAPI * pNtQuerySystemInformationEx)(SYSTEM_INFORMATION_CLASS, void*, ULONG, void*, ULONG, ULONG*); - static NTSTATUS (WINAPI * pNtPowerInformation)(POWER_INFORMATION_LEVEL, PVOID, ULONG, PVOID, ULONG); -@@ -66,6 +67,7 @@ static BOOL InitFunctionPtrs(void) +@@ -75,6 +76,7 @@ static BOOL InitFunctionPtrs(void) return FALSE; } + NTDLL_GET_PROC(RtlDowncaseUnicodeString); NTDLL_GET_PROC(NtQuerySystemInformation); + NTDLL_GET_PROC(RtlGetNativeSystemInformation); NTDLL_GET_PROC(NtPowerInformation); - NTDLL_GET_PROC(NtQueryInformationProcess); -@@ -1745,6 +1747,7 @@ static void test_queryvirtualmemory(void) +@@ -2120,6 +2122,7 @@ static void test_queryvirtualmemory(void) { NTSTATUS status; SIZE_T readcount; @@ -35,7 +35,7 @@ index 1b54bd41320..4bd4b755de5 100644 static const char teststring[] = "test string"; static char datatestbuf[42] = "abc"; static char rwtestbuf[42]; -@@ -1753,6 +1756,8 @@ static void test_queryvirtualmemory(void) +@@ -2128,6 +2131,8 @@ static void test_queryvirtualmemory(void) HMODULE module; char buffer_name[sizeof(MEMORY_SECTION_NAME) + MAX_PATH * sizeof(WCHAR)]; MEMORY_SECTION_NAME *msn = (MEMORY_SECTION_NAME *)buffer_name; @@ -44,7 +44,7 @@ index 1b54bd41320..4bd4b755de5 100644 module = GetModuleHandleA( "ntdll.dll" ); trace("Check flags of the PE header of NTDLL.DLL at %p\n", module); -@@ -1852,6 +1857,10 @@ static void test_queryvirtualmemory(void) +@@ -2234,6 +2239,10 @@ static void test_queryvirtualmemory(void) ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); ok( readcount > 0, "Expected readcount to be > 0\n"); trace ("Section Name: %s\n", wine_dbgstr_w(msn->SectionFileName.Buffer)); @@ -56,5 +56,5 @@ index 1b54bd41320..4bd4b755de5 100644 trace("Check section name of non mapped memory\n"); memset(msn, 0, sizeof(*msn)); -- -2.12.2 +2.24.1 diff --git a/patches/ntdll-RtlGetNativeSystemInformation/0001-ntdll-Export-RtlGetNativeSystemInformation-function.patch b/patches/ntdll-RtlGetNativeSystemInformation/0001-ntdll-Export-RtlGetNativeSystemInformation-function.patch deleted file mode 100644 index ae280a89..00000000 --- a/patches/ntdll-RtlGetNativeSystemInformation/0001-ntdll-Export-RtlGetNativeSystemInformation-function.patch +++ /dev/null @@ -1,62 +0,0 @@ -From e0d94123b434f62e83bce3b4cfee2aef5ba0a9b9 Mon Sep 17 00:00:00 2001 -From: Paul Gofman -Date: Wed, 13 Nov 2019 11:01:13 +0300 -Subject: [PATCH] ntdll: Export RtlGetNativeSystemInformation() function. - -Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=40334 ---- - dlls/ntdll/ntdll.spec | 2 +- - dlls/ntdll/tests/info.c | 10 ++++++++++ - 2 files changed, 11 insertions(+), 1 deletion(-) - -diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec -index 93ebd31d57..3bb7f2e1f6 100644 ---- a/dlls/ntdll/ntdll.spec -+++ b/dlls/ntdll/ntdll.spec -@@ -699,7 +699,7 @@ - # Yes, Microsoft really misspelled this one! - # @ stub RtlGetLengthWithoutTrailingPathSeperators - @ stdcall RtlGetLongestNtPathLength() --# @ stub RtlGetNativeSystemInformation -+@ stdcall -private RtlGetNativeSystemInformation(long ptr long ptr) NtQuerySystemInformation - # @ stub RtlGetNextRange - @ stdcall RtlGetNtGlobalFlags() - @ stdcall RtlGetNtProductType(ptr) -diff --git a/dlls/ntdll/tests/info.c b/dlls/ntdll/tests/info.c -index f19cb27439..7aae03cbc5 100644 ---- a/dlls/ntdll/tests/info.c -+++ b/dlls/ntdll/tests/info.c -@@ -24,6 +24,7 @@ - - static NTSTATUS (WINAPI * pRtlDowncaseUnicodeString)(UNICODE_STRING *, const UNICODE_STRING *, BOOLEAN); - static NTSTATUS (WINAPI * pNtQuerySystemInformation)(SYSTEM_INFORMATION_CLASS, PVOID, ULONG, PULONG); -+static NTSTATUS (WINAPI * pRtlGetNativeSystemInformation)(SYSTEM_INFORMATION_CLASS, PVOID, ULONG, PULONG); - static NTSTATUS (WINAPI * pNtQuerySystemInformationEx)(SYSTEM_INFORMATION_CLASS, void*, ULONG, void*, ULONG, ULONG*); - static NTSTATUS (WINAPI * pNtPowerInformation)(POWER_INFORMATION_LEVEL, PVOID, ULONG, PVOID, ULONG); - static NTSTATUS (WINAPI * pNtQueryInformationProcess)(HANDLE, PROCESSINFOCLASS, PVOID, ULONG, PULONG); -@@ -77,6 +78,7 @@ static BOOL InitFunctionPtrs(void) - - NTDLL_GET_PROC(RtlDowncaseUnicodeString); - NTDLL_GET_PROC(NtQuerySystemInformation); -+ NTDLL_GET_PROC(RtlGetNativeSystemInformation); - NTDLL_GET_PROC(NtPowerInformation); - NTDLL_GET_PROC(NtQueryInformationProcess); - NTDLL_GET_PROC(NtQueryInformationThread); -@@ -155,6 +157,14 @@ static void test_query_basic(void) - /* Check if we have some return values */ - trace("Number of Processors : %d\n", sbi.NumberOfProcessors); - ok( sbi.NumberOfProcessors > 0, "Expected more than 0 processors, got %d\n", sbi.NumberOfProcessors); -+ -+ memset(&sbi, 0, sizeof(sbi)); -+ status = pRtlGetNativeSystemInformation(SystemBasicInformation, &sbi, sizeof(sbi), &ReturnLength); -+ ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); -+ ok( sizeof(sbi) == ReturnLength, "Inconsistent length %d\n", ReturnLength); -+ -+ trace("Number of Processors : %d\n", sbi.NumberOfProcessors); -+ ok( sbi.NumberOfProcessors > 0, "Expected more than 0 processors, got %d\n", sbi.NumberOfProcessors); - } - - static void test_query_cpu(void) --- -2.23.0 - diff --git a/patches/ntdll-RtlGetNativeSystemInformation/definition b/patches/ntdll-RtlGetNativeSystemInformation/definition deleted file mode 100644 index 016344fe..00000000 --- a/patches/ntdll-RtlGetNativeSystemInformation/definition +++ /dev/null @@ -1,2 +0,0 @@ -Fixes: [40334] AION - Wine /Unhandled exception: page fault on read access to 0x00000000 in 64-bit code (0x0000000000000000) - diff --git a/patches/nvapi-Stub_DLL/0017-nvapi-Implement-NvAPI_GPU_Get-Physical-Virtual-Frame.patch b/patches/nvapi-Stub_DLL/0017-nvapi-Implement-NvAPI_GPU_Get-Physical-Virtual-Frame.patch index 6559a9b8..a96eaf7f 100644 --- a/patches/nvapi-Stub_DLL/0017-nvapi-Implement-NvAPI_GPU_Get-Physical-Virtual-Frame.patch +++ b/patches/nvapi-Stub_DLL/0017-nvapi-Implement-NvAPI_GPU_Get-Physical-Virtual-Frame.patch @@ -1,16 +1,16 @@ -From 5dd48cb814d0b69b43c5a57022d3beef8c2418a0 Mon Sep 17 00:00:00 2001 +From deea16fd49a97aa0683ce1457c7d5ee9dd1c6f72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Tue, 27 Jun 2017 00:28:03 +0200 Subject: nvapi: Implement NvAPI_GPU_Get{Physical,Virtual}FrameBufferSize. --- dlls/nvapi/Makefile.in | 1 + - dlls/nvapi/nvapi.c | 75 ++++++++++++++++++++++++++++++++++++++++ + dlls/nvapi/nvapi.c | 76 ++++++++++++++++++++++++++++++++++++++++ dlls/nvapi64/Makefile.in | 1 + - 3 files changed, 77 insertions(+) + 3 files changed, 78 insertions(+) diff --git a/dlls/nvapi/Makefile.in b/dlls/nvapi/Makefile.in -index 606177f1..6341254d 100644 +index 606177f1f8..6341254d9f 100644 --- a/dlls/nvapi/Makefile.in +++ b/dlls/nvapi/Makefile.in @@ -1,4 +1,5 @@ @@ -20,7 +20,7 @@ index 606177f1..6341254d 100644 C_SRCS = \ nvapi.c diff --git a/dlls/nvapi/nvapi.c b/dlls/nvapi/nvapi.c -index 598267d6..d2c88655 100644 +index 598267d6c8..46d52e0984 100644 --- a/dlls/nvapi/nvapi.c +++ b/dlls/nvapi/nvapi.c @@ -18,9 +18,11 @@ @@ -44,26 +44,27 @@ index 598267d6..d2c88655 100644 WINE_DEFAULT_DEBUG_CHANNEL(nvapi); #define FAKE_PHYSICAL_GPU ((NvPhysicalGpuHandle)0xdead0001) -@@ -589,6 +593,75 @@ static NvAPI_Status CDECL NvAPI_D3D9_RegisterResource(IDirect3DResource9* pResou +@@ -589,6 +593,76 @@ static NvAPI_Status CDECL NvAPI_D3D9_RegisterResource(IDirect3DResource9* pResou return NVAPI_ERROR; } +static NvU32 get_video_memory(void) +{ -+ static NvU32 cache; + struct wined3d_adapter_identifier identifier; ++ struct wined3d_adapter *adapter; + struct wined3d *wined3d; + HRESULT hr = E_FAIL; ++ static NvU32 cache; + + if (cache) return cache; + + memset(&identifier, 0, sizeof(identifier)); + + wined3d_mutex_lock(); -+ wined3d = wined3d_create(0); -+ if (wined3d) ++ if ((wined3d = wined3d_create(0))) + { -+ hr = wined3d_get_adapter_identifier(wined3d, 0, 0, &identifier); ++ if ((adapter = wined3d_get_adapter(wined3d, 0))) ++ hr = wined3d_adapter_get_identifier(adapter, 0, &identifier); + wined3d_decref(wined3d); + } + wined3d_mutex_unlock(); @@ -120,7 +121,7 @@ index 598267d6..d2c88655 100644 void* CDECL nvapi_QueryInterface(unsigned int offset) { static const struct -@@ -631,6 +704,8 @@ void* CDECL nvapi_QueryInterface(unsigned int offset) +@@ -631,6 +705,8 @@ void* CDECL nvapi_QueryInterface(unsigned int offset) {0xee1370cf, NvAPI_GetLogicalGPUFromDisplay}, {0xfceac864, NvAPI_D3D_GetObjectHandleForResource}, {0xa064bdfc, NvAPI_D3D9_RegisterResource}, @@ -130,7 +131,7 @@ index 598267d6..d2c88655 100644 unsigned int i; TRACE("(%x)\n", offset); diff --git a/dlls/nvapi64/Makefile.in b/dlls/nvapi64/Makefile.in -index 80e2d6bf..04bd0cf1 100644 +index 80e2d6bfb2..04bd0cf1c4 100644 --- a/dlls/nvapi64/Makefile.in +++ b/dlls/nvapi64/Makefile.in @@ -1,5 +1,6 @@ @@ -141,5 +142,5 @@ index 80e2d6bf..04bd0cf1 100644 C_SRCS = \ nvapi.c -- -2.20.1 +2.24.1 diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 3d7dd700..97de21c1 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -52,7 +52,7 @@ usage() # Get the upstream commit sha upstream_commit() { - echo "d731208602393877709d3bb0bdeb28c80f9719b0" + echo "4dfd5f22f4032efdc283adf861d82e43c3b08d42" } # Show version information @@ -198,7 +198,6 @@ patch_enable_all () enable_ntdll_Pipe_SpecialCharacters="$1" enable_ntdll_ProcessQuotaLimits="$1" enable_ntdll_RtlCreateUserThread="$1" - enable_ntdll_RtlGetNativeSystemInformation="$1" enable_ntdll_RtlIpv4StringToAddress="$1" enable_ntdll_RtlQueryPackageIdentity="$1" enable_ntdll_Serial_Port_Detection="$1" @@ -706,9 +705,6 @@ patch_enable () ntdll-RtlCreateUserThread) enable_ntdll_RtlCreateUserThread="$2" ;; - ntdll-RtlGetNativeSystemInformation) - enable_ntdll_RtlGetNativeSystemInformation="$2" - ;; ntdll-RtlIpv4StringToAddress) enable_ntdll_RtlIpv4StringToAddress="$2" ;; @@ -4759,21 +4755,6 @@ if test "$enable_ntdll_ProcessQuotaLimits" -eq 1; then ) >> "$patchlist" fi -# Patchset ntdll-RtlGetNativeSystemInformation -# | -# | This patchset fixes the following Wine bugs: -# | * [#40334] AION - Wine /Unhandled exception: page fault on read access to 0x00000000 in 64-bit code (0x0000000000000000) -# | -# | Modified files: -# | * dlls/ntdll/ntdll.spec, dlls/ntdll/tests/info.c -# | -if test "$enable_ntdll_RtlGetNativeSystemInformation" -eq 1; then - patch_apply ntdll-RtlGetNativeSystemInformation/0001-ntdll-Export-RtlGetNativeSystemInformation-function.patch - ( - printf '%s\n' '+ { "Paul Gofman", "ntdll: Export RtlGetNativeSystemInformation() function.", 1 },'; - ) >> "$patchlist" -fi - # Patchset ntdll-RtlIpv4StringToAddress # | # | This patchset fixes the following Wine bugs: