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
15 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
34ba08404f | ||
|
7b199110bb | ||
|
3d3cbfce86 | ||
|
0547bb4578 | ||
|
f20c33fa04 | ||
|
a644c49d6d | ||
|
d2102728fe | ||
|
a93d3b6369 | ||
|
09fdb3b5c9 | ||
|
5897bc1d27 | ||
|
f8b6fde40c | ||
|
34d5c3568f | ||
|
44af049de7 | ||
|
c747e46d75 | ||
|
1f89c15143 |
4
.github/workflows/macOS.yml
vendored
4
.github/workflows/macOS.yml
vendored
@@ -38,7 +38,7 @@ jobs:
|
||||
mkdir $GITHUB_WORKSPACE/wine
|
||||
cd wine
|
||||
git init
|
||||
git fetch https://github.com/wine-mirror/wine.git $($GITHUB_WORKSPACE/patches/patchinstall.sh --upstream-commit) --depth=1
|
||||
git fetch git://source.winehq.org/git/wine.git $($GITHUB_WORKSPACE/patches/patchinstall.sh --upstream-commit) --depth=1
|
||||
git checkout $($GITHUB_WORKSPACE/patches/patchinstall.sh --upstream-commit)
|
||||
|
||||
- name: Run patchinstall.sh --all
|
||||
@@ -98,7 +98,7 @@ jobs:
|
||||
mkdir $GITHUB_WORKSPACE/wine
|
||||
cd wine
|
||||
git init
|
||||
git fetch https://github.com/wine-mirror/wine.git $($GITHUB_WORKSPACE/patches/patchinstall.sh --upstream-commit) --depth=1
|
||||
git fetch git://source.winehq.org/git/wine.git $($GITHUB_WORKSPACE/patches/patchinstall.sh --upstream-commit) --depth=1
|
||||
git checkout $($GITHUB_WORKSPACE/patches/patchinstall.sh --upstream-commit)
|
||||
|
||||
- name: Configure wine64
|
||||
|
@@ -1,183 +0,0 @@
|
||||
From 3cf6891f84548a9519bed5db83ad19e801ad8d22 Mon Sep 17 00:00:00 2001
|
||||
From: Paul Gofman <gofmanp@gmail.com>
|
||||
Date: Thu, 4 Apr 2019 02:25:00 +0300
|
||||
Subject: [PATCH] ddraw: Allow setting texture without DDSCAPS_TEXTURE for
|
||||
software device.
|
||||
|
||||
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
|
||||
---
|
||||
dlls/ddraw/device.c | 20 ++++++--
|
||||
dlls/ddraw/tests/ddraw4.c | 102 ++++++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 118 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c
|
||||
index c99eafc7524..49aae2feef5 100644
|
||||
--- a/dlls/ddraw/device.c
|
||||
+++ b/dlls/ddraw/device.c
|
||||
@@ -4822,7 +4822,8 @@ static HRESULT d3d_device7_SetTexture(IDirect3DDevice7 *iface,
|
||||
struct ddraw_surface *surf = unsafe_impl_from_IDirectDrawSurface7(texture);
|
||||
struct wined3d_texture *wined3d_texture = NULL;
|
||||
|
||||
- TRACE("iface %p, stage %u, texture %p.\n", iface, stage, texture);
|
||||
+ TRACE("iface %p, stage %u, texture %p, surf %p, surf->surface_desc.ddsCaps.dwCaps %#x.\n",
|
||||
+ iface, stage, texture, surf, surf ? surf->surface_desc.ddsCaps.dwCaps : 0);
|
||||
|
||||
if (surf && (surf->surface_desc.ddsCaps.dwCaps & DDSCAPS_TEXTURE))
|
||||
wined3d_texture = surf->draw_texture ? surf->draw_texture : surf->wined3d_texture;
|
||||
@@ -4858,19 +4859,30 @@ static HRESULT WINAPI d3d_device3_SetTexture(IDirect3DDevice3 *iface,
|
||||
{
|
||||
struct d3d_device *device = impl_from_IDirect3DDevice3(iface);
|
||||
struct ddraw_surface *tex = unsafe_impl_from_IDirect3DTexture2(texture);
|
||||
- HRESULT hr;
|
||||
+ struct wined3d_texture *wined3d_texture;
|
||||
|
||||
TRACE("iface %p, stage %u, texture %p.\n", iface, stage, texture);
|
||||
|
||||
wined3d_mutex_lock();
|
||||
|
||||
- hr = IDirect3DDevice7_SetTexture(&device->IDirect3DDevice7_iface, stage, &tex->IDirectDrawSurface7_iface);
|
||||
+ if (tex && ((tex->surface_desc.ddsCaps.dwCaps & DDSCAPS_TEXTURE) || !device->hardware_device))
|
||||
+ {
|
||||
+ if (!(tex->surface_desc.ddsCaps.dwCaps & DDSCAPS_TEXTURE))
|
||||
+ WARN("Setting texture without DDSCAPS_TEXTURE.\n");
|
||||
+ wined3d_texture = tex->wined3d_texture;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ wined3d_texture = NULL;
|
||||
+ }
|
||||
+
|
||||
+ wined3d_stateblock_set_texture(device->state, stage, wined3d_texture);
|
||||
|
||||
fixup_texture_alpha_op(device);
|
||||
|
||||
wined3d_mutex_unlock();
|
||||
|
||||
- return hr;
|
||||
+ return D3D_OK;
|
||||
}
|
||||
|
||||
static const struct tss_lookup
|
||||
diff --git a/dlls/ddraw/tests/ddraw4.c b/dlls/ddraw/tests/ddraw4.c
|
||||
index 5af824c3f78..032ae01fbf8 100644
|
||||
--- a/dlls/ddraw/tests/ddraw4.c
|
||||
+++ b/dlls/ddraw/tests/ddraw4.c
|
||||
@@ -18326,6 +18326,107 @@ static void run_for_each_device_type(void (*test_func)(const GUID *))
|
||||
test_func(&IID_IDirect3DRGBDevice);
|
||||
}
|
||||
|
||||
+static void test_texture_wrong_caps(const GUID *device_guid)
|
||||
+{
|
||||
+ static struct
|
||||
+ {
|
||||
+ struct vec3 position;
|
||||
+ struct vec2 texcoord;
|
||||
+ }
|
||||
+ quad[] =
|
||||
+ {
|
||||
+ {{-1.0f, -1.0f, 0.0f}, {0.0f, 1.0f}},
|
||||
+ {{-1.0f, 1.0f, 0.0f}, {0.0f, 0.0f}},
|
||||
+ {{ 1.0f, -1.0f, 0.0f}, {1.0f, 1.0f}},
|
||||
+ {{ 1.0f, 1.0f, 0.0f}, {1.0f, 0.0f}},
|
||||
+ };
|
||||
+ static DDPIXELFORMAT fmt =
|
||||
+ {
|
||||
+ sizeof(DDPIXELFORMAT), DDPF_RGB | DDPF_ALPHAPIXELS, 0,
|
||||
+ {32}, {0x00ff0000}, {0x0000ff00}, {0x000000ff}, {0xff000000}
|
||||
+ };
|
||||
+ D3DRECT clear_rect = {{0}, {0}, {640}, {480}};
|
||||
+ IDirectDrawSurface4 *surface, *rt;
|
||||
+ D3DCOLOR color, expected_color;
|
||||
+ IDirect3DViewport3 *viewport;
|
||||
+ IDirect3DTexture2 *texture;
|
||||
+ IDirect3DDevice3 *device;
|
||||
+ IDirectDraw4 *ddraw;
|
||||
+ DDSURFACEDESC2 ddsd;
|
||||
+ IDirect3D3 *d3d;
|
||||
+ ULONG refcount;
|
||||
+ HWND window;
|
||||
+ HRESULT hr;
|
||||
+
|
||||
+ window = create_window();
|
||||
+ if (!(device = create_device_ex(window, DDSCL_NORMAL, device_guid)))
|
||||
+ {
|
||||
+ skip("Failed to create a 3D device, skipping test.\n");
|
||||
+ DestroyWindow(window);
|
||||
+ return;
|
||||
+ }
|
||||
+ hr = IDirect3DDevice3_GetDirect3D(device, &d3d);
|
||||
+ ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
|
||||
+ hr = IDirect3D3_QueryInterface(d3d, &IID_IDirectDraw4, (void **)&ddraw);
|
||||
+ ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
|
||||
+ hr = IDirect3DDevice3_GetRenderTarget(device, &rt);
|
||||
+ ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
|
||||
+
|
||||
+ viewport = create_viewport(device, 0, 0, 640, 480);
|
||||
+ hr = IDirect3DDevice3_SetCurrentViewport(device, viewport);
|
||||
+ ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
|
||||
+
|
||||
+ memset(&ddsd, 0, sizeof(ddsd));
|
||||
+ ddsd.dwSize = sizeof(ddsd);
|
||||
+ ddsd.dwFlags = DDSD_CAPS | DDSD_HEIGHT | DDSD_WIDTH | DDSD_PIXELFORMAT;
|
||||
+ ddsd.dwHeight = 16;
|
||||
+ ddsd.dwWidth = 16;
|
||||
+ ddsd.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN;
|
||||
+ U4(ddsd).ddpfPixelFormat = fmt;
|
||||
+ hr = IDirectDraw4_CreateSurface(ddraw, &ddsd, &surface, NULL);
|
||||
+ ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
|
||||
+ hr = IDirectDrawSurface4_QueryInterface(surface, &IID_IDirect3DTexture2, (void **)&texture);
|
||||
+ ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
|
||||
+
|
||||
+ fill_surface(surface, 0xff00ff00);
|
||||
+
|
||||
+ hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_ZENABLE, D3DZB_FALSE);
|
||||
+ ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
|
||||
+
|
||||
+ hr = IDirect3DDevice3_SetTextureStageState(device, 0, D3DTSS_COLOROP, D3DTOP_SELECTARG1);
|
||||
+ ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
|
||||
+ hr = IDirect3DDevice3_SetTextureStageState(device, 0, D3DTSS_ALPHAOP, D3DTOP_SELECTARG1);
|
||||
+ ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
|
||||
+ hr = IDirect3DDevice3_SetTextureStageState(device, 0, D3DTSS_COLORARG1, D3DTA_TEXTURE);
|
||||
+ ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
|
||||
+ hr = IDirect3DDevice3_SetTextureStageState(device, 0, D3DTSS_ALPHAARG1, D3DTA_TEXTURE);
|
||||
+
|
||||
+ ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
|
||||
+ hr = IDirect3DDevice3_SetTexture(device, 0, texture);
|
||||
+ ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
|
||||
+ hr = IDirect3DViewport3_Clear2(viewport, 1, &clear_rect, D3DCLEAR_TARGET, 0x000000ff, 0.0f, 0);
|
||||
+ ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
|
||||
+ hr = IDirect3DDevice3_BeginScene(device);
|
||||
+ ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
|
||||
+ hr = IDirect3DDevice3_DrawPrimitive(device, D3DPT_TRIANGLESTRIP,
|
||||
+ D3DFVF_XYZ | D3DFVF_TEX1, quad, 4, 0);
|
||||
+ ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
|
||||
+ hr = IDirect3DDevice3_EndScene(device);
|
||||
+ ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
|
||||
+
|
||||
+ expected_color = is_software_device_type(device_guid) ? 0x0000ff00 : 0x00ffffff;
|
||||
+ color = get_surface_color(rt, 320, 240);
|
||||
+ ok(color == expected_color, "Got color 0x%08x, expected 0x%08x.\n", color, expected_color);
|
||||
+
|
||||
+ IDirect3DTexture2_Release(texture);
|
||||
+ IDirectDrawSurface4_Release(surface);
|
||||
+ IDirectDraw4_Release(ddraw);
|
||||
+ IDirect3D3_Release(d3d);
|
||||
+ refcount = IDirect3DDevice3_Release(device);
|
||||
+ ok(!refcount, "Device has %u references left.\n", refcount);
|
||||
+ DestroyWindow(window);
|
||||
+}
|
||||
+
|
||||
START_TEST(ddraw4)
|
||||
{
|
||||
DDDEVICEIDENTIFIER identifier;
|
||||
@@ -18458,6 +18559,7 @@ START_TEST(ddraw4)
|
||||
test_gdi_surface();
|
||||
test_alphatest();
|
||||
test_clipper_refcount();
|
||||
+ run_for_each_device_type(test_texture_wrong_caps);
|
||||
test_caps();
|
||||
test_d32_support();
|
||||
test_surface_format_conversion_alpha();
|
||||
--
|
||||
2.20.1
|
||||
|
@@ -1 +0,0 @@
|
||||
Fixes: [46948] Allow setting texture without DDSCAPS_TEXTURE for software device
|
@@ -1,4 +1,4 @@
|
||||
From c4e663329366c37bca65a0beb83d656afea45ecc Mon Sep 17 00:00:00 2001
|
||||
From 338fc447537dd45e07a3c2d9ef8069af910c936f Mon Sep 17 00:00:00 2001
|
||||
From: Austin English <austinenglish@gmail.com>
|
||||
Date: Tue, 13 Oct 2020 04:42:03 -0500
|
||||
Subject: [PATCH] dxapi.sys: add stub dll
|
||||
@@ -9,17 +9,16 @@ Signed-off-by: Austin English <austinenglish@gmail.com>
|
||||
dlls/dxapi.sys/Makefile.in | 6 ++++++
|
||||
dlls/dxapi.sys/dxapi.sys.spec | 7 +++++++
|
||||
dlls/dxapi.sys/version.rc | 26 ++++++++++++++++++++++++++
|
||||
loader/wine.inf.in | 2 ++
|
||||
5 files changed, 42 insertions(+)
|
||||
4 files changed, 40 insertions(+)
|
||||
create mode 100644 dlls/dxapi.sys/Makefile.in
|
||||
create mode 100644 dlls/dxapi.sys/dxapi.sys.spec
|
||||
create mode 100644 dlls/dxapi.sys/version.rc
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index da6ada3013b..47e8427f6b8 100644
|
||||
index d3cb3ed1fd6..86d6912b4e0 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -3248,6 +3248,7 @@ WINE_CONFIG_MAKEFILE(dlls/dwmapi/tests)
|
||||
@@ -3274,6 +3274,7 @@ WINE_CONFIG_MAKEFILE(dlls/dwmapi/tests)
|
||||
WINE_CONFIG_MAKEFILE(dlls/dwrite)
|
||||
WINE_CONFIG_MAKEFILE(dlls/dwrite/tests)
|
||||
WINE_CONFIG_MAKEFILE(dlls/dx8vb)
|
||||
@@ -84,26 +83,6 @@ index 00000000000..7ecd1565052
|
||||
+#define WINE_PRODUCTVERSION_STR "5.0.2180.1"
|
||||
+
|
||||
+#include "wine/wine_common_ver.rc"
|
||||
diff --git a/loader/wine.inf.in b/loader/wine.inf.in
|
||||
index 20d5243aa4b..b4052b146b4 100644
|
||||
--- a/loader/wine.inf.in
|
||||
+++ b/loader/wine.inf.in
|
||||
@@ -2632,6 +2632,7 @@ HKLM,%CurrentVersion%\Telephony\Country List\998,"SameAreaRule",,"G"
|
||||
10,syswow64,stdole2.tlb
|
||||
11,,iexplore.exe
|
||||
11,,winetest.exe,-
|
||||
+12,,dxapi.sys,-
|
||||
12,,dxgkrnl.sys,-
|
||||
12,,dxgmms1.sys,-
|
||||
12,,fltmgr.sys,-
|
||||
@@ -2689,6 +2690,7 @@ HKLM,%CurrentVersion%\Telephony\Country List\998,"SameAreaRule",,"G"
|
||||
11,,iexplore.exe
|
||||
11,,notepad.exe
|
||||
11,,winetest.exe,-
|
||||
+12,,dxapi.sys,-
|
||||
12,,dxgkrnl.sys
|
||||
12,,dxgmms1.sys
|
||||
12,,fltmgr.sys
|
||||
--
|
||||
2.20.1
|
||||
2.30.1
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 19ec5223ae49b6862ca6fc420a2c41f94befc0df Mon Sep 17 00:00:00 2001
|
||||
From bdc4be1fa3a5fca212eb8d146d114214399b9bd7 Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <zfigura@codeweavers.com>
|
||||
Date: Mon, 6 Jul 2020 12:09:22 -0500
|
||||
Subject: [PATCH] ntdll: Create eventfd-based objects for semaphores.
|
||||
@@ -16,17 +16,17 @@ Subject: [PATCH] ntdll: Create eventfd-based objects for semaphores.
|
||||
create mode 100644 dlls/ntdll/unix/esync.h
|
||||
|
||||
diff --git a/dlls/ntdll/Makefile.in b/dlls/ntdll/Makefile.in
|
||||
index b2f63d9f63a..5dc4ebb07fc 100644
|
||||
index 179d00b29ef..1de3490d4f0 100644
|
||||
--- a/dlls/ntdll/Makefile.in
|
||||
+++ b/dlls/ntdll/Makefile.in
|
||||
@@ -46,6 +46,7 @@ C_SRCS = \
|
||||
@@ -45,6 +45,7 @@ C_SRCS = \
|
||||
unix/cdrom.c \
|
||||
unix/debug.c \
|
||||
unix/env.c \
|
||||
+ unix/esync.c \
|
||||
unix/file.c \
|
||||
unix/loader.c \
|
||||
unix/process.c \
|
||||
unix/loadorder.c \
|
||||
diff --git a/dlls/ntdll/unix/esync.c b/dlls/ntdll/unix/esync.c
|
||||
new file mode 100644
|
||||
index 00000000000..7c409c7a9ca
|
||||
@@ -348,7 +348,7 @@ index 00000000000..a50a755149a
|
||||
+
|
||||
+extern int receive_fd( obj_handle_t *handle ) DECLSPEC_HIDDEN;
|
||||
diff --git a/dlls/ntdll/unix/loader.c b/dlls/ntdll/unix/loader.c
|
||||
index c4f897f3d0d..0012d8d08af 100644
|
||||
index 20f614f59f1..afbb0e391f3 100644
|
||||
--- a/dlls/ntdll/unix/loader.c
|
||||
+++ b/dlls/ntdll/unix/loader.c
|
||||
@@ -89,6 +89,7 @@
|
||||
@@ -359,7 +359,7 @@ index c4f897f3d0d..0012d8d08af 100644
|
||||
#include "wine/list.h"
|
||||
#include "wine/debug.h"
|
||||
|
||||
@@ -1649,6 +1650,7 @@ static void start_main_thread(void)
|
||||
@@ -1602,6 +1603,7 @@ static void start_main_thread(void)
|
||||
signal_init_thread( teb );
|
||||
dbg_init();
|
||||
startup_info_size = server_init_process();
|
||||
@@ -368,7 +368,7 @@ index c4f897f3d0d..0012d8d08af 100644
|
||||
init_cpu_info();
|
||||
syscall_dispatcher = signal_init_syscalls();
|
||||
diff --git a/dlls/ntdll/unix/server.c b/dlls/ntdll/unix/server.c
|
||||
index 6af8effe9e1..401d439b363 100644
|
||||
index 4f149c0f644..59f409ead8c 100644
|
||||
--- a/dlls/ntdll/unix/server.c
|
||||
+++ b/dlls/ntdll/unix/server.c
|
||||
@@ -112,7 +112,7 @@ timeout_t server_start_time = 0; /* time of server startup */
|
||||
@@ -380,7 +380,7 @@ index 6af8effe9e1..401d439b363 100644
|
||||
|
||||
/* atomically exchange a 64-bit value */
|
||||
static inline LONG64 interlocked_xchg64( LONG64 *dest, LONG64 val )
|
||||
@@ -832,7 +832,7 @@ void CDECL wine_server_send_fd( int fd )
|
||||
@@ -835,7 +835,7 @@ void CDECL wine_server_send_fd( int fd )
|
||||
*
|
||||
* Receive a file descriptor passed from the server.
|
||||
*/
|
||||
@@ -424,5 +424,5 @@ index a571855c70a..e41bbbf9349 100644
|
||||
int do_esync(void)
|
||||
{
|
||||
--
|
||||
2.20.1
|
||||
2.30.1
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From f0d0cdcb048b4af8003ba5279bd90293ecc7f8ba Mon Sep 17 00:00:00 2001
|
||||
From 7e750cacff9e1db07141e02f3763d2b24720a00b Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <zfigura@codeweavers.com>
|
||||
Date: Mon, 6 Jul 2020 12:20:44 -0500
|
||||
Subject: [PATCH] ntdll: Implement NtClose().
|
||||
@@ -51,7 +51,7 @@ index 09838e95535..14e52416764 100644
|
||||
extern NTSTATUS esync_create_semaphore(HANDLE *handle, ACCESS_MASK access,
|
||||
const OBJECT_ATTRIBUTES *attr, LONG initial, LONG max) DECLSPEC_HIDDEN;
|
||||
diff --git a/dlls/ntdll/unix/server.c b/dlls/ntdll/unix/server.c
|
||||
index 971341bf6e0..d8837f6fde0 100644
|
||||
index 2f1d106a8da..af67e57176a 100644
|
||||
--- a/dlls/ntdll/unix/server.c
|
||||
+++ b/dlls/ntdll/unix/server.c
|
||||
@@ -88,6 +88,7 @@
|
||||
@@ -62,9 +62,9 @@ index 971341bf6e0..d8837f6fde0 100644
|
||||
#include "ddk/wdm.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(server);
|
||||
@@ -1644,6 +1645,9 @@ NTSTATUS WINAPI NtClose( HANDLE handle )
|
||||
NTSTATUS ret;
|
||||
int fd = remove_fd_from_cache( handle );
|
||||
@@ -1762,6 +1763,9 @@ NTSTATUS WINAPI NtClose( HANDLE handle )
|
||||
* retrieve it again */
|
||||
fd = remove_fd_from_cache( handle );
|
||||
|
||||
+ if (do_esync())
|
||||
+ esync_close( handle );
|
||||
@@ -73,5 +73,5 @@ index 971341bf6e0..d8837f6fde0 100644
|
||||
{
|
||||
req->handle = wine_server_obj_handle( handle );
|
||||
--
|
||||
2.28.0
|
||||
2.30.2
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,4 @@
|
||||
From 1a2cd66380cef9a1f8a7a03f98d5f7af7c889bea Mon Sep 17 00:00:00 2001
|
||||
From ab9811ec42c11a8dc6f4e756838886bf55b244bb Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <z.figura12@gmail.com>
|
||||
Date: Sat, 7 Jul 2018 12:57:47 +0200
|
||||
Subject: [PATCH] server: Create eventfd descriptors for pseudo-fd objects and
|
||||
@@ -11,7 +11,7 @@ Subject: [PATCH] server: Create eventfd descriptors for pseudo-fd objects and
|
||||
3 files changed, 25 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/server/fd.c b/server/fd.c
|
||||
index 38f3ab79226..252236fbb91 100644
|
||||
index 50f915ed503..36f9770aed3 100644
|
||||
--- a/server/fd.c
|
||||
+++ b/server/fd.c
|
||||
@@ -102,6 +102,7 @@
|
||||
@@ -64,7 +64,7 @@ index 38f3ab79226..252236fbb91 100644
|
||||
return fd;
|
||||
}
|
||||
|
||||
@@ -2202,6 +2212,9 @@ void set_fd_signaled( struct fd *fd, int signaled )
|
||||
@@ -2263,6 +2273,9 @@ void set_fd_signaled( struct fd *fd, int signaled )
|
||||
if (fd->comp_flags & FILE_SKIP_SET_EVENT_ON_HANDLE) return;
|
||||
fd->signaled = signaled;
|
||||
if (signaled) wake_up( fd->user, 0 );
|
||||
@@ -73,8 +73,8 @@ index 38f3ab79226..252236fbb91 100644
|
||||
+ esync_clear( fd->esync_fd );
|
||||
}
|
||||
|
||||
/* handler for close_handle that refuses to close fd-associated handles in other processes */
|
||||
@@ -2233,6 +2246,15 @@ int default_fd_signaled( struct object *obj, struct wait_queue_entry *entry )
|
||||
/* check if events are pending and if yes return which one(s) */
|
||||
@@ -2288,6 +2301,15 @@ int default_fd_signaled( struct object *obj, struct wait_queue_entry *entry )
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -91,10 +91,10 @@ index 38f3ab79226..252236fbb91 100644
|
||||
{
|
||||
int events = 0;
|
||||
diff --git a/server/file.h b/server/file.h
|
||||
index 3b70799a3ec..f332c685add 100644
|
||||
index 0fa66e5750a..edafb4a1ca7 100644
|
||||
--- a/server/file.h
|
||||
+++ b/server/file.h
|
||||
@@ -104,6 +104,7 @@ extern char *dup_fd_name( struct fd *root, const char *name );
|
||||
@@ -103,6 +103,7 @@ extern char *dup_fd_name( struct fd *root, const char *name );
|
||||
extern void get_nt_name( struct fd *fd, struct unicode_str *name );
|
||||
|
||||
extern int default_fd_signaled( struct object *obj, struct wait_queue_entry *entry );
|
||||
@@ -103,7 +103,7 @@ index 3b70799a3ec..f332c685add 100644
|
||||
extern void default_poll_event( struct fd *fd, int event );
|
||||
extern void fd_queue_async( struct fd *fd, struct async *async, int type );
|
||||
diff --git a/server/named_pipe.c b/server/named_pipe.c
|
||||
index 14596d46f6c..9b8fa97c67e 100644
|
||||
index d756de18db0..3ed9a543fdc 100644
|
||||
--- a/server/named_pipe.c
|
||||
+++ b/server/named_pipe.c
|
||||
@@ -168,7 +168,7 @@ static const struct object_ops pipe_server_ops =
|
||||
@@ -125,5 +125,5 @@ index 14596d46f6c..9b8fa97c67e 100644
|
||||
no_signal, /* signal */
|
||||
pipe_end_get_fd, /* get_fd */
|
||||
--
|
||||
2.20.1
|
||||
2.30.2
|
||||
|
||||
|
@@ -1,18 +1,18 @@
|
||||
From 34b3bcb23bf0a4b81b1cddca90f8a248f478fee5 Mon Sep 17 00:00:00 2001
|
||||
From b2a5efcef525f887c7fe40ce3ed0a8a47c42d5fc Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Thu, 26 Feb 2015 06:41:26 +0100
|
||||
Subject: [PATCH] kernelbase: Add support for progress callback in CopyFileEx.
|
||||
|
||||
---
|
||||
dlls/kernel32/tests/file.c | 6 ----
|
||||
dlls/kernelbase/file.c | 65 ++++++++++++++++++++++++++++++++++++--
|
||||
2 files changed, 63 insertions(+), 8 deletions(-)
|
||||
dlls/kernel32/tests/file.c | 6 ---
|
||||
dlls/kernelbase/file.c | 77 +++++++++++++++++++++++++++++++++++---
|
||||
2 files changed, 71 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/dlls/kernel32/tests/file.c b/dlls/kernel32/tests/file.c
|
||||
index 2e26e2ace86..1cccb105448 100644
|
||||
index 6ea9dffde5c..b12d0477e04 100644
|
||||
--- a/dlls/kernel32/tests/file.c
|
||||
+++ b/dlls/kernel32/tests/file.c
|
||||
@@ -1173,23 +1173,17 @@ static void test_CopyFileEx(void)
|
||||
@@ -1169,23 +1169,17 @@ static void test_CopyFileEx(void)
|
||||
ok(hfile != INVALID_HANDLE_VALUE, "failed to open destination file, error %d\n", GetLastError());
|
||||
SetLastError(0xdeadbeef);
|
||||
retok = CopyFileExA(source, dest, copy_progress_cb, hfile, NULL, 0);
|
||||
@@ -37,10 +37,17 @@ index 2e26e2ace86..1cccb105448 100644
|
||||
|
||||
retok = CopyFileExA(source, NULL, copy_progress_cb, hfile, NULL, 0);
|
||||
diff --git a/dlls/kernelbase/file.c b/dlls/kernelbase/file.c
|
||||
index 3b00321eb1a..ab95c8babf1 100644
|
||||
index 23a36b0a765..98cf7e58368 100644
|
||||
--- a/dlls/kernelbase/file.c
|
||||
+++ b/dlls/kernelbase/file.c
|
||||
@@ -503,6 +503,10 @@ BOOL WINAPI CopyFileExW( const WCHAR *source, const WCHAR *dest, LPPROGRESS_ROUT
|
||||
@@ -499,11 +499,16 @@ BOOL WINAPI CopyFileExW( const WCHAR *source, const WCHAR *dest, LPPROGRESS_ROUT
|
||||
{
|
||||
static const int buffer_size = 65536;
|
||||
HANDLE h1, h2;
|
||||
- FILE_BASIC_INFORMATION info;
|
||||
+ FILE_NETWORK_OPEN_INFORMATION info;
|
||||
+ FILE_BASIC_INFORMATION basic_info;
|
||||
IO_STATUS_BLOCK io;
|
||||
DWORD count;
|
||||
BOOL ret = FALSE;
|
||||
char *buffer;
|
||||
@@ -51,7 +58,7 @@ index 3b00321eb1a..ab95c8babf1 100644
|
||||
|
||||
if (!source || !dest)
|
||||
{
|
||||
@@ -517,7 +521,15 @@ BOOL WINAPI CopyFileExW( const WCHAR *source, const WCHAR *dest, LPPROGRESS_ROUT
|
||||
@@ -518,7 +523,15 @@ BOOL WINAPI CopyFileExW( const WCHAR *source, const WCHAR *dest, LPPROGRESS_ROUT
|
||||
|
||||
TRACE("%s -> %s, %x\n", debugstr_w(source), debugstr_w(dest), flags);
|
||||
|
||||
@@ -68,25 +75,33 @@ index 3b00321eb1a..ab95c8babf1 100644
|
||||
NULL, OPEN_EXISTING, 0, 0 )) == INVALID_HANDLE_VALUE)
|
||||
{
|
||||
WARN("Unable to open source %s\n", debugstr_w(source));
|
||||
@@ -551,7 +563,11 @@ BOOL WINAPI CopyFileExW( const WCHAR *source, const WCHAR *dest, LPPROGRESS_ROUT
|
||||
@@ -526,7 +539,7 @@ BOOL WINAPI CopyFileExW( const WCHAR *source, const WCHAR *dest, LPPROGRESS_ROUT
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
- if (!set_ntstatus( NtQueryInformationFile( h1, &io, &info, sizeof(info), FileBasicInformation )))
|
||||
+ if (!set_ntstatus( NtQueryInformationFile( h1, &io, &info, sizeof(info), FileNetworkOpenInformation )))
|
||||
{
|
||||
WARN("GetFileInformationByHandle returned error for %s\n", debugstr_w(source));
|
||||
HeapFree( GetProcessHeap(), 0, buffer );
|
||||
@@ -552,7 +565,11 @@ BOOL WINAPI CopyFileExW( const WCHAR *source, const WCHAR *dest, LPPROGRESS_ROUT
|
||||
}
|
||||
}
|
||||
|
||||
- if ((h2 = CreateFileW( dest, GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL,
|
||||
+ if ((h2 = CreateFileW( dest, GENERIC_WRITE | DELETE, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL,
|
||||
+ (flags & COPY_FILE_FAIL_IF_EXISTS) ? CREATE_NEW : CREATE_ALWAYS,
|
||||
+ info.dwFileAttributes, h1 )) == INVALID_HANDLE_VALUE &&
|
||||
+ info.FileAttributes, h1 )) == INVALID_HANDLE_VALUE &&
|
||||
+ /* retry without DELETE if we got a sharing violation */
|
||||
+ (h2 = CreateFileW( dest, GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL,
|
||||
(flags & COPY_FILE_FAIL_IF_EXISTS) ? CREATE_NEW : CREATE_ALWAYS,
|
||||
info.dwFileAttributes, h1 )) == INVALID_HANDLE_VALUE)
|
||||
info.FileAttributes, h1 )) == INVALID_HANDLE_VALUE)
|
||||
{
|
||||
@@ -561,6 +577,30 @@ BOOL WINAPI CopyFileExW( const WCHAR *source, const WCHAR *dest, LPPROGRESS_ROUT
|
||||
@@ -562,6 +579,29 @@ BOOL WINAPI CopyFileExW( const WCHAR *source, const WCHAR *dest, LPPROGRESS_ROUT
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
+ size.u.LowPart = info.nFileSizeLow;
|
||||
+ size.u.HighPart = info.nFileSizeHigh;
|
||||
+ size = info.EndOfFile;
|
||||
+ transferred.QuadPart = 0;
|
||||
+
|
||||
+ if (progress)
|
||||
@@ -112,7 +127,7 @@ index 3b00321eb1a..ab95c8babf1 100644
|
||||
while (ReadFile( h1, buffer, buffer_size, &count, NULL ) && count)
|
||||
{
|
||||
char *p = buffer;
|
||||
@@ -570,6 +610,27 @@ BOOL WINAPI CopyFileExW( const WCHAR *source, const WCHAR *dest, LPPROGRESS_ROUT
|
||||
@@ -571,13 +611,38 @@ BOOL WINAPI CopyFileExW( const WCHAR *source, const WCHAR *dest, LPPROGRESS_ROUT
|
||||
if (!WriteFile( h2, p, count, &res, NULL ) || !res) goto done;
|
||||
p += res;
|
||||
count -= res;
|
||||
@@ -140,6 +155,19 @@ index 3b00321eb1a..ab95c8babf1 100644
|
||||
}
|
||||
}
|
||||
ret = TRUE;
|
||||
done:
|
||||
/* Maintain the timestamp of source file to destination file */
|
||||
- info.FileAttributes = 0;
|
||||
- NtSetInformationFile( h2, &io, &info, sizeof(info), FileBasicInformation );
|
||||
+ basic_info.CreationTime = info.CreationTime;
|
||||
+ basic_info.LastAccessTime = info.LastAccessTime;
|
||||
+ basic_info.LastWriteTime = info.LastWriteTime;
|
||||
+ basic_info.ChangeTime = info.ChangeTime;
|
||||
+ basic_info.FileAttributes = 0;
|
||||
+ NtSetInformationFile( h2, &io, &basic_info, sizeof(basic_info), FileBasicInformation );
|
||||
HeapFree( GetProcessHeap(), 0, buffer );
|
||||
CloseHandle( h1 );
|
||||
CloseHandle( h2 );
|
||||
--
|
||||
2.26.2
|
||||
2.30.2
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From b9815e86e026c431050253146177f5c624a28756 Mon Sep 17 00:00:00 2001
|
||||
From 5d866aebeeb7760eed0f35a206d43ef32bafbffe Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Sat, 5 Aug 2017 03:38:38 +0200
|
||||
Subject: [PATCH] ntdll: Add inline versions of RtlEnterCriticalSection /
|
||||
@@ -9,7 +9,7 @@ Subject: [PATCH] ntdll: Add inline versions of RtlEnterCriticalSection /
|
||||
1 file changed, 34 insertions(+)
|
||||
|
||||
diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h
|
||||
index 67696f80db3..f25d8adc217 100644
|
||||
index b8f9dc28e63..444feb5d152 100644
|
||||
--- a/dlls/ntdll/ntdll_misc.h
|
||||
+++ b/dlls/ntdll/ntdll_misc.h
|
||||
@@ -26,6 +26,7 @@
|
||||
@@ -20,7 +20,7 @@ index 67696f80db3..f25d8adc217 100644
|
||||
#include "wine/asm.h"
|
||||
|
||||
#define DECLARE_CRITICAL_SECTION(cs) \
|
||||
@@ -96,6 +97,39 @@ extern int ntdll_wcstoumbs( const WCHAR* src, DWORD srclen, char* dst, DWORD dst
|
||||
@@ -88,6 +89,39 @@ extern struct _KUSER_SHARED_DATA *user_shared_data DECLSPEC_HIDDEN;
|
||||
extern int CDECL NTDLL__vsnprintf( char *str, SIZE_T len, const char *format, __ms_va_list args ) DECLSPEC_HIDDEN;
|
||||
extern int CDECL NTDLL__vsnwprintf( WCHAR *str, SIZE_T len, const WCHAR *format, __ms_va_list args ) DECLSPEC_HIDDEN;
|
||||
|
||||
@@ -59,7 +59,7 @@ index 67696f80db3..f25d8adc217 100644
|
||||
+
|
||||
/* load order */
|
||||
|
||||
enum loadorder
|
||||
#ifndef _WIN64
|
||||
--
|
||||
2.30.0
|
||||
2.30.1
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 0a07ca826c7991b6c4e2455ff374e6fee4f93b93 Mon Sep 17 00:00:00 2001
|
||||
From 45940635b59cf3183e26ab3ffd2b8f486161e5ad Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Mon, 3 Apr 2017 05:30:27 +0200
|
||||
Subject: [PATCH] ntdll: Implement HashLinks field in LDR module data.
|
||||
@@ -110,10 +110,10 @@ index 1db68a191a3..bec46088518 100644
|
||||
test_dll_file( "kernel32.dll" );
|
||||
test_dll_file( "advapi32.dll" );
|
||||
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
|
||||
index 6c86e6b2e6c..b8d6adaf390 100644
|
||||
index 01644df7763..8c6d05cb94e 100644
|
||||
--- a/dlls/ntdll/loader.c
|
||||
+++ b/dlls/ntdll/loader.c
|
||||
@@ -114,6 +114,9 @@ struct file_id
|
||||
@@ -112,6 +112,9 @@ struct file_id
|
||||
BYTE ObjectId[16];
|
||||
};
|
||||
|
||||
@@ -123,7 +123,7 @@ index 6c86e6b2e6c..b8d6adaf390 100644
|
||||
/* internal representation of loaded modules */
|
||||
typedef struct _wine_modref
|
||||
{
|
||||
@@ -453,6 +456,52 @@ static void call_ldr_notifications( ULONG reason, LDR_DATA_TABLE_ENTRY *module )
|
||||
@@ -450,6 +453,52 @@ static void call_ldr_notifications( ULONG reason, LDR_DATA_TABLE_ENTRY *module )
|
||||
}
|
||||
}
|
||||
|
||||
@@ -176,7 +176,7 @@ index 6c86e6b2e6c..b8d6adaf390 100644
|
||||
/*************************************************************************
|
||||
* get_modref
|
||||
*
|
||||
@@ -1195,7 +1244,12 @@ static WINE_MODREF *alloc_module( HMODULE hModule, const UNICODE_STRING *nt_name
|
||||
@@ -1196,7 +1245,12 @@ static WINE_MODREF *alloc_module( HMODULE hModule, const UNICODE_STRING *nt_name
|
||||
&wm->ldr.InLoadOrderLinks);
|
||||
InsertTailList(&NtCurrentTeb()->Peb->LdrData->InMemoryOrderModuleList,
|
||||
&wm->ldr.InMemoryOrderLinks);
|
||||
@@ -189,7 +189,7 @@ index 6c86e6b2e6c..b8d6adaf390 100644
|
||||
|
||||
if (!(nt->OptionalHeader.DllCharacteristics & IMAGE_DLLCHARACTERISTICS_NX_COMPAT))
|
||||
{
|
||||
@@ -1873,6 +1927,7 @@ static NTSTATUS build_module( LPCWSTR load_path, const UNICODE_STRING *nt_name,
|
||||
@@ -1876,6 +1930,7 @@ static NTSTATUS build_module( LPCWSTR load_path, const UNICODE_STRING *nt_name,
|
||||
/* the module has only be inserted in the load & memory order lists */
|
||||
RemoveEntryList(&wm->ldr.InLoadOrderLinks);
|
||||
RemoveEntryList(&wm->ldr.InMemoryOrderLinks);
|
||||
@@ -197,7 +197,7 @@ index 6c86e6b2e6c..b8d6adaf390 100644
|
||||
|
||||
/* FIXME: there are several more dangling references
|
||||
* left. Including dlls loaded by this dll before the
|
||||
@@ -3246,6 +3301,7 @@ static void free_modref( WINE_MODREF *wm )
|
||||
@@ -3277,6 +3332,7 @@ static void free_modref( WINE_MODREF *wm )
|
||||
{
|
||||
RemoveEntryList(&wm->ldr.InLoadOrderLinks);
|
||||
RemoveEntryList(&wm->ldr.InMemoryOrderLinks);
|
||||
@@ -205,7 +205,7 @@ index 6c86e6b2e6c..b8d6adaf390 100644
|
||||
if (wm->ldr.InInitializationOrderLinks.Flink)
|
||||
RemoveEntryList(&wm->ldr.InInitializationOrderLinks);
|
||||
|
||||
@@ -3973,6 +4029,7 @@ static NTSTATUS process_init(void)
|
||||
@@ -3979,6 +4035,7 @@ static NTSTATUS process_init(void)
|
||||
INITIAL_TEB stack;
|
||||
TEB *teb = NtCurrentTeb();
|
||||
PEB *peb = teb->Peb;
|
||||
@@ -213,18 +213,18 @@ index 6c86e6b2e6c..b8d6adaf390 100644
|
||||
|
||||
peb->LdrData = &ldr;
|
||||
peb->FastPebLock = &peb_lock;
|
||||
@@ -4006,6 +4063,10 @@ static NTSTATUS process_init(void)
|
||||
load_global_options();
|
||||
version_init();
|
||||
@@ -4002,6 +4059,10 @@ static NTSTATUS process_init(void)
|
||||
InitializeListHead( &ldr.InMemoryOrderModuleList );
|
||||
InitializeListHead( &ldr.InInitializationOrderModuleList );
|
||||
|
||||
+ /* initialize hash table */
|
||||
+ for (i = 0; i < HASH_MAP_SIZE; i++)
|
||||
+ InitializeListHead(&hash_table[i]);
|
||||
+
|
||||
if (!(status = load_dll( params->DllPath.Buffer, params->ImagePathName.Buffer, NULL,
|
||||
DONT_RESOLVE_DLL_REFERENCES, &wm )))
|
||||
{
|
||||
@@ -4094,6 +4155,10 @@ static NTSTATUS process_init(void)
|
||||
#ifndef _WIN64
|
||||
is_wow64 = !!NtCurrentTeb64();
|
||||
#endif
|
||||
@@ -4050,6 +4111,10 @@ static NTSTATUS process_init(void)
|
||||
teb->Tib.StackBase = stack.StackBase;
|
||||
teb->Tib.StackLimit = stack.StackLimit;
|
||||
teb->DeallocationStack = stack.DeallocationStack;
|
||||
@@ -236,10 +236,10 @@ index 6c86e6b2e6c..b8d6adaf390 100644
|
||||
}
|
||||
|
||||
diff --git a/include/winternl.h b/include/winternl.h
|
||||
index f0ab223ef2e..b6676717436 100644
|
||||
index fcdedaec8aa..6ea72da54f7 100644
|
||||
--- a/include/winternl.h
|
||||
+++ b/include/winternl.h
|
||||
@@ -2794,8 +2794,8 @@ typedef struct _LDR_DATA_TABLE_ENTRY
|
||||
@@ -3040,8 +3040,8 @@ typedef struct _LDR_DATA_TABLE_ENTRY
|
||||
ULONG Flags;
|
||||
SHORT LoadCount;
|
||||
SHORT TlsIndex;
|
||||
@@ -250,5 +250,5 @@ index f0ab223ef2e..b6676717436 100644
|
||||
HANDLE ActivationContext;
|
||||
void* Lock;
|
||||
--
|
||||
2.20.1
|
||||
2.30.2
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 9970a7ac4c75019023d35ab7fadcfa8e5d6af32f Mon Sep 17 00:00:00 2001
|
||||
From 1669a5998c69cf1f99b52d8917d0b0f977862374 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Sat, 30 May 2015 02:23:15 +0200
|
||||
Subject: [PATCH] ntdll: Add support for hiding wine version information from
|
||||
@@ -10,10 +10,10 @@ Subject: [PATCH] ntdll: Add support for hiding wine version information from
|
||||
2 files changed, 103 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
|
||||
index 1110fa37b6d..f0a9748b5fa 100644
|
||||
index 61951663866..dca5551cdb7 100644
|
||||
--- a/dlls/ntdll/loader.c
|
||||
+++ b/dlls/ntdll/loader.c
|
||||
@@ -75,6 +75,9 @@ BOOL is_wow64 = FALSE;
|
||||
@@ -74,6 +74,9 @@ BOOL is_wow64 = FALSE;
|
||||
/* system search path */
|
||||
static const WCHAR system_path[] = L"C:\\windows\\system32;C:\\windows\\system;C:\\windows";
|
||||
|
||||
@@ -32,7 +32,7 @@ index 1110fa37b6d..f0a9748b5fa 100644
|
||||
struct ldr_notification
|
||||
{
|
||||
struct list entry;
|
||||
@@ -1757,6 +1762,96 @@ NTSTATUS WINAPI LdrUnlockLoaderLock( ULONG flags, ULONG_PTR magic )
|
||||
@@ -1729,6 +1734,96 @@ NTSTATUS WINAPI LdrUnlockLoaderLock( ULONG flags, ULONG_PTR magic )
|
||||
}
|
||||
|
||||
|
||||
@@ -129,29 +129,29 @@ index 1110fa37b6d..f0a9748b5fa 100644
|
||||
/******************************************************************
|
||||
* LdrGetProcedureAddress (NTDLL.@)
|
||||
*/
|
||||
@@ -1777,7 +1872,7 @@ NTSTATUS WINAPI LdrGetProcedureAddress(HMODULE module, const ANSI_STRING *name,
|
||||
LPCWSTR load_path = NtCurrentTeb()->Peb->ProcessParameters->DllPath.Buffer;
|
||||
void *proc = name ? find_named_export( module, exports, exp_size, name->Buffer, -1, load_path )
|
||||
: find_ordinal_export( module, exports, exp_size, ord - exports->Base, load_path );
|
||||
@@ -1748,7 +1843,7 @@ NTSTATUS WINAPI LdrGetProcedureAddress(HMODULE module, const ANSI_STRING *name,
|
||||
{
|
||||
void *proc = name ? find_named_export( module, exports, exp_size, name->Buffer, -1, NULL )
|
||||
: find_ordinal_export( module, exports, exp_size, ord - exports->Base, NULL );
|
||||
- if (proc)
|
||||
+ if (proc && !is_hidden_export( proc ))
|
||||
{
|
||||
*address = proc;
|
||||
ret = STATUS_SUCCESS;
|
||||
@@ -4156,6 +4251,8 @@ static NTSTATUS process_init(void)
|
||||
NtTerminateProcess( GetCurrentProcess(), status );
|
||||
}
|
||||
|
||||
+ hidden_exports_init( wm->ldr.FullDllName.Buffer );
|
||||
@@ -1993,6 +2088,8 @@ static void build_ntdll_module(void)
|
||||
assert( wm );
|
||||
wm->ldr.Flags &= ~LDR_DONT_RESOLVE_REFS;
|
||||
if (TRACE_ON(relay)) RELAY_SetupDLL( meminfo.AllocationBase );
|
||||
+
|
||||
#ifndef _WIN64
|
||||
if (NtCurrentTeb64())
|
||||
{
|
||||
+ hidden_exports_init( wm->ldr.FullDllName.Buffer );
|
||||
}
|
||||
|
||||
|
||||
diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h
|
||||
index 3bd70b60874..98629129c44 100644
|
||||
index 9ebdeaebfe0..39bb0c1ff6f 100644
|
||||
--- a/dlls/ntdll/ntdll_misc.h
|
||||
+++ b/dlls/ntdll/ntdll_misc.h
|
||||
@@ -155,6 +155,11 @@ static inline TEB64 *NtCurrentTeb64(void) { return (TEB64 *)NtCurrentTeb()->GdiB
|
||||
@@ -136,6 +136,11 @@ static inline TEB64 *NtCurrentTeb64(void) { return (TEB64 *)NtCurrentTeb()->GdiB
|
||||
|
||||
NTSTATUS WINAPI RtlHashUnicodeString(PCUNICODE_STRING,BOOLEAN,ULONG,ULONG*);
|
||||
|
||||
@@ -164,5 +164,5 @@ index 3bd70b60874..98629129c44 100644
|
||||
static inline void ascii_to_unicode( WCHAR *dst, const char *src, size_t len )
|
||||
{
|
||||
--
|
||||
2.29.2
|
||||
2.30.2
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 002d5f21931d383a28be7aefdcb0a5299e51afb8 Mon Sep 17 00:00:00 2001
|
||||
From 17e0fb2e0be8d53b485c96941faaa76d30d0c032 Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <z.figura12@gmail.com>
|
||||
Date: Mon, 31 Aug 2020 23:03:34 -0500
|
||||
Subject: [PATCH] ntdll: Implement thread-id alerts on top of Mach semaphores
|
||||
@@ -104,7 +104,7 @@ index 87f5a97131e..e97a9657f03 100644
|
||||
pthread_attr_init( &pthread_attr );
|
||||
pthread_attr_setstack( &pthread_attr, teb->DeallocationStack,
|
||||
diff --git a/dlls/ntdll/unix/unix_private.h b/dlls/ntdll/unix/unix_private.h
|
||||
index f7aec55e355..4b4b90f4944 100644
|
||||
index 2da19c6844f..3c4d5dd8a2b 100644
|
||||
--- a/dlls/ntdll/unix/unix_private.h
|
||||
+++ b/dlls/ntdll/unix/unix_private.h
|
||||
@@ -27,6 +27,11 @@
|
||||
@@ -118,8 +118,8 @@ index f7aec55e355..4b4b90f4944 100644
|
||||
+
|
||||
#ifdef __i386__
|
||||
static const enum cpu_type client_cpu = CPU_x86;
|
||||
#elif defined(__x86_64__)
|
||||
@@ -58,10 +63,14 @@ struct ntdll_thread_data
|
||||
static const WORD current_machine = IMAGE_FILE_MACHINE_I386;
|
||||
@@ -62,10 +67,14 @@ struct ntdll_thread_data
|
||||
struct list entry; /* entry in TEB list */
|
||||
PRTL_THREAD_START_ROUTINE start; /* thread entry point */
|
||||
void *param; /* thread entry point parameter */
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 3e0bb8dbe1b283b3af1becbc0d2d669e2706d16d Mon Sep 17 00:00:00 2001
|
||||
From 65673c61b09de27189b5f319073e6807d8dbed9e Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <z.figura12@gmail.com>
|
||||
Date: Mon, 2 Nov 2020 20:24:07 -0600
|
||||
Subject: [PATCH] ntdll: Reimplement Win32 futexes on top of thread-ID alerts.
|
||||
@@ -14,10 +14,10 @@ Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
|
||||
6 files changed, 187 insertions(+), 173 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h
|
||||
index 0ea8fdd2ce0..bb606fcdddd 100644
|
||||
index b8f9dc28e63..eab3b5e5248 100644
|
||||
--- a/dlls/ntdll/ntdll_misc.h
|
||||
+++ b/dlls/ntdll/ntdll_misc.h
|
||||
@@ -86,6 +86,8 @@ extern const struct unix_funcs *unix_funcs DECLSPEC_HIDDEN;
|
||||
@@ -85,6 +85,8 @@ extern const struct unix_funcs *unix_funcs DECLSPEC_HIDDEN;
|
||||
|
||||
extern struct _KUSER_SHARED_DATA *user_shared_data DECLSPEC_HIDDEN;
|
||||
|
||||
@@ -261,10 +261,10 @@ index 25496609f08..4f395336428 100644
|
||||
}
|
||||
|
||||
diff --git a/dlls/ntdll/unix/loader.c b/dlls/ntdll/unix/loader.c
|
||||
index 3cc4a4ccccb..b2edf9ff710 100644
|
||||
index 438ff474a92..a962eb46ead 100644
|
||||
--- a/dlls/ntdll/unix/loader.c
|
||||
+++ b/dlls/ntdll/unix/loader.c
|
||||
@@ -1692,9 +1692,6 @@ static struct unix_funcs unix_funcs =
|
||||
@@ -1757,9 +1757,6 @@ static struct unix_funcs unix_funcs =
|
||||
#endif
|
||||
DbgUiIssueRemoteBreakin,
|
||||
RtlGetSystemTimePrecise,
|
||||
@@ -275,10 +275,10 @@ index 3cc4a4ccccb..b2edf9ff710 100644
|
||||
fast_RtlpUnWaitCriticalSection,
|
||||
fast_RtlDeleteCriticalSection,
|
||||
diff --git a/dlls/ntdll/unix/sync.c b/dlls/ntdll/unix/sync.c
|
||||
index 0fee8f3099d..d68dfbbf6af 100644
|
||||
index 7d6423083e1..41005425a90 100644
|
||||
--- a/dlls/ntdll/unix/sync.c
|
||||
+++ b/dlls/ntdll/unix/sync.c
|
||||
@@ -78,10 +78,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(sync);
|
||||
@@ -77,10 +77,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(sync);
|
||||
|
||||
HANDLE keyed_event = 0;
|
||||
|
||||
@@ -289,7 +289,7 @@ index 0fee8f3099d..d68dfbbf6af 100644
|
||||
static const char *debugstr_timeout( const LARGE_INTEGER *timeout )
|
||||
{
|
||||
if (!timeout) return "(infinite)";
|
||||
@@ -191,24 +187,6 @@ static void timespec_from_timeout( struct timespec *timespec, const LARGE_INTEGE
|
||||
@@ -190,24 +186,6 @@ static void timespec_from_timeout( struct timespec *timespec, const LARGE_INTEGE
|
||||
#endif
|
||||
|
||||
|
||||
@@ -314,7 +314,7 @@ index 0fee8f3099d..d68dfbbf6af 100644
|
||||
/* create a struct security_descriptor and contained information in one contiguous piece of memory */
|
||||
NTSTATUS alloc_object_attributes( const OBJECT_ATTRIBUTES *attr, struct object_attributes **ret,
|
||||
data_size_t *ret_len )
|
||||
@@ -2892,71 +2870,6 @@ NTSTATUS CDECL fast_RtlWakeConditionVariable( RTL_CONDITION_VARIABLE *variable,
|
||||
@@ -2836,71 +2814,6 @@ NTSTATUS CDECL fast_RtlWakeConditionVariable( RTL_CONDITION_VARIABLE *variable,
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -386,7 +386,7 @@ index 0fee8f3099d..d68dfbbf6af 100644
|
||||
#else
|
||||
|
||||
NTSTATUS CDECL fast_RtlTryAcquireSRWLockExclusive( RTL_SRWLOCK *lock )
|
||||
@@ -2999,79 +2912,4 @@ NTSTATUS CDECL fast_wait_cv( RTL_CONDITION_VARIABLE *variable, const void *value
|
||||
@@ -2943,79 +2856,4 @@ NTSTATUS CDECL fast_wait_cv( RTL_CONDITION_VARIABLE *variable, const void *value
|
||||
return STATUS_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
@@ -467,19 +467,19 @@ index 0fee8f3099d..d68dfbbf6af 100644
|
||||
- mutex_unlock( &addr_mutex );
|
||||
-}
|
||||
diff --git a/dlls/ntdll/unixlib.h b/dlls/ntdll/unixlib.h
|
||||
index 290379a9310..e84b6052378 100644
|
||||
index 80e4eaefc75..72d115a556b 100644
|
||||
--- a/dlls/ntdll/unixlib.h
|
||||
+++ b/dlls/ntdll/unixlib.h
|
||||
@@ -26,7 +26,7 @@
|
||||
struct _DISPATCHER_CONTEXT;
|
||||
@@ -37,7 +37,7 @@ enum loadorder
|
||||
};
|
||||
|
||||
/* increment this when you change the function table */
|
||||
-#define NTDLL_UNIXLIB_VERSION 115
|
||||
+#define NTDLL_UNIXLIB_VERSION 116
|
||||
-#define NTDLL_UNIXLIB_VERSION 119
|
||||
+#define NTDLL_UNIXLIB_VERSION 120
|
||||
|
||||
struct unix_funcs
|
||||
{
|
||||
@@ -38,10 +38,6 @@ struct unix_funcs
|
||||
@@ -49,10 +49,6 @@ struct unix_funcs
|
||||
/* other Win32 API functions */
|
||||
NTSTATUS (WINAPI *DbgUiIssueRemoteBreakin)( HANDLE process );
|
||||
LONGLONG (WINAPI *RtlGetSystemTimePrecise)(void);
|
||||
@@ -491,5 +491,5 @@ index 290379a9310..e84b6052378 100644
|
||||
/* fast locks */
|
||||
NTSTATUS (CDECL *fast_RtlpWaitForCriticalSection)( RTL_CRITICAL_SECTION *crit, int timeout );
|
||||
--
|
||||
2.30.1
|
||||
2.30.2
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From aae4ecb64fea01acde1b44c95f063acd29f74a7e Mon Sep 17 00:00:00 2001
|
||||
From fd2100138729eece59f3af37c59ee6b166085cc6 Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <z.figura12@gmail.com>
|
||||
Date: Mon, 31 Aug 2020 23:38:09 -0500
|
||||
Subject: [PATCH] ntdll: Reimplement the critical section fast path on top of
|
||||
@@ -83,10 +83,10 @@ index 09975ac3d45..97a5ce7fffa 100644
|
||||
return ret;
|
||||
}
|
||||
diff --git a/dlls/ntdll/unix/loader.c b/dlls/ntdll/unix/loader.c
|
||||
index aff4594ab46..38a18d9c949 100644
|
||||
index a962eb46ead..6748c89ccac 100644
|
||||
--- a/dlls/ntdll/unix/loader.c
|
||||
+++ b/dlls/ntdll/unix/loader.c
|
||||
@@ -1691,9 +1691,6 @@ static struct unix_funcs unix_funcs =
|
||||
@@ -1757,9 +1757,6 @@ static struct unix_funcs unix_funcs =
|
||||
#endif
|
||||
DbgUiIssueRemoteBreakin,
|
||||
RtlGetSystemTimePrecise,
|
||||
@@ -217,10 +217,10 @@ index 41005425a90..6b97028fb68 100644
|
||||
|
||||
/* Futex-based SRW lock implementation:
|
||||
diff --git a/dlls/ntdll/unix/unix_private.h b/dlls/ntdll/unix/unix_private.h
|
||||
index d056b1500c9..4033d8fee76 100644
|
||||
index 8d80b824d28..8141554a7cd 100644
|
||||
--- a/dlls/ntdll/unix/unix_private.h
|
||||
+++ b/dlls/ntdll/unix/unix_private.h
|
||||
@@ -98,9 +98,6 @@ extern void (WINAPI *pKiUserApcDispatcher)(CONTEXT*,ULONG_PTR,ULONG_PTR,ULON
|
||||
@@ -105,9 +105,6 @@ extern void (WINAPI *pKiUserApcDispatcher)(CONTEXT*,ULONG_PTR,ULONG_PTR,ULON
|
||||
extern NTSTATUS (WINAPI *pKiUserExceptionDispatcher)(EXCEPTION_RECORD*,CONTEXT*) DECLSPEC_HIDDEN;
|
||||
extern void (WINAPI *pLdrInitializeThunk)(CONTEXT*,void**,ULONG_PTR,ULONG_PTR) DECLSPEC_HIDDEN;
|
||||
extern void (WINAPI *pRtlUserThreadStart)( PRTL_THREAD_START_ROUTINE entry, void *arg ) DECLSPEC_HIDDEN;
|
||||
@@ -231,19 +231,19 @@ index d056b1500c9..4033d8fee76 100644
|
||||
extern NTSTATUS CDECL fast_RtlAcquireSRWLockExclusive( RTL_SRWLOCK *lock ) DECLSPEC_HIDDEN;
|
||||
extern NTSTATUS CDECL fast_RtlTryAcquireSRWLockShared( RTL_SRWLOCK *lock ) DECLSPEC_HIDDEN;
|
||||
diff --git a/dlls/ntdll/unixlib.h b/dlls/ntdll/unixlib.h
|
||||
index e84b6052378..f9c024d2e78 100644
|
||||
index 72d115a556b..d7c880eda04 100644
|
||||
--- a/dlls/ntdll/unixlib.h
|
||||
+++ b/dlls/ntdll/unixlib.h
|
||||
@@ -26,7 +26,7 @@
|
||||
struct _DISPATCHER_CONTEXT;
|
||||
@@ -37,7 +37,7 @@ enum loadorder
|
||||
};
|
||||
|
||||
/* increment this when you change the function table */
|
||||
-#define NTDLL_UNIXLIB_VERSION 116
|
||||
+#define NTDLL_UNIXLIB_VERSION 117
|
||||
-#define NTDLL_UNIXLIB_VERSION 120
|
||||
+#define NTDLL_UNIXLIB_VERSION 121
|
||||
|
||||
struct unix_funcs
|
||||
{
|
||||
@@ -40,9 +40,6 @@ struct unix_funcs
|
||||
@@ -51,9 +51,6 @@ struct unix_funcs
|
||||
LONGLONG (WINAPI *RtlGetSystemTimePrecise)(void);
|
||||
|
||||
/* fast locks */
|
||||
@@ -254,5 +254,5 @@ index e84b6052378..f9c024d2e78 100644
|
||||
NTSTATUS (CDECL *fast_RtlAcquireSRWLockExclusive)( RTL_SRWLOCK *lock );
|
||||
NTSTATUS (CDECL *fast_RtlTryAcquireSRWLockShared)( RTL_SRWLOCK *lock );
|
||||
--
|
||||
2.20.1
|
||||
2.30.2
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 2ab71fb4253f099683b9a9c8974643b505f001e1 Mon Sep 17 00:00:00 2001
|
||||
From 6409c2d12ba290c5bb8c4335988bc144d08b35b7 Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <z.figura12@gmail.com>
|
||||
Date: Mon, 31 Aug 2020 23:55:29 -0500
|
||||
Subject: [PATCH] ntdll: Get rid of the direct futex path for condition
|
||||
@@ -80,10 +80,10 @@ index 97a5ce7fffa..1e6afc4cfc8 100644
|
||||
if (flags & RTL_CONDITION_VARIABLE_LOCKMODE_SHARED)
|
||||
RtlAcquireSRWLockShared( lock );
|
||||
diff --git a/dlls/ntdll/unix/loader.c b/dlls/ntdll/unix/loader.c
|
||||
index 38a18d9c949..58616212f15 100644
|
||||
index 6748c89ccac..81d8476e4c6 100644
|
||||
--- a/dlls/ntdll/unix/loader.c
|
||||
+++ b/dlls/ntdll/unix/loader.c
|
||||
@@ -1697,8 +1697,6 @@ static struct unix_funcs unix_funcs =
|
||||
@@ -1763,8 +1763,6 @@ static struct unix_funcs unix_funcs =
|
||||
fast_RtlAcquireSRWLockShared,
|
||||
fast_RtlReleaseSRWLockExclusive,
|
||||
fast_RtlReleaseSRWLockShared,
|
||||
@@ -187,10 +187,10 @@ index 6b97028fb68..d4092438644 100644
|
||||
-
|
||||
#endif
|
||||
diff --git a/dlls/ntdll/unix/unix_private.h b/dlls/ntdll/unix/unix_private.h
|
||||
index 4033d8fee76..3ccb51e155c 100644
|
||||
index 8141554a7cd..a22e7bdd4f4 100644
|
||||
--- a/dlls/ntdll/unix/unix_private.h
|
||||
+++ b/dlls/ntdll/unix/unix_private.h
|
||||
@@ -104,10 +104,7 @@ extern NTSTATUS CDECL fast_RtlTryAcquireSRWLockShared( RTL_SRWLOCK *lock ) DECLS
|
||||
@@ -111,10 +111,7 @@ extern NTSTATUS CDECL fast_RtlTryAcquireSRWLockShared( RTL_SRWLOCK *lock ) DECLS
|
||||
extern NTSTATUS CDECL fast_RtlAcquireSRWLockShared( RTL_SRWLOCK *lock ) DECLSPEC_HIDDEN;
|
||||
extern NTSTATUS CDECL fast_RtlReleaseSRWLockExclusive( RTL_SRWLOCK *lock ) DECLSPEC_HIDDEN;
|
||||
extern NTSTATUS CDECL fast_RtlReleaseSRWLockShared( RTL_SRWLOCK *lock ) DECLSPEC_HIDDEN;
|
||||
@@ -202,19 +202,19 @@ index 4033d8fee76..3ccb51e155c 100644
|
||||
extern void CDECL virtual_release_address_space(void) DECLSPEC_HIDDEN;
|
||||
|
||||
diff --git a/dlls/ntdll/unixlib.h b/dlls/ntdll/unixlib.h
|
||||
index f9c024d2e78..ed9c6584939 100644
|
||||
index d7c880eda04..8518c7fba13 100644
|
||||
--- a/dlls/ntdll/unixlib.h
|
||||
+++ b/dlls/ntdll/unixlib.h
|
||||
@@ -26,7 +26,7 @@
|
||||
struct _DISPATCHER_CONTEXT;
|
||||
@@ -37,7 +37,7 @@ enum loadorder
|
||||
};
|
||||
|
||||
/* increment this when you change the function table */
|
||||
-#define NTDLL_UNIXLIB_VERSION 117
|
||||
+#define NTDLL_UNIXLIB_VERSION 118
|
||||
-#define NTDLL_UNIXLIB_VERSION 121
|
||||
+#define NTDLL_UNIXLIB_VERSION 122
|
||||
|
||||
struct unix_funcs
|
||||
{
|
||||
@@ -46,9 +46,6 @@ struct unix_funcs
|
||||
@@ -57,9 +57,6 @@ struct unix_funcs
|
||||
NTSTATUS (CDECL *fast_RtlAcquireSRWLockShared)( RTL_SRWLOCK *lock );
|
||||
NTSTATUS (CDECL *fast_RtlReleaseSRWLockExclusive)( RTL_SRWLOCK *lock );
|
||||
NTSTATUS (CDECL *fast_RtlReleaseSRWLockShared)( RTL_SRWLOCK *lock );
|
||||
@@ -225,5 +225,5 @@ index f9c024d2e78..ed9c6584939 100644
|
||||
/* math functions */
|
||||
double (CDECL *atan)( double d );
|
||||
--
|
||||
2.20.1
|
||||
2.30.2
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From a85907faa73aef081c908fa48b3262301d105f22 Mon Sep 17 00:00:00 2001
|
||||
From cf50bc7987a6449ada2c801a78697c6299ffb07c Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <z.figura12@gmail.com>
|
||||
Date: Sun, 22 Nov 2020 20:51:10 -0600
|
||||
Subject: [PATCH] ntdll: Reimplement SRW locks on top of Win32 futexes.
|
||||
@@ -392,10 +392,10 @@ index 1e6afc4cfc8..93a6a5fd7de 100644
|
||||
|
||||
/***********************************************************************
|
||||
diff --git a/dlls/ntdll/unix/loader.c b/dlls/ntdll/unix/loader.c
|
||||
index 58616212f15..45fe4259d19 100644
|
||||
index 81d8476e4c6..575cc38d5f9 100644
|
||||
--- a/dlls/ntdll/unix/loader.c
|
||||
+++ b/dlls/ntdll/unix/loader.c
|
||||
@@ -1691,12 +1691,6 @@ static struct unix_funcs unix_funcs =
|
||||
@@ -1757,12 +1757,6 @@ static struct unix_funcs unix_funcs =
|
||||
#endif
|
||||
DbgUiIssueRemoteBreakin,
|
||||
RtlGetSystemTimePrecise,
|
||||
@@ -747,10 +747,10 @@ index d4092438644..b67f5fc8f10 100644
|
||||
-
|
||||
-#endif
|
||||
diff --git a/dlls/ntdll/unix/unix_private.h b/dlls/ntdll/unix/unix_private.h
|
||||
index 3ccb51e155c..313244e5e59 100644
|
||||
index a22e7bdd4f4..cf7b194a14b 100644
|
||||
--- a/dlls/ntdll/unix/unix_private.h
|
||||
+++ b/dlls/ntdll/unix/unix_private.h
|
||||
@@ -98,12 +98,6 @@ extern void (WINAPI *pKiUserApcDispatcher)(CONTEXT*,ULONG_PTR,ULONG_PTR,ULON
|
||||
@@ -105,12 +105,6 @@ extern void (WINAPI *pKiUserApcDispatcher)(CONTEXT*,ULONG_PTR,ULONG_PTR,ULON
|
||||
extern NTSTATUS (WINAPI *pKiUserExceptionDispatcher)(EXCEPTION_RECORD*,CONTEXT*) DECLSPEC_HIDDEN;
|
||||
extern void (WINAPI *pLdrInitializeThunk)(CONTEXT*,void**,ULONG_PTR,ULONG_PTR) DECLSPEC_HIDDEN;
|
||||
extern void (WINAPI *pRtlUserThreadStart)( PRTL_THREAD_START_ROUTINE entry, void *arg ) DECLSPEC_HIDDEN;
|
||||
@@ -764,19 +764,19 @@ index 3ccb51e155c..313244e5e59 100644
|
||||
|
||||
extern void CDECL virtual_release_address_space(void) DECLSPEC_HIDDEN;
|
||||
diff --git a/dlls/ntdll/unixlib.h b/dlls/ntdll/unixlib.h
|
||||
index ed9c6584939..090a694bb40 100644
|
||||
index 8518c7fba13..650efb7f5e0 100644
|
||||
--- a/dlls/ntdll/unixlib.h
|
||||
+++ b/dlls/ntdll/unixlib.h
|
||||
@@ -26,7 +26,7 @@
|
||||
struct _DISPATCHER_CONTEXT;
|
||||
@@ -37,7 +37,7 @@ enum loadorder
|
||||
};
|
||||
|
||||
/* increment this when you change the function table */
|
||||
-#define NTDLL_UNIXLIB_VERSION 118
|
||||
+#define NTDLL_UNIXLIB_VERSION 119
|
||||
-#define NTDLL_UNIXLIB_VERSION 122
|
||||
+#define NTDLL_UNIXLIB_VERSION 123
|
||||
|
||||
struct unix_funcs
|
||||
{
|
||||
@@ -39,14 +39,6 @@ struct unix_funcs
|
||||
@@ -50,14 +50,6 @@ struct unix_funcs
|
||||
NTSTATUS (WINAPI *DbgUiIssueRemoteBreakin)( HANDLE process );
|
||||
LONGLONG (WINAPI *RtlGetSystemTimePrecise)(void);
|
||||
|
||||
@@ -792,5 +792,5 @@ index ed9c6584939..090a694bb40 100644
|
||||
double (CDECL *atan)( double d );
|
||||
double (CDECL *ceil)( double d );
|
||||
--
|
||||
2.20.1
|
||||
2.30.2
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From cef4355bf086ab493401931ae635792bad1186f3 Mon Sep 17 00:00:00 2001
|
||||
From c65ffcf059cf2768a9ca6ee7a7e38d8a6a25fc44 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Fri, 22 May 2020 16:37:37 +1000
|
||||
Subject: [PATCH] ntdll: NtQuerySystemInformation support
|
||||
@@ -12,10 +12,10 @@ Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
2 files changed, 44 insertions(+)
|
||||
|
||||
diff --git a/dlls/ntdll/unix/system.c b/dlls/ntdll/unix/system.c
|
||||
index 909a7c5672f..cf36faf2b78 100644
|
||||
index 6fa71ddfb91..fad1d072962 100644
|
||||
--- a/dlls/ntdll/unix/system.c
|
||||
+++ b/dlls/ntdll/unix/system.c
|
||||
@@ -2557,6 +2557,28 @@ NTSTATUS WINAPI NtQuerySystemInformation( SYSTEM_INFORMATION_CLASS class,
|
||||
@@ -2714,6 +2714,28 @@ NTSTATUS WINAPI NtQuerySystemInformation( SYSTEM_INFORMATION_CLASS class,
|
||||
ret = STATUS_SUCCESS;
|
||||
break;
|
||||
|
||||
@@ -45,15 +45,16 @@ index 909a7c5672f..cf36faf2b78 100644
|
||||
FIXME( "(0x%08x,%p,0x%08x,%p) stub\n", class, info, size, ret_size );
|
||||
|
||||
diff --git a/include/winternl.h b/include/winternl.h
|
||||
index 9226f000557..7e85ee02552 100644
|
||||
index fcdedaec8aa..618fab7d7c2 100644
|
||||
--- a/include/winternl.h
|
||||
+++ b/include/winternl.h
|
||||
@@ -988,10 +988,32 @@ typedef enum _SYSTEM_INFORMATION_CLASS {
|
||||
@@ -1550,11 +1550,33 @@ typedef enum _SYSTEM_INFORMATION_CLASS {
|
||||
SystemMemoryListInformation = 80,
|
||||
SystemFileCacheInformationEx = 81,
|
||||
SystemDynamicTimeZoneInformation = 102,
|
||||
+ SystemCodeIntegrityInformation = 103,
|
||||
SystemLogicalProcessorInformationEx = 107,
|
||||
SystemHypervisorSharedPageInformation = 197,
|
||||
SystemInformationClassMax
|
||||
} SYSTEM_INFORMATION_CLASS, *PSYSTEM_INFORMATION_CLASS;
|
||||
|
||||
@@ -82,5 +83,5 @@ index 9226f000557..7e85ee02552 100644
|
||||
ThreadBasicInformation = 0,
|
||||
ThreadTimes,
|
||||
--
|
||||
2.27.0
|
||||
2.30.2
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 3a0372bf303cbbfbb94f23455758b6020f038241 Mon Sep 17 00:00:00 2001
|
||||
From 53921ff97159fcd4a060568df463886192d41420 Mon Sep 17 00:00:00 2001
|
||||
From: Martin Storsjo <martin@martin.st>
|
||||
Date: Wed, 16 Aug 2017 23:48:40 +0300
|
||||
Subject: [PATCH] ntdll: Always restore TEB to x18 on aarch 64 on return from
|
||||
@@ -20,12 +20,12 @@ Signed-off-by: Martin Storsjo <martin@martin.st>
|
||||
2 files changed, 11 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
|
||||
index f54e25fcc5c..87ffc74062b 100644
|
||||
index 092c47eac3b..05e36598cdb 100644
|
||||
--- a/dlls/ntdll/loader.c
|
||||
+++ b/dlls/ntdll/loader.c
|
||||
@@ -2073,7 +2073,13 @@ static NTSTATUS build_module( LPCWSTR load_path, const UNICODE_STRING *nt_name,
|
||||
@@ -1890,7 +1890,13 @@ static NTSTATUS build_module( LPCWSTR load_path, const UNICODE_STRING *nt_name,
|
||||
|
||||
if (image_info->u.s.WineBuiltin)
|
||||
if (is_builtin)
|
||||
{
|
||||
- if (TRACE_ON(relay)) RELAY_SetupDLL( *module );
|
||||
+#ifdef __aarch64__
|
||||
@@ -56,5 +56,5 @@ index be2dc833377..e29496a8c7a 100644
|
||||
}
|
||||
|
||||
--
|
||||
2.30.0
|
||||
2.20.1
|
||||
|
||||
|
@@ -1,448 +0,0 @@
|
||||
From e68537a9ede159797a7b2e2f92007a37323a1ffd Mon Sep 17 00:00:00 2001
|
||||
From: Nakarin Khankham <garuda2550@gmail.com>
|
||||
Date: Sat, 9 Mar 2019 21:37:24 +0700
|
||||
Subject: [PATCH] opencl: Add OpenCL 1.0 function pointer loader.
|
||||
|
||||
Signed-off-by: Nakarin Khankham <garuda2550@gmail.com>
|
||||
---
|
||||
configure | 56 +++++++++
|
||||
configure.ac | 1 +
|
||||
dlls/opencl/opencl.c | 328 +++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
include/config.h.in | 3 +
|
||||
4 files changed, 388 insertions(+)
|
||||
|
||||
diff --git a/configure b/configure
|
||||
index 3c976c9..be244ee 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -11801,6 +11801,62 @@ if test "x$ac_cv_lib_OpenCL_clGetPlatformInfo" = xyes; then :
|
||||
|
||||
fi
|
||||
|
||||
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -lOpenCL" >&5
|
||||
+$as_echo_n "checking for -lOpenCL... " >&6; }
|
||||
+if ${ac_cv_lib_soname_OpenCL+:} false; then :
|
||||
+ $as_echo_n "(cached) " >&6
|
||||
+else
|
||||
+ ac_check_soname_save_LIBS=$LIBS
|
||||
+LIBS="-lOpenCL $LIBS"
|
||||
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
+/* end confdefs.h. */
|
||||
+
|
||||
+/* Override any GCC internal prototype to avoid an error.
|
||||
+ Use char because int might match the return type of a GCC
|
||||
+ builtin and then its argument prototype would still apply. */
|
||||
+#ifdef __cplusplus
|
||||
+extern "C"
|
||||
+#endif
|
||||
+char clGetPlatformInfo ();
|
||||
+int
|
||||
+main ()
|
||||
+{
|
||||
+return clGetPlatformInfo ();
|
||||
+ ;
|
||||
+ return 0;
|
||||
+}
|
||||
+_ACEOF
|
||||
+if ac_fn_c_try_link "$LINENO"; then :
|
||||
+ case "$LIBEXT" in
|
||||
+ dll) ac_cv_lib_soname_OpenCL=`$ac_cv_path_LDD conftest.exe | grep "OpenCL" | sed -e "s/dll.*/dll/"';2,$d'` ;;
|
||||
+ dylib) ac_cv_lib_soname_OpenCL=`$OTOOL -L conftest$ac_exeext | grep "libOpenCL\\.[0-9A-Za-z.]*dylib" | sed -e "s/^.*\/\(libOpenCL\.[0-9A-Za-z.]*dylib\).*$/\1/"';2,$d'` ;;
|
||||
+ *) ac_cv_lib_soname_OpenCL=`$READELF -d conftest$ac_exeext | grep "NEEDED.*libOpenCL\\.$LIBEXT" | sed -e "s/^.*\\[\\(libOpenCL\\.$LIBEXT[^ ]*\\)\\].*$/\1/"';2,$d'`
|
||||
+ if ${ac_cv_lib_soname_OpenCL:+false} :; then :
|
||||
+ ac_cv_lib_soname_OpenCL=`$LDD conftest$ac_exeext | grep "libOpenCL\\.$LIBEXT" | sed -e "s/^.*\(libOpenCL\.$LIBEXT[^ ]*\).*$/\1/"';2,$d'`
|
||||
+fi ;;
|
||||
+ esac
|
||||
+fi
|
||||
+rm -f core conftest.err conftest.$ac_objext \
|
||||
+ conftest$ac_exeext conftest.$ac_ext
|
||||
+ LIBS=$ac_check_soname_save_LIBS
|
||||
+fi
|
||||
+if ${ac_cv_lib_soname_OpenCL:+false} :; then :
|
||||
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
|
||||
+$as_echo "not found" >&6; }
|
||||
+ cat >>confdefs.h <<_ACEOF
|
||||
+#define SONAME_LIBOPENCL "libOpenCL.$LIBEXT"
|
||||
+_ACEOF
|
||||
+
|
||||
+else
|
||||
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_soname_OpenCL" >&5
|
||||
+$as_echo "$ac_cv_lib_soname_OpenCL" >&6; }
|
||||
+
|
||||
+cat >>confdefs.h <<_ACEOF
|
||||
+#define SONAME_LIBOPENCL "$ac_cv_lib_soname_OpenCL"
|
||||
+_ACEOF
|
||||
+
|
||||
+
|
||||
+fi
|
||||
fi
|
||||
if test "x$ac_cv_lib_OpenCL_clGetPlatformInfo" != xyes; then :
|
||||
case "x$with_opencl" in
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 45c22dd..f6e6da2 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -1264,6 +1264,7 @@ dnl **** Check for OpenCL ****
|
||||
if test "$ac_cv_header_CL_cl_h" = "yes"
|
||||
then
|
||||
AC_CHECK_LIB(OpenCL,clGetPlatformInfo,[AC_SUBST(OPENCL_LIBS,["-lOpenCL"])])
|
||||
+ WINE_CHECK_SONAME(OpenCL,clGetPlatformInfo,,[AC_DEFINE_UNQUOTED(SONAME_LIBOPENCL,["libOpenCL.$LIBEXT"])])
|
||||
fi
|
||||
WINE_NOTICE_WITH(opencl,[test "x$ac_cv_lib_OpenCL_clGetPlatformInfo" != xyes],
|
||||
[OpenCL ${notice_platform}development files not found, OpenCL won't be supported.],
|
||||
diff --git a/dlls/opencl/opencl.c b/dlls/opencl/opencl.c
|
||||
index 2d145bf..81feabb 100644
|
||||
--- a/dlls/opencl/opencl.c
|
||||
+++ b/dlls/opencl/opencl.c
|
||||
@@ -42,6 +42,334 @@ WINE_DEFAULT_DEBUG_CHANNEL(opencl);
|
||||
/* TODO: Figure out how to provide GL context sharing before enabling OpenGL */
|
||||
#define OPENCL_WITH_GL 0
|
||||
|
||||
+#ifndef SONAME_LIBOPENCL
|
||||
+#if defined(HAVE_OPENCL_OPENCL_H)
|
||||
+#define SONAME_LIBOPENCL "libOpenCL.dylib"
|
||||
+#else
|
||||
+#define SONAME_LIBOPENCL "libOpenCL.so"
|
||||
+#endif
|
||||
+#endif
|
||||
+
|
||||
+/* Platform API */
|
||||
+static cl_int (*pclGetPlatformIDs)(cl_uint num_entries, cl_platform_id *platforms, cl_uint *num_platforms);
|
||||
+static cl_int (*pclGetPlatformInfo)(cl_platform_id platform, cl_platform_info param_name,
|
||||
+ size_t param_value_size, void * param_value, size_t * param_value_size_ret);
|
||||
+
|
||||
+/* Device APIs */
|
||||
+static cl_int (*pclGetDeviceIDs)(cl_platform_id platform, cl_device_type device_type,
|
||||
+ cl_uint num_entries, cl_device_id * devices, cl_uint * num_devices);
|
||||
+static cl_int (*pclGetDeviceInfo)(cl_device_id device, cl_device_info param_name,
|
||||
+ size_t param_value_size, void * param_value, size_t * param_value_size_ret);
|
||||
+
|
||||
+/* Context APIs */
|
||||
+static cl_context (*pclCreateContext)(const cl_context_properties * properties, cl_uint num_devices, const cl_device_id * devices,
|
||||
+ void (*pfn_notify)(const char *errinfo, const void *private_info, size_t cb, void *user_data),
|
||||
+ void * user_data, cl_int * errcode_ret);
|
||||
+static cl_context (*pclCreateContextFromType)(const cl_context_properties * properties, cl_device_type device_type,
|
||||
+ void (*pfn_notify)(const char *errinfo, const void *private_info, size_t cb, void *user_data),
|
||||
+ void * user_data, cl_int * errcode_ret);
|
||||
+static cl_int (*pclRetainContext)(cl_context context);
|
||||
+static cl_int (*pclReleaseContext)(cl_context context);
|
||||
+static cl_int (*pclGetContextInfo)(cl_context context, cl_context_info param_name,
|
||||
+ size_t param_value_size, void * param_value, size_t * param_value_size_ret);
|
||||
+
|
||||
+/* Command Queue APIs */
|
||||
+static cl_command_queue (*pclCreateCommandQueue)(cl_context context, cl_device_id device,
|
||||
+ cl_command_queue_properties properties, cl_int * errcode_ret);
|
||||
+static cl_int (*pclRetainCommandQueue)(cl_command_queue command_queue);
|
||||
+static cl_int (*pclReleaseCommandQueue)(cl_command_queue command_queue);
|
||||
+static cl_int (*pclGetCommandQueueInfo)(cl_command_queue command_queue, cl_command_queue_info param_name,
|
||||
+ size_t param_value_size, void * param_value, size_t * param_value_size_ret);
|
||||
+static cl_int (*pclSetCommandQueueProperty)(cl_command_queue command_queue, cl_command_queue_properties properties, cl_bool enable,
|
||||
+ cl_command_queue_properties * old_properties);
|
||||
+
|
||||
+/* Memory Object APIs */
|
||||
+static cl_mem (*pclCreateBuffer)(cl_context context, cl_mem_flags flags, size_t size, void * host_ptr, cl_int * errcode_ret);
|
||||
+static cl_mem (*pclCreateImage2D)(cl_context context, cl_mem_flags flags, cl_image_format * image_format,
|
||||
+ size_t image_width, size_t image_height, size_t image_row_pitch, void * host_ptr, cl_int * errcode_ret);
|
||||
+static cl_mem (*pclCreateImage3D)(cl_context context, cl_mem_flags flags, cl_image_format * image_format,
|
||||
+ size_t image_width, size_t image_height, size_t image_depth, size_t image_row_pitch, size_t image_slice_pitch,
|
||||
+ void * host_ptr, cl_int * errcode_ret);
|
||||
+static cl_int (*pclRetainMemObject)(cl_mem memobj);
|
||||
+static cl_int (*pclReleaseMemObject)(cl_mem memobj);
|
||||
+static cl_int (*pclGetSupportedImageFormats)(cl_context context, cl_mem_flags flags, cl_mem_object_type image_type, cl_uint num_entries,
|
||||
+ cl_image_format * image_formats, cl_uint * num_image_formats);
|
||||
+static cl_int (*pclGetMemObjectInfo)(cl_mem memobj, cl_mem_info param_name, size_t param_value_size, void * param_value, size_t * param_value_size_ret);
|
||||
+static cl_int (*pclGetImageInfo)(cl_mem image, cl_image_info param_name, size_t param_value_size, void * param_value, size_t * param_value_size_ret);
|
||||
+
|
||||
+/* Sampler APIs */
|
||||
+static cl_sampler (*pclCreateSampler)(cl_context context, cl_bool normalized_coords, cl_addressing_mode addressing_mode,
|
||||
+ cl_filter_mode filter_mode, cl_int * errcode_ret);
|
||||
+static cl_int (*pclRetainSampler)(cl_sampler sampler);
|
||||
+static cl_int (*pclReleaseSampler)(cl_sampler sampler);
|
||||
+static cl_int (*pclGetSamplerInfo)(cl_sampler sampler, cl_sampler_info param_name, size_t param_value_size,
|
||||
+ void * param_value, size_t * param_value_size_ret);
|
||||
+
|
||||
+/* Program Object APIs */
|
||||
+static cl_program (*pclCreateProgramWithSource)(cl_context context, cl_uint count, const char ** strings,
|
||||
+ const size_t * lengths, cl_int * errcode_ret);
|
||||
+static cl_program (*pclCreateProgramWithBinary)(cl_context context, cl_uint num_devices, const cl_device_id * device_list,
|
||||
+ const size_t * lengths, const unsigned char ** binaries, cl_int * binary_status,
|
||||
+ cl_int * errcode_ret);
|
||||
+static cl_int (*pclRetainProgram)(cl_program program);
|
||||
+static cl_int (*pclReleaseProgram)(cl_program program);
|
||||
+static cl_int (*pclBuildProgram)(cl_program program, cl_uint num_devices, const cl_device_id * device_list, const char * options,
|
||||
+ void (*pfn_notify)(cl_program program, void * user_data),
|
||||
+ void * user_data);
|
||||
+static cl_int (*pclUnloadCompiler)(void);
|
||||
+static cl_int (*pclGetProgramInfo)(cl_program program, cl_program_info param_name,
|
||||
+ size_t param_value_size, void * param_value, size_t * param_value_size_ret);
|
||||
+static cl_int (*pclGetProgramBuildInfo)(cl_program program, cl_device_id device,
|
||||
+ cl_program_build_info param_name, size_t param_value_size, void * param_value,
|
||||
+ size_t * param_value_size_ret);
|
||||
+
|
||||
+/* Kernel Object APIs */
|
||||
+static cl_kernel (*pclCreateKernel)(cl_program program, char * kernel_name, cl_int * errcode_ret);
|
||||
+static cl_int (*pclCreateKernelsInProgram)(cl_program program, cl_uint num_kernels,
|
||||
+ cl_kernel * kernels, cl_uint * num_kernels_ret);
|
||||
+static cl_int (*pclRetainKernel)(cl_kernel kernel);
|
||||
+static cl_int (*pclReleaseKernel)(cl_kernel kernel);
|
||||
+static cl_int (*pclSetKernelArg)(cl_kernel kernel, cl_uint arg_index, size_t arg_size, void * arg_value);
|
||||
+static cl_int (*pclGetKernelInfo)(cl_kernel kernel, cl_kernel_info param_name,
|
||||
+ size_t param_value_size, void * param_value, size_t * param_value_size_ret);
|
||||
+static cl_int (*pclGetKernelWorkGroupInfo)(cl_kernel kernel, cl_device_id device,
|
||||
+ cl_kernel_work_group_info param_name, size_t param_value_size,
|
||||
+ void * param_value, size_t * param_value_size_ret);
|
||||
+/* Event Object APIs */
|
||||
+static cl_int (*pclWaitForEvents)(cl_uint num_events, cl_event * event_list);
|
||||
+static cl_int (*pclGetEventInfo)(cl_event event, cl_event_info param_name, size_t param_value_size,
|
||||
+ void * param_value, size_t * param_value_size_ret);
|
||||
+static cl_int (*pclRetainEvent)(cl_event event);
|
||||
+static cl_int (*pclReleaseEvent)(cl_event event);
|
||||
+
|
||||
+/* Profiling APIs */
|
||||
+static cl_int (*pclGetEventProfilingInfo)(cl_event event, cl_profiling_info param_name, size_t param_value_size,
|
||||
+ void * param_value, size_t * param_value_size_ret);
|
||||
+
|
||||
+/* Flush and Finish APIs */
|
||||
+static cl_int (*pclFlush)(cl_command_queue command_queue);
|
||||
+static cl_int (*pclFinish)(cl_command_queue command_queue);
|
||||
+
|
||||
+/* Enqueued Commands APIs */
|
||||
+static cl_int (*pclEnqueueReadBuffer)(cl_command_queue command_queue, cl_mem buffer, cl_bool blocking_read,
|
||||
+ size_t offset, size_t cb, void * ptr,
|
||||
+ cl_uint num_events_in_wait_list, const cl_event * event_wait_list, cl_event * event);
|
||||
+static cl_int (*pclEnqueueWriteBuffer)(cl_command_queue command_queue, cl_mem buffer, cl_bool blocking_write,
|
||||
+ size_t offset, size_t cb, const void * ptr,
|
||||
+ cl_uint num_events_in_wait_list, const cl_event * event_wait_list, cl_event * event);
|
||||
+static cl_int (*pclEnqueueCopyBuffer)(cl_command_queue command_queue, cl_mem src_buffer, cl_mem dst_buffer,
|
||||
+ size_t src_offset, size_t dst_offset, size_t cb,
|
||||
+ cl_uint num_events_in_wait_list, const cl_event * event_wait_list, cl_event * event);
|
||||
+static cl_int (*pclEnqueueReadImage)(cl_command_queue command_queue, cl_mem image, cl_bool blocking_read,
|
||||
+ const size_t * origin, const size_t * region,
|
||||
+ size_t row_pitch, size_t slice_pitch, void * ptr,
|
||||
+ cl_uint num_events_in_wait_list, const cl_event * event_wait_list, cl_event * event);
|
||||
+static cl_int (*pclEnqueueWriteImage)(cl_command_queue command_queue, cl_mem image, cl_bool blocking_write,
|
||||
+ const size_t * origin, const size_t * region,
|
||||
+ size_t input_row_pitch, size_t input_slice_pitch, const void * ptr,
|
||||
+ cl_uint num_events_in_wait_list, const cl_event * event_wait_list, cl_event * event);
|
||||
+static cl_int (*pclEnqueueCopyImage)(cl_command_queue command_queue, cl_mem src_image, cl_mem dst_image,
|
||||
+ size_t * src_origin, size_t * dst_origin, size_t * region,
|
||||
+ cl_uint num_events_in_wait_list, cl_event * event_wait_list, cl_event * event);
|
||||
+static cl_int (*pclEnqueueCopyImageToBuffer)(cl_command_queue command_queue, cl_mem src_image, cl_mem dst_buffer,
|
||||
+ size_t * src_origin, size_t * region, size_t dst_offset,
|
||||
+ cl_uint num_events_in_wait_list, cl_event * event_wait_list, cl_event * event);
|
||||
+static cl_int (*pclEnqueueCopyBufferToImage)(cl_command_queue command_queue, cl_mem src_buffer, cl_mem dst_image,
|
||||
+ size_t src_offset, size_t * dst_origin, size_t * region,
|
||||
+ cl_uint num_events_in_wait_list, cl_event * event_wait_list, cl_event * event);
|
||||
+static void * (*pclEnqueueMapBuffer)(cl_command_queue command_queue, cl_mem buffer, cl_bool blocking_map,
|
||||
+ cl_map_flags map_flags, size_t offset, size_t cb,
|
||||
+ cl_uint num_events_in_wait_list, cl_event * event_wait_list, cl_event * event, cl_int * errcode_ret);
|
||||
+static void * (*pclEnqueueMapImage)(cl_command_queue command_queue, cl_mem image, cl_bool blocking_map,
|
||||
+ cl_map_flags map_flags, size_t * origin, size_t * region,
|
||||
+ size_t * image_row_pitch, size_t * image_slice_pitch,
|
||||
+ cl_uint num_events_in_wait_list, cl_event * event_wait_list, cl_event * event, cl_int * errcode_ret);
|
||||
+static cl_int (*pclEnqueueUnmapMemObject)(cl_command_queue command_queue, cl_mem memobj, void * mapped_ptr,
|
||||
+ cl_uint num_events_in_wait_list, cl_event * event_wait_list, cl_event * event);
|
||||
+static cl_int (*pclEnqueueNDRangeKernel)(cl_command_queue command_queue, cl_kernel kernel, cl_uint work_dim,
|
||||
+ size_t * global_work_offset, size_t * global_work_size, size_t * local_work_size,
|
||||
+ cl_uint num_events_in_wait_list, cl_event * event_wait_list, cl_event * event);
|
||||
+static cl_int (*pclEnqueueTask)(cl_command_queue command_queue, cl_kernel kernel,
|
||||
+ cl_uint num_events_in_wait_list, cl_event * event_wait_list, cl_event * event);
|
||||
+static cl_int (*pclEnqueueNativeKernel)(cl_command_queue command_queue,
|
||||
+ void (*user_func)(void *args),
|
||||
+ void * args, size_t cb_args,
|
||||
+ cl_uint num_mem_objects, const cl_mem * mem_list, const void ** args_mem_loc,
|
||||
+ cl_uint num_events_in_wait_list, const cl_event * event_wait_list, cl_event * event);
|
||||
+static cl_int (*pclEnqueueMarker)(cl_command_queue command_queue, cl_event * event);
|
||||
+static cl_int (*pclEnqueueWaitForEvents)(cl_command_queue command_queue, cl_uint num_events, cl_event * event_list);
|
||||
+static cl_int (*pclEnqueueBarrier)(cl_command_queue command_queue);
|
||||
+
|
||||
+/* Extension function access */
|
||||
+static void * (*pclGetExtensionFunctionAddress)(const char * func_name);
|
||||
+
|
||||
+
|
||||
+static BOOL init_opencl(void);
|
||||
+static BOOL load_opencl_func(void);
|
||||
+
|
||||
+static void * opencl_handle = NULL;
|
||||
+
|
||||
+
|
||||
+/***********************************************************************
|
||||
+ * DllMain [Internal]
|
||||
+ *
|
||||
+ * Initializes the internal 'opencl.dll'.
|
||||
+ */
|
||||
+BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD reason, LPVOID reserved)
|
||||
+{
|
||||
+ TRACE("opencl.dll: %p,%x,%p\n", hinstDLL, reason, reserved);
|
||||
+
|
||||
+ switch (reason)
|
||||
+ {
|
||||
+ case DLL_PROCESS_ATTACH:
|
||||
+ DisableThreadLibraryCalls(hinstDLL);
|
||||
+ if (init_opencl())
|
||||
+ load_opencl_func();
|
||||
+ break;
|
||||
+
|
||||
+ case DLL_PROCESS_DETACH:
|
||||
+ if (reserved) break;
|
||||
+ if (opencl_handle) dlclose(opencl_handle);
|
||||
+ }
|
||||
+
|
||||
+ return TRUE;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+/***********************************************************************
|
||||
+ * init_opencl [Internal]
|
||||
+ *
|
||||
+ * Initializes OpenCL library.
|
||||
+ *
|
||||
+ * RETURNS
|
||||
+ * Success: TRUE
|
||||
+ * Failure: FALSE
|
||||
+ */
|
||||
+static BOOL init_opencl(void)
|
||||
+{
|
||||
+#ifdef SONAME_LIBOPENCL
|
||||
+ char error[256];
|
||||
+
|
||||
+ opencl_handle = dlopen(SONAME_LIBOPENCL, RTLD_NOW);
|
||||
+ if (opencl_handle != NULL)
|
||||
+ {
|
||||
+ TRACE("Opened library %s\n", SONAME_LIBOPENCL);
|
||||
+ return TRUE;
|
||||
+ }
|
||||
+ else
|
||||
+ ERR("Failed to open library %s: %s\n", SONAME_LIBOPENCL, error);
|
||||
+#else
|
||||
+ ERR("OpenCL is needed but support was not included at build time\n");
|
||||
+#endif
|
||||
+ return FALSE;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+/***********************************************************************
|
||||
+ * load_opencl_func [Internal]
|
||||
+ *
|
||||
+ * Populate function table.
|
||||
+ *
|
||||
+ * RETURNS
|
||||
+ * Success: TRUE
|
||||
+ * Failure: FALSE
|
||||
+ */
|
||||
+static BOOL load_opencl_func(void)
|
||||
+{
|
||||
+
|
||||
+
|
||||
+ if (opencl_handle == NULL)
|
||||
+ return FALSE;
|
||||
+
|
||||
+#define LOAD_FUNCPTR(f) \
|
||||
+ if (!(p##f = dlsym(opencl_handle, #f))) \
|
||||
+ WARN("%s not found in %s\n", #f, SONAME_LIBOPENCL);
|
||||
+
|
||||
+ /* Platform API */
|
||||
+ LOAD_FUNCPTR(clGetPlatformIDs);
|
||||
+ LOAD_FUNCPTR(clGetPlatformInfo);
|
||||
+ /* Device APIs */
|
||||
+ LOAD_FUNCPTR(clGetDeviceIDs);
|
||||
+ LOAD_FUNCPTR(clGetDeviceInfo);
|
||||
+ /* Context APIs */
|
||||
+ LOAD_FUNCPTR(clCreateContext);
|
||||
+ LOAD_FUNCPTR(clCreateContextFromType);
|
||||
+ LOAD_FUNCPTR(clRetainContext);
|
||||
+ LOAD_FUNCPTR(clReleaseContext);
|
||||
+ LOAD_FUNCPTR(clGetContextInfo);
|
||||
+ /* Command Queue APIs */
|
||||
+ LOAD_FUNCPTR(clCreateCommandQueue);
|
||||
+ LOAD_FUNCPTR(clRetainCommandQueue);
|
||||
+ LOAD_FUNCPTR(clReleaseCommandQueue);
|
||||
+ LOAD_FUNCPTR(clGetCommandQueueInfo);
|
||||
+ LOAD_FUNCPTR(clSetCommandQueueProperty);
|
||||
+ /* Memory Object APIs */
|
||||
+ LOAD_FUNCPTR(clCreateBuffer);
|
||||
+ LOAD_FUNCPTR(clCreateImage2D);
|
||||
+ LOAD_FUNCPTR(clCreateImage3D);
|
||||
+ LOAD_FUNCPTR(clRetainMemObject);
|
||||
+ LOAD_FUNCPTR(clReleaseMemObject);
|
||||
+ LOAD_FUNCPTR(clGetSupportedImageFormats);
|
||||
+ LOAD_FUNCPTR(clGetMemObjectInfo);
|
||||
+ LOAD_FUNCPTR(clGetImageInfo);
|
||||
+ /* Sampler APIs */
|
||||
+ LOAD_FUNCPTR(clCreateSampler);
|
||||
+ LOAD_FUNCPTR(clRetainSampler);
|
||||
+ LOAD_FUNCPTR(clReleaseSampler);
|
||||
+ LOAD_FUNCPTR(clGetSamplerInfo);
|
||||
+ /* Program Object APIs */
|
||||
+ LOAD_FUNCPTR(clCreateProgramWithSource);
|
||||
+ LOAD_FUNCPTR(clCreateProgramWithBinary);
|
||||
+ LOAD_FUNCPTR(clRetainProgram);
|
||||
+ LOAD_FUNCPTR(clReleaseProgram);
|
||||
+ LOAD_FUNCPTR(clBuildProgram);
|
||||
+ LOAD_FUNCPTR(clUnloadCompiler);
|
||||
+ LOAD_FUNCPTR(clGetProgramInfo);
|
||||
+ LOAD_FUNCPTR(clGetProgramBuildInfo);
|
||||
+ /* Kernel Object APIs */
|
||||
+ LOAD_FUNCPTR(clCreateKernel);
|
||||
+ LOAD_FUNCPTR(clCreateKernelsInProgram);
|
||||
+ LOAD_FUNCPTR(clRetainKernel);
|
||||
+ LOAD_FUNCPTR(clReleaseKernel);
|
||||
+ LOAD_FUNCPTR(clSetKernelArg);
|
||||
+ LOAD_FUNCPTR(clGetKernelInfo);
|
||||
+ LOAD_FUNCPTR(clGetKernelWorkGroupInfo);
|
||||
+ /* Event Object APIs */
|
||||
+ LOAD_FUNCPTR(clWaitForEvents);
|
||||
+ LOAD_FUNCPTR(clGetEventInfo);
|
||||
+ LOAD_FUNCPTR(clRetainEvent);
|
||||
+ LOAD_FUNCPTR(clReleaseEvent);
|
||||
+ /* Profiling APIs */
|
||||
+ LOAD_FUNCPTR(clGetEventProfilingInfo);
|
||||
+ /* Flush and Finish APIs */
|
||||
+ LOAD_FUNCPTR(clFlush);
|
||||
+ LOAD_FUNCPTR(clFinish);
|
||||
+ /* Enqueued Commands APIs */
|
||||
+ LOAD_FUNCPTR(clEnqueueReadBuffer);
|
||||
+ LOAD_FUNCPTR(clEnqueueWriteBuffer);
|
||||
+ LOAD_FUNCPTR(clEnqueueCopyBuffer);
|
||||
+ LOAD_FUNCPTR(clEnqueueReadImage);
|
||||
+ LOAD_FUNCPTR(clEnqueueWriteImage);
|
||||
+ LOAD_FUNCPTR(clEnqueueCopyImage);
|
||||
+ LOAD_FUNCPTR(clEnqueueCopyImageToBuffer);
|
||||
+ LOAD_FUNCPTR(clEnqueueCopyBufferToImage);
|
||||
+ LOAD_FUNCPTR(clEnqueueMapBuffer);
|
||||
+ LOAD_FUNCPTR(clEnqueueMapImage);
|
||||
+ LOAD_FUNCPTR(clEnqueueUnmapMemObject);
|
||||
+ LOAD_FUNCPTR(clEnqueueNDRangeKernel);
|
||||
+ LOAD_FUNCPTR(clEnqueueTask);
|
||||
+ LOAD_FUNCPTR(clEnqueueNativeKernel);
|
||||
+ LOAD_FUNCPTR(clEnqueueMarker);
|
||||
+ LOAD_FUNCPTR(clEnqueueWaitForEvents);
|
||||
+ LOAD_FUNCPTR(clEnqueueBarrier);
|
||||
+ /* Extension function access */
|
||||
+ LOAD_FUNCPTR(clGetExtensionFunctionAddress);
|
||||
+
|
||||
+#undef LOAD_FUNCPTR
|
||||
+
|
||||
+ return TRUE;
|
||||
+}
|
||||
+
|
||||
|
||||
/*---------------------------------------------------------------*/
|
||||
/* Platform API */
|
||||
diff --git a/include/config.h.in b/include/config.h.in
|
||||
index b3df2f3..1330d30 100644
|
||||
--- a/include/config.h.in
|
||||
+++ b/include/config.h.in
|
||||
@@ -1443,6 +1443,9 @@
|
||||
/* Define to the soname of the libopenal library. */
|
||||
#undef SONAME_LIBOPENAL
|
||||
|
||||
+/* Define to the soname of the libOpenCL library. */
|
||||
+#undef SONAME_LIBOPENCL
|
||||
+
|
||||
/* Define to the soname of the libOSMesa library. */
|
||||
#undef SONAME_LIBOSMESA
|
||||
|
||||
--
|
||||
1.9.1
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user