wintab32 is currently broken in the new wow64 mode because the `tablet_get_packet` thunk in winex11.drv is not implemented. Since the structure it is copying is entirely internal to Wine, and the HCTX handle value is not actually read or written by the driver side, I found that simply padding the structure to keep the rest of it aligned was enough to make wow64 happy and allow wintab32 to function.
This is somewhat a stopgap. What would be much better is to refactor the wintab code such that more of the logic is in the wintab32 implementation and not the driver. My goal is to accomplish this as part of trying to get my winewayland graphics tablet patch into an acceptable state for upstreaming. However, I think this is still a worthwhile improvement to have in the interim, if it is acceptable.
From: John Chadwick john@jchw.io
WTPACKET's structure is never directly exposed via the API; it's internal to Wine. The HCTX value is only used on the wintab32 side, not the driver side, so this is safe to do.
This eliminates the need to have a wow64 thunk for tablet_get_packet. --- dlls/winex11.drv/wintab.c | 3 +++ dlls/wintab32/wintab_internal.h | 3 +++ 2 files changed, 6 insertions(+)
diff --git a/dlls/winex11.drv/wintab.c b/dlls/winex11.drv/wintab.c index 6f1437f14c6..5bcbf1666d3 100644 --- a/dlls/winex11.drv/wintab.c +++ b/dlls/winex11.drv/wintab.c @@ -237,6 +237,9 @@ typedef struct tagWTI_DEVICES_INFO
typedef struct tagWTPACKET { HCTX pkContext; +#ifndef _WIN64 + DWORD dwPadding; +#endif UINT pkStatus; LONG pkTime; WTPKT pkChanged; diff --git a/dlls/wintab32/wintab_internal.h b/dlls/wintab32/wintab_internal.h index b0a2e8fd58f..7d06e59cb2f 100644 --- a/dlls/wintab32/wintab_internal.h +++ b/dlls/wintab32/wintab_internal.h @@ -118,6 +118,9 @@ typedef struct tagWTI_EXTENSIONS_INFO
typedef struct tagWTPACKET { HCTX pkContext; +#ifndef _WIN64 + DWORD dwPadding; +#endif UINT pkStatus; LONG pkTime; WTPKT pkChanged;
From: John Chadwick john@jchw.io
The previous commit ensures that the WTPACKET fields align between 32-bit and 64-bit architectures, so now we can use the same tablet_get_packet without needing another thunk. --- dlls/winex11.drv/x11drv_main.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/dlls/winex11.drv/x11drv_main.c b/dlls/winex11.drv/x11drv_main.c index 3f8e48a7a8d..c4ec133cb0b 100644 --- a/dlls/winex11.drv/x11drv_main.c +++ b/dlls/winex11.drv/x11drv_main.c @@ -826,12 +826,6 @@ C_ASSERT( ARRAYSIZE(__wine_unix_call_funcs) == unix_funcs_count );
#ifdef _WIN64
-static NTSTATUS x11drv_wow64_tablet_get_packet( void *arg ) -{ - FIXME( "%p\n", arg ); - return 0; -} - static NTSTATUS x11drv_wow64_tablet_info( void *arg ) { struct @@ -852,7 +846,7 @@ const unixlib_entry_t __wine_unix_call_wow64_funcs[] = { x11drv_init, x11drv_tablet_attach_queue, - x11drv_wow64_tablet_get_packet, + x11drv_tablet_get_packet, x11drv_wow64_tablet_info, x11drv_tablet_load_info, };
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=148763
Your paranoid android.
=== debian11b (64 bit WoW report) ===
mf: mf.c:5383: Test failed: got hr 0x800c0008 mf: Timeout
urlmon: protocol.c:1198: Test failed: hrResult = 800c0008, expected: 00000000 protocol.c:1203: Test failed: dwError == ERROR_SUCCESS protocol.c:710: Test failed: expected OnResponse protocol.c:712: Test failed: expected ReportProgress_ACCEPTRANGES protocol.c:716: Test failed: expected ReportProgress_MIMETYPEAVAILABLE