Compare commits

..

4 Commits

Author SHA1 Message Date
Alistair Leslie-Hughes
0111d074e6 Release v7.0-rc6 2022-01-15 13:32:32 +11:00
Alistair Leslie-Hughes
b4028037d9 Rebase against 7aaeec35e2d7cc799461858edb788e412e9a1fbe. 2022-01-13 12:59:06 +11:00
Alistair Leslie-Hughes
e1c496b21e updated nvcuda-CUDA_Support patchset
Thanks Sveinar Søpler.
2022-01-12 11:35:55 +11:00
Alistair Leslie-Hughes
ee4ca71a7f Release v7.0-rc5 2022-01-08 10:48:47 +11:00
6 changed files with 212 additions and 27 deletions

View File

@@ -0,0 +1,95 @@
From af088c1d1c1a5757466f620d981b766184b973b7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Sveinar=20S=C3=B8pler?= <cybermax@dexter.no>
Date: Tue, 11 Jan 2022 17:25:06 +0100
Subject: [PATCH 1/2] nvcuda: Implement cuDeviceGetUuid and cuDeviceGetLuid
This partially resolves #52342
DAZ Studio4 will fail to initialize cuda if no valid UUID and LUID
is obtained. Linux nvCUDA does not provide a LUID, so this will be
a "fake" LUID for now.
---
dlls/nvcuda/nvcuda.c | 33 +++++++++++++++++++++++++++++++++
dlls/nvcuda/nvcuda.spec | 4 ++--
2 files changed, 35 insertions(+), 2 deletions(-)
diff --git a/dlls/nvcuda/nvcuda.c b/dlls/nvcuda/nvcuda.c
index 5b6bf53a1de..dde0bfa8469 100644
--- a/dlls/nvcuda/nvcuda.c
+++ b/dlls/nvcuda/nvcuda.c
@@ -408,6 +408,9 @@ static CUresult (*pcuStreamQuery_ptsz)(CUstream hStream);
static CUresult (*pcuStreamSynchronize_ptsz)(CUstream hStream);
static CUresult (*pcuStreamWaitEvent_ptsz)(CUstream hStream, CUevent hEvent, unsigned int Flags);
+/* Cuda 10.0 */
+static CUresult (*pcuDeviceGetUuid)(CUuuid *uuid, CUdevice dev);
+static CUresult (*pcuDeviceGetLuid)(char *luid, unsigned int *deviceNodeMask, CUdevice dev);
static void *cuda_handle = NULL;
@@ -758,6 +761,10 @@ static BOOL load_functions(void)
TRY_LOAD_FUNCPTR(cuStreamSynchronize_ptsz);
TRY_LOAD_FUNCPTR(cuStreamWaitEvent_ptsz);
+ /* CUDA 10 */
+ TRY_LOAD_FUNCPTR(cuDeviceGetUuid);
+ TRY_LOAD_FUNCPTR(cuDeviceGetLuid);
+
#undef LOAD_FUNCPTR
#undef TRY_LOAD_FUNCPTR
@@ -2904,6 +2911,32 @@ CUresult WINAPI wine_cuStreamWaitEvent_ptsz(CUstream hStream, CUevent hEvent, un
return pcuStreamWaitEvent_ptsz(hStream, hEvent, Flags);
}
+/*
+ * Additions in CUDA 10.0
+ */
+
+CUresult WINAPI wine_cuDeviceGetUuid(CUuuid *uuid, CUdevice dev)
+{
+ TRACE("(%p, %d)\n", uuid, dev);
+ CHECK_FUNCPTR(cuDeviceGetUuid);
+ return pcuDeviceGetUuid(uuid, dev);
+}
+
+CUresult WINAPI wine_cuDeviceGetLuid(char *luid, unsigned int *deviceNodeMask, CUdevice dev)
+{
+ int wine_luid[] = { 0x0000000e, 0x00000000 };
+
+ TRACE("(%p, %p, %d)\n", luid, deviceNodeMask, dev);
+ CHECK_FUNCPTR(cuDeviceGetLuid);
+ /* Linux native libcuda does not provide a LUID, so we need to fake something and return a success */
+
+ memcpy(luid, &wine_luid, sizeof(wine_luid));
+ FIXME("Fix this LUID: (0x%08x)\n", *luid);
+ *deviceNodeMask = 1;
+
+ return CUDA_SUCCESS;
+}
+
#undef CHECK_FUNCPTR
/*
diff --git a/dlls/nvcuda/nvcuda.spec b/dlls/nvcuda/nvcuda.spec
index 891920b8699..85abf5d2e63 100644
--- a/dlls/nvcuda/nvcuda.spec
+++ b/dlls/nvcuda/nvcuda.spec
@@ -93,12 +93,12 @@
@ stdcall cuDeviceGetAttribute(ptr long long) wine_cuDeviceGetAttribute
@ stdcall cuDeviceGetByPCIBusId(ptr str) wine_cuDeviceGetByPCIBusId
@ stdcall cuDeviceGetCount(ptr) wine_cuDeviceGetCount
-@ stub cuDeviceGetLuid
+@ stdcall cuDeviceGetLuid(ptr ptr long) wine_cuDeviceGetLuid
@ stdcall cuDeviceGetName(ptr long long) wine_cuDeviceGetName
@ stub cuDeviceGetP2PAttribute
@ stdcall cuDeviceGetPCIBusId(ptr long long) wine_cuDeviceGetPCIBusId
@ stdcall cuDeviceGetProperties(ptr long) wine_cuDeviceGetProperties
-@ stub cuDeviceGetUuid
+@ stdcall cuDeviceGetUuid(ptr long) wine_cuDeviceGetUuid
@ stdcall cuDevicePrimaryCtxGetState(long ptr ptr) wine_cuDevicePrimaryCtxGetState
@ stdcall cuDevicePrimaryCtxRelease(long) wine_cuDevicePrimaryCtxRelease
@ stdcall cuDevicePrimaryCtxReset(long) wine_cuDevicePrimaryCtxReset
--
2.34.1

View File

@@ -0,0 +1,88 @@
From c81d2443afb5c48bed31a31ad03fde29b8b7d920 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Sveinar=20S=C3=B8pler?= <cybermax@dexter.no>
Date: Tue, 11 Jan 2022 17:30:06 +0100
Subject: [PATCH 2/2] nvcuda: Expand the Unknown1 table
This partially resolve #52342
The table for UUID_Unknown1 needs to be expanded because
DAZ Studio4 uses Unknown1_func5 and Unknown1_func6.
This also gets rid of the WARNING about "Your CUDA version supports a
newer interface for Unknown1 then the Wine implementation" when
using recent nVidia proprietary drivers.
---
dlls/nvcuda/internal.c | 36 ++++++++++++++++++++++++++++++++++++
1 file changed, 36 insertions(+)
diff --git a/dlls/nvcuda/internal.c b/dlls/nvcuda/internal.c
index 0b654a967fa..db5f1fd6710 100644
--- a/dlls/nvcuda/internal.c
+++ b/dlls/nvcuda/internal.c
@@ -111,6 +111,10 @@ struct Unknown1_table
void* (WINAPI *func2)(void *param0, void *param1);
void* (WINAPI *func3)(void *param0, void *param1);
void* (WINAPI *func4)(void *param0);
+ void* (WINAPI *func5)(void *param0, void *param1);
+ void* (WINAPI *func6)(void *param0, void *param1);
+ void* (WINAPI *func7)(void *param0, void *param1);
+ void* (WINAPI *func8)(void *param0, void *param1);
};
static const struct
{
@@ -120,6 +124,10 @@ static const struct
void* (*func2)(void *param0, void *param1);
void* (*func3)(void *param0, void *param1);
void* (*func4)(void *param0);
+ void* (*func5)(void *param0, void *param1);
+ void* (*func6)(void *param0, void *param1);
+ void* (*func7)(void *param0, void *param1);
+ void* (*func8)(void *param0, void *param1);
} *Unknown1_orig = NULL;
/*
@@ -233,6 +241,30 @@ static void* WINAPI Unknown1_func4_relay(void *param0)
return Unknown1_orig->func4(param0);
}
+static void* WINAPI Unknown1_func5_relay(void *param0, void *param1)
+{
+ TRACE("(%p, %p)\n", param0, param1);
+ return Unknown1_orig->func5(param0, param1);
+}
+
+static void* WINAPI Unknown1_func6_relay(void *param0, void *param1)
+{
+ TRACE("(%p, %p)\n", param0, param1);
+ return Unknown1_orig->func6(param0, param1);
+}
+
+static void* WINAPI Unknown1_func7_relay(void *param0, void *param1)
+{
+ TRACE("(%p, %p)\n", param0, param1);
+ return Unknown1_orig->func7(param0, param1);
+}
+
+static void* WINAPI Unknown1_func8_relay(void *param0, void *param1)
+{
+ TRACE("(%p, %p)\n", param0, param1);
+ return Unknown1_orig->func8(param0, param1);
+}
+
struct Unknown1_table Unknown1_Impl =
{
sizeof(struct Unknown1_table),
@@ -241,6 +273,10 @@ struct Unknown1_table Unknown1_Impl =
Unknown1_func2_relay,
Unknown1_func3_relay,
Unknown1_func4_relay,
+ Unknown1_func5_relay,
+ Unknown1_func6_relay,
+ Unknown1_func7_relay,
+ Unknown1_func8_relay,
};
static void* WINAPI Unknown2_func0_relay(void *param0, void *param1)
--
2.34.1

View File

@@ -51,13 +51,13 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "86eaf7eeb2603d1b13d18e3fe71a615e1ee14cee"
echo "b2f75a026f14805888a4b91d8a2e2c60a35fc1b7"
}
# Show version information
version()
{
echo "Wine Staging 7.0-rc5"
echo "Wine Staging 7.0-rc6"
echo "Copyright (C) 2014-2019 the Wine Staging project authors."
echo "Copyright (C) 2018-2020 Alistair Leslie-Hughes"
echo ""
@@ -2591,6 +2591,8 @@ if test "$enable_nvcuda_CUDA_Support" -eq 1; then
patch_apply nvcuda-CUDA_Support/0011-nvcuda-Add-semi-stub-for-cuD3D10GetDevice.patch
patch_apply nvcuda-CUDA_Support/0012-nvcuda-Add-semi-stub-for-cuD3D11GetDevice-and-cuGrap.patch
patch_apply nvcuda-CUDA_Support/0013-nvcuda-Update-spec-file.patch
patch_apply nvcuda-CUDA_Support/0014-nvcuda-Implement-cuDeviceGetUuid-and-cuDeviceGetLuid.patch
patch_apply nvcuda-CUDA_Support/0015-nvcuda-Expand-the-Unknown1-table.patch
fi
# Patchset nvapi-Stub_DLL

View File

@@ -1,4 +1,4 @@
From 9875a6033aaa0043a7c29926a026ecafb56382e6 Mon Sep 17 00:00:00 2001
From c477afc32310c399f4c6a40e9943a2af69811006 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sun, 15 Mar 2015 01:05:48 +0100
Subject: [PATCH] server: Fix handling of GetMessage after previous PeekMessage
@@ -15,10 +15,10 @@ Changes in v3:
2 files changed, 62 insertions(+), 17 deletions(-)
diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c
index 7eaa2c67945..8f8b1b98933 100644
index 139272a61fe..c390afd9e87 100644
--- a/dlls/user32/tests/msg.c
+++ b/dlls/user32/tests/msg.c
@@ -12648,13 +12648,10 @@ static void test_PeekMessage3(void)
@@ -12853,13 +12853,10 @@ static void test_PeekMessage3(void)
ok(msg.message == WM_TIMER, "msg.message = %u instead of WM_TIMER\n", msg.message);
PostMessageA(hwnd, WM_USER, 0, 0);
ret = PeekMessageA(&msg, NULL, 0, 0, PM_NOREMOVE);
@@ -32,7 +32,7 @@ index 7eaa2c67945..8f8b1b98933 100644
ok(ret && msg.message == WM_USER, "msg.message = %u instead of WM_USER\n", msg.message);
ret = PeekMessageA(&msg, NULL, 0, 0, 0);
ok(!ret, "expected PeekMessage to return FALSE, got %u\n", ret);
@@ -12664,10 +12661,8 @@ static void test_PeekMessage3(void)
@@ -12869,10 +12866,8 @@ static void test_PeekMessage3(void)
ok(msg.message == WM_TIMER, "msg.message = %u instead of WM_TIMER\n", msg.message);
PostMessageA(hwnd, WM_USER, 0, 0);
ret = PeekMessageA(&msg, NULL, 0, 0, PM_REMOVE);
@@ -43,7 +43,7 @@ index 7eaa2c67945..8f8b1b98933 100644
ok(ret && msg.message == WM_USER, "msg.message = %u instead of WM_USER\n", msg.message);
ret = PeekMessageA(&msg, NULL, 0, 0, 0);
ok(!ret, "expected PeekMessage to return FALSE, got %u\n", ret);
@@ -12679,10 +12674,8 @@ static void test_PeekMessage3(void)
@@ -12884,10 +12879,8 @@ static void test_PeekMessage3(void)
ok(msg.message == WM_TIMER, "msg.message = %u instead of WM_TIMER\n", msg.message);
PostMessageA(hwnd, WM_USER, 0, 0);
ret = GetMessageA(&msg, NULL, 0, 0);
@@ -54,7 +54,7 @@ index 7eaa2c67945..8f8b1b98933 100644
ok(ret && msg.message == WM_USER, "msg.message = %u instead of WM_USER\n", msg.message);
ret = PeekMessageA(&msg, NULL, 0, 0, 0);
ok(!ret, "expected PeekMessage to return FALSE, got %u\n", ret);
@@ -12710,14 +12703,32 @@ static void test_PeekMessage3(void)
@@ -12915,14 +12908,32 @@ static void test_PeekMessage3(void)
ret = GetMessageA(&msg, NULL, 0, 0);
ok(ret && msg.message == WM_USER, "msg.message = %u instead of WM_USER\n", msg.message);
ret = GetMessageA(&msg, NULL, 0, 0);
@@ -90,10 +90,10 @@ index 7eaa2c67945..8f8b1b98933 100644
* because both messages are in the same queue. */
diff --git a/server/queue.c b/server/queue.c
index fce65e360d4..451aaeca008 100644
index d79add56fba..15c4b21ea50 100644
--- a/server/queue.c
+++ b/server/queue.c
@@ -143,6 +143,7 @@ struct msg_queue
@@ -141,6 +141,7 @@ struct msg_queue
struct hook_table *hooks; /* hook table */
timeout_t last_get_msg; /* time of last get message call */
int keystate_lock; /* owns an input keystate lock */
@@ -101,7 +101,7 @@ index fce65e360d4..451aaeca008 100644
};
struct hotkey
@@ -311,6 +312,7 @@ static struct msg_queue *create_msg_queue( struct thread *thread, struct thread_
@@ -309,6 +310,7 @@ static struct msg_queue *create_msg_queue( struct thread *thread, struct thread_
queue->hooks = NULL;
queue->last_get_msg = current_time;
queue->keystate_lock = 0;
@@ -109,7 +109,7 @@ index fce65e360d4..451aaeca008 100644
list_init( &queue->send_result );
list_init( &queue->callback_result );
list_init( &queue->pending_timers );
@@ -577,13 +579,21 @@ static inline struct msg_queue *get_current_queue(void)
@@ -576,13 +578,21 @@ static inline struct msg_queue *get_current_queue(void)
}
/* get a (pseudo-)unique id to tag hardware messages */
@@ -132,7 +132,7 @@ index fce65e360d4..451aaeca008 100644
/* try to merge a message with the last in the list; return 1 if successful */
static int merge_message( struct thread_input *input, const struct message *msg )
{
@@ -861,7 +871,7 @@ static int match_window( user_handle_t win, user_handle_t msg_win )
@@ -860,7 +870,7 @@ static int match_window( user_handle_t win, user_handle_t msg_win )
}
/* retrieve a posted message */
@@ -141,7 +141,7 @@ index fce65e360d4..451aaeca008 100644
unsigned int first, unsigned int last, unsigned int flags,
struct get_message_reply *reply )
{
@@ -872,6 +882,7 @@ static int get_posted_message( struct msg_queue *queue, user_handle_t win,
@@ -871,6 +881,7 @@ static int get_posted_message( struct msg_queue *queue, user_handle_t win,
{
if (!match_window( win, msg->win )) continue;
if (!check_msg_filter( msg->msg, first, last )) continue;
@@ -149,7 +149,7 @@ index fce65e360d4..451aaeca008 100644
goto found; /* found one */
}
return 0;
@@ -1488,6 +1499,7 @@ found:
@@ -1487,6 +1498,7 @@ found:
msg->msg = WM_HOTKEY;
msg->wparam = hotkey->id;
msg->lparam = ((hotkey->vkey & 0xffff) << 16) | modifiers;
@@ -157,16 +157,16 @@ index fce65e360d4..451aaeca008 100644
free( msg->data );
msg->data = NULL;
@@ -2125,7 +2137,7 @@ static int get_hardware_message( struct thread *thread, unsigned int hw_id, user
continue;
@@ -2198,7 +2210,7 @@ static int get_hardware_message( struct thread *thread, unsigned int hw_id, user
}
/* now we can return it */
- if (!msg->unique_id) msg->unique_id = get_unique_id();
+ if (!msg->unique_id) msg->unique_id = get_unique_hw_id();
reply->type = MSG_HARDWARE;
reply->win = win;
reply->msg = msg_code;
@@ -2231,6 +2243,7 @@ void post_message( user_handle_t win, unsigned int message, lparam_t wparam, lpa
@@ -2304,6 +2316,7 @@ void post_message( user_handle_t win, unsigned int message, lparam_t wparam, lpa
msg->result = NULL;
msg->data = NULL;
msg->data_size = 0;
@@ -174,7 +174,7 @@ index fce65e360d4..451aaeca008 100644
get_message_defaults( thread->queue, &msg->x, &msg->y, &msg->time );
@@ -2475,6 +2488,7 @@ DECL_HANDLER(send_message)
@@ -2548,6 +2561,7 @@ DECL_HANDLER(send_message)
set_queue_bits( recv_queue, QS_SENDMESSAGE );
break;
case MSG_POSTED:
@@ -182,7 +182,7 @@ index fce65e360d4..451aaeca008 100644
list_add_tail( &recv_queue->msg_list[POST_MESSAGE], &msg->entry );
set_queue_bits( recv_queue, QS_POSTMESSAGE|QS_ALLPOSTMESSAGE );
if (msg->msg == WM_HOTKEY)
@@ -2595,12 +2609,12 @@ DECL_HANDLER(get_message)
@@ -2668,12 +2682,12 @@ DECL_HANDLER(get_message)
/* then check for posted messages */
if ((filter & QS_POSTMESSAGE) &&
@@ -197,7 +197,7 @@ index fce65e360d4..451aaeca008 100644
return;
/* only check for quit messages if not posted messages pending */
@@ -2611,7 +2625,7 @@ DECL_HANDLER(get_message)
@@ -2684,7 +2698,7 @@ DECL_HANDLER(get_message)
if ((filter & QS_INPUT) &&
filter_contains_hw_range( req->get_first, req->get_last ) &&
get_hardware_message( current, req->hw_id, get_win, req->get_first, req->get_last, req->flags, reply ))
@@ -206,7 +206,7 @@ index fce65e360d4..451aaeca008 100644
/* now check for WM_PAINT */
if ((filter & QS_PAINT) &&
@@ -2624,7 +2638,7 @@ DECL_HANDLER(get_message)
@@ -2697,7 +2711,7 @@ DECL_HANDLER(get_message)
reply->wparam = 0;
reply->lparam = 0;
get_message_defaults( queue, &reply->x, &reply->y, &reply->time );
@@ -215,7 +215,7 @@ index fce65e360d4..451aaeca008 100644
}
/* now check for timer */
@@ -2640,13 +2654,30 @@ DECL_HANDLER(get_message)
@@ -2713,13 +2727,30 @@ DECL_HANDLER(get_message)
get_message_defaults( queue, &reply->x, &reply->y, &reply->time );
if (!(req->flags & PM_NOYIELD) && current->process->idle_event)
set_event( current->process->idle_event );
@@ -247,7 +247,7 @@ index fce65e360d4..451aaeca008 100644
}
@@ -2664,7 +2695,10 @@ DECL_HANDLER(reply_message)
@@ -2737,7 +2768,10 @@ DECL_HANDLER(reply_message)
DECL_HANDLER(accept_hardware_message)
{
if (current->queue)
@@ -259,5 +259,5 @@ index fce65e360d4..451aaeca008 100644
set_error( STATUS_ACCESS_DENIED );
}
--
2.30.2
2.34.1

View File

@@ -1 +1 @@
Wine Staging 7.0-rc5
Wine Staging 7.0-rc6

View File

@@ -1 +1 @@
529e4154a34a5a774fe7036552ffbb060740da90
b2f75a026f14805888a4b91d8a2e2c60a35fc1b7