Compare commits

..

17 Commits

Author SHA1 Message Date
Alistair Leslie-Hughes
c26e42e521 Release v9.0-rc5 2024-01-13 14:00:42 +11:00
Alistair Leslie-Hughes
4f14df2caa Updated vkd3d-latest patchset 2024-01-13 12:21:42 +11:00
Alistair Leslie-Hughes
8a76fd6c73 Updated vkd3d-latest patchset 2024-01-10 07:41:15 +11:00
Alistair Leslie-Hughes
2f3062bc92 Release v9.0-rc4 2024-01-06 17:02:21 +11:00
Alistair Leslie-Hughes
ddfaf18da9 Rebase against d56fc6d318d96bb80495f015e271d485ac41b9d7. 2024-01-06 10:00:35 +11:00
Alistair Leslie-Hughes
40c8ba4a5b Updated vkd3d-latest patchset 2024-01-05 11:03:51 +11:00
Alistair Leslie-Hughes
836fa152e2 Updated vkd3d-latest patchset 2024-01-04 12:27:58 +11:00
Alistair Leslie-Hughes
92b36477fa Updated vkd3d-latest patchset 2024-01-03 19:11:38 +11:00
Alistair Leslie-Hughes
75f626ecc8 Release v9.0-rc3 2023-12-23 15:16:12 +11:00
Alistair Leslie-Hughes
2600edffb6 Release v9.0-rc2 2023-12-16 18:59:51 +11:00
Alistair Leslie-Hughes
a0ba29447f Updated vkd3d-latest patchset 2023-12-16 18:59:12 +11:00
Alistair Leslie-Hughes
5c20f9daef Rebase against 7a8c039a5c34fe0c625b3684b4c7026a21dd290e. 2023-12-16 09:53:42 +11:00
Alistair Leslie-Hughes
e7da8d2e49 Updated vkd3d-latest patchset 2023-12-14 10:29:38 +11:00
Alistair Leslie-Hughes
6a68d558cd Rebase against 19ad5bd598d603617341cbb2beec90bd69fa6349. 2023-12-14 10:05:14 +11:00
Alistair Leslie-Hughes
06d1eb5825 Updated vkd3d-latest patchset 2023-12-13 18:30:39 +11:00
Alistair Leslie-Hughes
8984896a4d Added programs-where patchset 2023-12-13 18:29:14 +11:00
Alistair Leslie-Hughes
713c9cba97 Added setupapi-DriverStoreFindDriverPackageW patchset 2023-12-13 18:28:24 +11:00
20 changed files with 6738 additions and 65 deletions

View File

@@ -1,4 +1,4 @@
From 22f53694277313639b0ca00f6f075407839737e7 Mon Sep 17 00:00:00 2001
From 8f9e309dc4b3e9c7328c86cc4993b9359f0e6839 Mon Sep 17 00:00:00 2001
From: Paul Gofman <pgofman@codeweavers.com>
Date: Mon, 25 Nov 2019 12:19:20 +0300
Subject: [PATCH] ntdll: Force virtual memory allocation order.
@@ -16,10 +16,10 @@ Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46568
1 file changed, 164 insertions(+), 246 deletions(-)
diff --git a/dlls/ntdll/unix/virtual.c b/dlls/ntdll/unix/virtual.c
index 30d0df85fba..a14bbb852f8 100644
index cd1655d41b2..c0537375ab8 100644
--- a/dlls/ntdll/unix/virtual.c
+++ b/dlls/ntdll/unix/virtual.c
@@ -1246,43 +1246,15 @@ static struct file_view *find_view_range( const void *addr, size_t size )
@@ -1241,43 +1241,15 @@ static struct file_view *find_view_range( const void *addr, size_t size )
}
@@ -71,7 +71,7 @@ index 30d0df85fba..a14bbb852f8 100644
/***********************************************************************
* try_map_free_area
@@ -1317,112 +1289,6 @@ static void* try_map_free_area( void *base, void *end, ptrdiff_t step,
@@ -1312,112 +1284,6 @@ static void* try_map_free_area( void *base, void *end, ptrdiff_t step,
}
@@ -184,7 +184,7 @@ index 30d0df85fba..a14bbb852f8 100644
/***********************************************************************
* remove_reserved_area
*
@@ -1532,8 +1398,7 @@ static void free_view( struct file_view *view )
@@ -1527,8 +1393,7 @@ static void free_view( struct file_view *view )
*/
static void unregister_view( struct file_view *view )
{
@@ -194,7 +194,7 @@ index 30d0df85fba..a14bbb852f8 100644
wine_rb_remove( &views_tree, &view->entry );
}
@@ -1561,8 +1426,7 @@ static void delete_view( struct file_view *view ) /* [in] View */
@@ -1556,8 +1421,7 @@ static void delete_view( struct file_view *view ) /* [in] View */
static void register_view( struct file_view *view )
{
wine_rb_put( &views_tree, view->base, &view->entry );
@@ -204,7 +204,7 @@ index 30d0df85fba..a14bbb852f8 100644
}
@@ -1835,89 +1699,176 @@ static inline void *unmap_extra_space( void *ptr, size_t total_size, size_t want
@@ -1830,89 +1694,176 @@ static inline void *unmap_extra_space( void *ptr, size_t total_size, size_t want
return ptr;
}
@@ -442,12 +442,12 @@ index 30d0df85fba..a14bbb852f8 100644
}
/***********************************************************************
@@ -2020,48 +1971,13 @@ static NTSTATUS map_view( struct file_view **view_ret, void *base, size_t size,
@@ -2016,48 +1967,13 @@ static NTSTATUS map_view( struct file_view **view_ret, void *base, size_t size,
}
else
{
- void *start = address_space_start;
- void *end = user_space_limit;
- void *end = min( user_space_limit, host_addr_space_limit );
- size_t view_size, unmap_size;
-
+ limit_high = limit_high ? min( limit_high + 1, (UINT_PTR)user_space_limit) : (UINT_PTR)user_space_limit;
@@ -464,7 +464,7 @@ index 30d0df85fba..a14bbb852f8 100644
- goto done;
- }
- if (start > address_space_start || end < address_space_limit || top_down)
- if (start > address_space_start || end < host_addr_space_limit || top_down)
- {
- if (!(ptr = map_free_area( start, end, size, top_down, get_unix_prot(vprot), align_mask )))
- return STATUS_NO_MEMORY;
@@ -495,7 +495,7 @@ index 30d0df85fba..a14bbb852f8 100644
status = create_view( view_ret, ptr, size, vprot );
if (status != STATUS_SUCCESS) unmap_area( ptr, size );
return status;
@@ -3213,6 +3129,7 @@ static unsigned int virtual_map_section( HANDLE handle, PVOID *addr_ptr, ULONG_P
@@ -3236,6 +3152,7 @@ static unsigned int virtual_map_section( HANDLE handle, PVOID *addr_ptr, ULONG_P
done:
server_leave_uninterrupted_section( &virtual_mutex, &sigset );
if (needs_close) close( unix_handle );
@@ -503,7 +503,7 @@ index 30d0df85fba..a14bbb852f8 100644
return res;
}
@@ -6110,6 +6027,7 @@ NTSTATUS WINAPI NtWow64AllocateVirtualMemory64( HANDLE process, ULONG64 *ret, UL
@@ -6143,6 +6060,7 @@ NTSTATUS WINAPI NtWow64AllocateVirtualMemory64( HANDLE process, ULONG64 *ret, UL
*ret = (ULONG_PTR)base;
*size_ptr = size;
}

View File

@@ -1,4 +1,4 @@
From 7c62f566f9b48dacab5cc79dac496f498aaae68b Mon Sep 17 00:00:00 2001
From d13a3f4498ddc7f10a1d435edb5c59b71dca1efc Mon Sep 17 00:00:00 2001
From: Paul Gofman <pgofman@codeweavers.com>
Date: Fri, 1 Dec 2023 14:55:20 -0600
Subject: [PATCH] ntdll: Exclude natively mapped areas from free areas list.
@@ -8,7 +8,7 @@ Subject: [PATCH] ntdll: Exclude natively mapped areas from free areas list.
1 file changed, 95 insertions(+), 9 deletions(-)
diff --git a/dlls/ntdll/unix/virtual.c b/dlls/ntdll/unix/virtual.c
index a14bbb852f8..491597dcb76 100644
index c0537375ab8..b4d7f6a580d 100644
--- a/dlls/ntdll/unix/virtual.c
+++ b/dlls/ntdll/unix/virtual.c
@@ -127,6 +127,7 @@ struct file_view
@@ -19,8 +19,8 @@ index a14bbb852f8..491597dcb76 100644
/* Conversion from VPROT_* to Win32 flags */
static const BYTE VIRTUAL_Win32Flags[16] =
@@ -180,6 +181,8 @@ static void *working_set_limit = (void *)0x7fff0000;
#endif
@@ -175,6 +176,8 @@ static void *working_set_limit = (void *)0x7fff0000;
static void *host_addr_space_limit; /* top of the host virtual address space */
static struct file_view *arm64ec_view;
+static const ptrdiff_t max_try_map_step = 0x40000000;
@@ -28,7 +28,7 @@ index a14bbb852f8..491597dcb76 100644
ULONG_PTR user_space_wow_limit = 0;
struct _KUSER_SHARED_DATA *user_shared_data = (void *)0x7ffe0000;
@@ -1134,7 +1137,9 @@ static void dump_view( struct file_view *view )
@@ -1129,7 +1132,9 @@ static void dump_view( struct file_view *view )
BYTE prot = get_page_vprot( addr );
TRACE( "View: %p - %p", addr, addr + view->size - 1 );
@@ -39,7 +39,7 @@ index a14bbb852f8..491597dcb76 100644
TRACE( " (builtin image)\n" );
else if (view->protect & VPROT_FREE_PLACEHOLDER)
TRACE( " (placeholder)\n" );
@@ -1254,6 +1259,8 @@ struct alloc_area
@@ -1249,6 +1254,8 @@ struct alloc_area
int unix_prot;
BOOL top_down;
UINT_PTR align_mask;
@@ -48,7 +48,7 @@ index a14bbb852f8..491597dcb76 100644
};
/***********************************************************************
@@ -1262,9 +1269,12 @@ struct alloc_area
@@ -1257,9 +1264,12 @@ struct alloc_area
* Try mmaping some expected free memory region, eventually stepping and
* retrying inside it, and return where it actually succeeded, or NULL.
*/
@@ -63,7 +63,7 @@ index a14bbb852f8..491597dcb76 100644
void *ptr;
while (start && base <= start && (char*)start + size <= (char*)end)
@@ -1277,12 +1287,19 @@ static void* try_map_free_area( void *base, void *end, ptrdiff_t step,
@@ -1272,12 +1282,19 @@ static void* try_map_free_area( void *base, void *end, ptrdiff_t step,
strerror(errno), start, (char *)start + size, unix_prot );
return NULL;
}
@@ -84,7 +84,7 @@ index a14bbb852f8..491597dcb76 100644
}
return NULL;
@@ -1707,11 +1724,11 @@ static void *try_map_free_area_range( struct alloc_area *area, char *start, char
@@ -1702,11 +1719,11 @@ static void *try_map_free_area_range( struct alloc_area *area, char *start, char
{
if (end - start < area->size) return NULL;
alloc_start = ROUND_ADDR( end - area->size, area->align_mask );
@@ -98,7 +98,7 @@ index a14bbb852f8..491597dcb76 100644
}
static void *alloc_free_area_in_range( struct alloc_area *area, char *base, char *end )
@@ -1801,9 +1818,10 @@ static void *alloc_free_area( char *limit_low, char *limit_high, size_t size, BO
@@ -1796,9 +1813,10 @@ static void *alloc_free_area( char *limit_low, char *limit_high, size_t size, BO
struct range_entry *range, *ranges_start, *ranges_end;
char *reserve_start, *reserve_end;
struct alloc_area area;
@@ -110,7 +110,7 @@ index a14bbb852f8..491597dcb76 100644
TRACE("limit %p-%p, size %p, top_down %#x.\n", limit_low, limit_high, (void *)size, top_down);
@@ -1868,6 +1886,50 @@ static void *alloc_free_area( char *limit_low, char *limit_high, size_t size, BO
@@ -1863,6 +1881,50 @@ static void *alloc_free_area( char *limit_low, char *limit_high, size_t size, BO
if ((result = alloc_free_area_in_range( &area, base, end )))
break;
}
@@ -161,7 +161,7 @@ index a14bbb852f8..491597dcb76 100644
return result;
}
@@ -1927,6 +1989,17 @@ failed:
@@ -1922,6 +1984,17 @@ failed:
return status;
}
@@ -179,7 +179,7 @@ index a14bbb852f8..491597dcb76 100644
/***********************************************************************
* map_view
*
@@ -1976,7 +2049,15 @@ static NTSTATUS map_view( struct file_view **view_ret, void *base, size_t size,
@@ -1972,7 +2045,15 @@ static NTSTATUS map_view( struct file_view **view_ret, void *base, size_t size,
if (!align_mask) align_mask = granularity_mask;
if (!(ptr = alloc_free_area( (void *)limit_low, (void *)limit_high, size, top_down, get_unix_prot( vprot ), align_mask )))
@@ -196,7 +196,7 @@ index a14bbb852f8..491597dcb76 100644
}
status = create_view( view_ret, ptr, size, vprot );
if (status != STATUS_SUCCESS) unmap_area( ptr, size );
@@ -4255,7 +4336,12 @@ void virtual_set_force_exec( BOOL enable )
@@ -4287,7 +4368,12 @@ void virtual_set_force_exec( BOOL enable )
WINE_RB_FOR_EACH_ENTRY( view, &views_tree, struct file_view, entry )
{
/* file mappings are always accessible */

View File

@@ -0,0 +1,166 @@
From 5c637f58cad289f9cbb46517ba29f16b66973cea Mon Sep 17 00:00:00 2001
From: Alex Henrie <alexhenrie24@gmail.com>
Date: Sat, 22 Jul 2023 13:45:54 -0600
Subject: [PATCH] where: Implement search with default options.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55282
---
programs/where/Makefile.in | 1 +
programs/where/main.c | 116 ++++++++++++++++++++++++++++++++++++-
2 files changed, 114 insertions(+), 3 deletions(-)
diff --git a/programs/where/Makefile.in b/programs/where/Makefile.in
index bca42590176..125c550fa37 100644
--- a/programs/where/Makefile.in
+++ b/programs/where/Makefile.in
@@ -1,4 +1,5 @@
MODULE = where.exe
+IMPORTS = shlwapi
EXTRADLLFLAGS = -mconsole -municode
diff --git a/programs/where/main.c b/programs/where/main.c
index 6f90a222dce..bcabb812aa0 100644
--- a/programs/where/main.c
+++ b/programs/where/main.c
@@ -1,5 +1,6 @@
/*
* Copyright 2020 Louis Lenders
+ * Copyright 2023 Alex Henrie
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -16,18 +17,127 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
+#include <windows.h>
+#include <fileapi.h>
+#include <shlwapi.h>
+
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(where);
+static BOOL found;
+
+static void search(const WCHAR *search_path, const WCHAR *pattern)
+{
+ static const WCHAR *extensions[] = {L"", L".bat", L".cmd", L".com", L".exe"};
+ WCHAR glob[MAX_PATH];
+ WCHAR match_path[MAX_PATH];
+ WIN32_FIND_DATAW match;
+ HANDLE handle;
+ BOOL more;
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(extensions); i++)
+ {
+ if (wcslen(search_path) + 1 + wcslen(pattern) + wcslen(extensions[i]) + 1 > ARRAY_SIZE(glob))
+ {
+ ERR("Path too long\n");
+ return;
+ }
+ /* Treat the extension as part of the pattern */
+ wcscpy(glob, search_path);
+ wcscat(glob, L"\\");
+ wcscat(glob, pattern);
+ wcscat(glob, extensions[i]);
+
+ handle = FindFirstFileExW(glob, FindExInfoBasic, &match, 0, NULL, 0);
+ more = (handle != INVALID_HANDLE_VALUE);
+
+ while (more)
+ {
+ if (PathCombineW(match_path, search_path, match.cFileName))
+ {
+ printf("%ls\n", match_path);
+ found = TRUE;
+ }
+ more = FindNextFileW(handle, &match);
+ }
+ }
+}
+
int __cdecl wmain(int argc, WCHAR *argv[])
{
+ WCHAR *pattern, *colon, *search_paths, *semicolon, *search_path;
int i;
- WINE_FIXME("stub:");
for (i = 0; i < argc; i++)
- WINE_FIXME(" %s", wine_dbgstr_w(argv[i]));
- WINE_FIXME("\n");
+ {
+ if (argv[i][0] == '/')
+ {
+ FIXME("Unsupported option %ls\n", argv[i]);
+ return 1;
+ }
+ }
+
+ for (i = 1; i < argc; i++)
+ {
+ pattern = argv[i];
+ colon = wcsrchr(pattern, ':');
+
+ /* Check for a set of search paths prepended to the pattern */
+ if (colon)
+ {
+ *colon = 0;
+ search_paths = pattern;
+ pattern = colon + 1;
+ }
+ else
+ {
+ DWORD len = GetEnvironmentVariableW(L"PATH", NULL, 0);
+ search_paths = malloc(len * sizeof(WCHAR));
+ if (!search_paths)
+ {
+ ERR("Out of memory\n");
+ return 1;
+ }
+ GetEnvironmentVariableW(L"PATH", search_paths, len);
+ }
+
+ if (wcspbrk(pattern, L"\\/\r\n"))
+ {
+ /* Silently ignore invalid patterns */
+ if (!colon) free(search_paths);
+ continue;
+ }
+
+ if (!colon)
+ {
+ /* If the search paths were not explicitly specified, search the current directory first */
+ WCHAR current_dir[MAX_PATH];
+ if (GetCurrentDirectoryW(ARRAY_SIZE(current_dir), current_dir))
+ search(current_dir, pattern);
+ }
+
+ search_path = search_paths;
+ do
+ {
+ semicolon = wcschr(search_path, ';');
+ if (semicolon)
+ *semicolon = 0;
+ if (*search_path)
+ search(search_path, pattern);
+ search_path = semicolon + 1;
+ }
+ while (semicolon);
+
+ if (!colon) free(search_paths);
+ }
+
+ if (!found)
+ {
+ fputs("File not found\n", stderr);
+ return 1;
+ }
return 0;
}
--
2.43.0

View File

@@ -0,0 +1,3 @@
Fixes: [55282] where: Implement search with default options.
# https://gitlab.winehq.org/wine/wine/-/merge_requests/3368

View File

@@ -1,4 +1,4 @@
From 64bdd8316ca10dd8bd474abb1fe7377dfd678762 Mon Sep 17 00:00:00 2001
From 7685969c358fbfb68d623d6eb4fc80231f07b604 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, 65 insertions(+), 17 deletions(-)
diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c
index 8b89d92cbf1..e7f133899ed 100644
index 0059afcbac7..cf01e156458 100644
--- a/dlls/user32/tests/msg.c
+++ b/dlls/user32/tests/msg.c
@@ -14012,13 +14012,10 @@ static void test_PeekMessage3(void)
@@ -14113,13 +14113,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, hwnd, 0, 0, PM_NOREMOVE);
@@ -32,7 +32,7 @@ index 8b89d92cbf1..e7f133899ed 100644
ok(ret && msg.message == WM_USER, "msg.message = %u instead of WM_USER\n", msg.message);
ret = PeekMessageA(&msg, hwnd, 0, 0, 0);
ok(!ret, "expected PeekMessage to return FALSE, got %u\n", ret);
@@ -14028,10 +14025,8 @@ static void test_PeekMessage3(void)
@@ -14129,10 +14126,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, hwnd, 0, 0, PM_REMOVE);
@@ -43,7 +43,7 @@ index 8b89d92cbf1..e7f133899ed 100644
ok(ret && msg.message == WM_USER, "msg.message = %u instead of WM_USER\n", msg.message);
ret = PeekMessageA(&msg, hwnd, 0, 0, 0);
ok(!ret, "expected PeekMessage to return FALSE, got %u\n", ret);
@@ -14043,10 +14038,11 @@ static void test_PeekMessage3(void)
@@ -14144,10 +14139,11 @@ 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, hwnd, 0, 0);
@@ -57,7 +57,7 @@ index 8b89d92cbf1..e7f133899ed 100644
ok(ret && msg.message == WM_USER, "msg.message = %u instead of WM_USER\n", msg.message);
ret = PeekMessageA(&msg, hwnd, 0, 0, 0);
ok(!ret, "expected PeekMessage to return FALSE, got %u\n", ret);
@@ -14074,14 +14070,32 @@ static void test_PeekMessage3(void)
@@ -14175,14 +14171,32 @@ static void test_PeekMessage3(void)
ret = GetMessageA(&msg, hwnd, 0, 0);
ok(ret && msg.message == WM_USER, "msg.message = %u instead of WM_USER\n", msg.message);
ret = GetMessageA(&msg, hwnd, 0, 0);
@@ -93,7 +93,7 @@ index 8b89d92cbf1..e7f133899ed 100644
* because both messages are in the same queue. */
diff --git a/server/queue.c b/server/queue.c
index fcc946ff0cb..348fdac3214 100644
index 9007438e082..1d7a31a318a 100644
--- a/server/queue.c
+++ b/server/queue.c
@@ -142,6 +142,7 @@ struct msg_queue
@@ -112,7 +112,7 @@ index fcc946ff0cb..348fdac3214 100644
list_init( &queue->send_result );
list_init( &queue->callback_result );
list_init( &queue->pending_timers );
@@ -634,13 +636,21 @@ static inline struct msg_queue *get_current_queue(void)
@@ -643,13 +645,21 @@ static inline struct msg_queue *get_current_queue(void)
}
/* get a (pseudo-)unique id to tag hardware messages */
@@ -135,7 +135,7 @@ index fcc946ff0cb..348fdac3214 100644
/* try to merge a WM_MOUSEMOVE message with the last in the list; return 1 if successful */
static int merge_mousemove( struct thread_input *input, const struct message *msg )
{
@@ -951,7 +961,7 @@ static int match_window( user_handle_t win, user_handle_t msg_win )
@@ -960,7 +970,7 @@ static int match_window( user_handle_t win, user_handle_t msg_win )
}
/* retrieve a posted message */
@@ -144,7 +144,7 @@ index fcc946ff0cb..348fdac3214 100644
unsigned int first, unsigned int last, unsigned int flags,
struct get_message_reply *reply )
{
@@ -962,6 +972,7 @@ static int get_posted_message( struct msg_queue *queue, user_handle_t win,
@@ -971,6 +981,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;
@@ -152,7 +152,7 @@ index fcc946ff0cb..348fdac3214 100644
goto found; /* found one */
}
return 0;
@@ -1576,6 +1587,7 @@ found:
@@ -1585,6 +1596,7 @@ found:
msg->msg = WM_HOTKEY;
msg->wparam = hotkey->id;
msg->lparam = ((hotkey->vkey & 0xffff) << 16) | modifiers;
@@ -160,7 +160,7 @@ index fcc946ff0cb..348fdac3214 100644
free( msg->data );
msg->data = NULL;
@@ -2267,7 +2279,7 @@ static int get_hardware_message( struct thread *thread, unsigned int hw_id, user
@@ -2276,7 +2288,7 @@ static int get_hardware_message( struct thread *thread, unsigned int hw_id, user
}
/* now we can return it */
@@ -169,7 +169,7 @@ index fcc946ff0cb..348fdac3214 100644
reply->type = MSG_HARDWARE;
reply->win = win;
reply->msg = msg_code;
@@ -2373,6 +2385,7 @@ void post_message( user_handle_t win, unsigned int message, lparam_t wparam, lpa
@@ -2382,6 +2394,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;
@@ -177,7 +177,7 @@ index fcc946ff0cb..348fdac3214 100644
get_message_defaults( thread->queue, &msg->x, &msg->y, &msg->time );
@@ -2617,6 +2630,7 @@ DECL_HANDLER(send_message)
@@ -2626,6 +2639,7 @@ DECL_HANDLER(send_message)
set_queue_bits( recv_queue, QS_SENDMESSAGE );
break;
case MSG_POSTED:
@@ -185,7 +185,7 @@ index fcc946ff0cb..348fdac3214 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)
@@ -2735,12 +2749,12 @@ DECL_HANDLER(get_message)
@@ -2744,12 +2758,12 @@ DECL_HANDLER(get_message)
/* then check for posted messages */
if ((filter & QS_POSTMESSAGE) &&
@@ -200,16 +200,16 @@ index fcc946ff0cb..348fdac3214 100644
return;
/* only check for quit messages if not posted messages pending */
@@ -2751,7 +2765,7 @@ DECL_HANDLER(get_message)
@@ -2760,7 +2774,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 ))
- return;
+ goto found_msg;
/* now check for WM_PAINT */
if ((filter & QS_PAINT) &&
@@ -2764,7 +2778,7 @@ DECL_HANDLER(get_message)
/* check for any internal driver message */
if (get_hardware_message( current, req->hw_id, get_win, WM_WINE_FIRST_DRIVER_MSG,
@@ -2778,7 +2792,7 @@ DECL_HANDLER(get_message)
reply->wparam = 0;
reply->lparam = 0;
get_message_defaults( queue, &reply->x, &reply->y, &reply->time );
@@ -218,7 +218,7 @@ index fcc946ff0cb..348fdac3214 100644
}
/* now check for timer */
@@ -2780,13 +2794,30 @@ DECL_HANDLER(get_message)
@@ -2794,13 +2808,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 );
@@ -250,7 +250,7 @@ index fcc946ff0cb..348fdac3214 100644
}
@@ -2804,7 +2835,10 @@ DECL_HANDLER(reply_message)
@@ -2818,7 +2849,10 @@ DECL_HANDLER(reply_message)
DECL_HANDLER(accept_hardware_message)
{
if (current->queue)
@@ -262,5 +262,5 @@ index fcc946ff0cb..348fdac3214 100644
set_error( STATUS_ACCESS_DENIED );
}
--
2.40.1
2.43.0

View File

@@ -0,0 +1,131 @@
From 49f12af6d899f3a44f0619c059c59bf8b57be59f Mon Sep 17 00:00:00 2001
From: Fabian Maurer <dark.shadow4@web.de>
Date: Wed, 8 Nov 2023 22:01:59 +0100
Subject: [PATCH] setupapi: Add stub for DriverStoreFindDriverPackageW
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45455
---
dlls/setupapi/query.c | 10 ++++++
dlls/setupapi/setupapi.spec | 1 +
dlls/setupapi/tests/query.c | 67 +++++++++++++++++++++++++++++++++++++
3 files changed, 78 insertions(+)
diff --git a/dlls/setupapi/query.c b/dlls/setupapi/query.c
index 88efea17473..24f0537fe9c 100644
--- a/dlls/setupapi/query.c
+++ b/dlls/setupapi/query.c
@@ -732,6 +732,16 @@ BOOL WINAPI SetupGetInfDriverStoreLocationW(
return FALSE;
}
+HRESULT WINAPI DriverStoreFindDriverPackageW(const WCHAR *path_in, void *unk2, void *unk3, DWORD flags, void *unk5, WCHAR *path_out, DWORD *path_size)
+{
+ FIXME("%s, %p, %p, %lu, %p, %p, %p, %lu stub!\n", debugstr_w(path_in), unk2, unk3, flags, unk5, path_out, path_size, path_size ? *path_size : 0);
+ if (!path_in || !path_out || !path_size || *path_size < MAX_PATH)
+ return E_INVALIDARG;
+
+ wcscpy(path_out, path_in);
+ return S_OK;
+}
+
BOOL WINAPI SetupQueryInfVersionInformationA(SP_INF_INFORMATION *info, UINT index, const char *key, char *buff,
DWORD size, DWORD *req_size)
{
diff --git a/dlls/setupapi/setupapi.spec b/dlls/setupapi/setupapi.spec
index 74f430a415f..6a392f687f8 100644
--- a/dlls/setupapi/setupapi.spec
+++ b/dlls/setupapi/setupapi.spec
@@ -208,6 +208,7 @@
@ stub DelimStringToMultiSz
@ stub DestroyTextFileReadBuffer
@ stdcall DoesUserHavePrivilege(wstr)
+@ stdcall DriverStoreFindDriverPackageW(ptr ptr ptr long ptr ptr ptr)
@ stdcall DuplicateString(wstr)
@ stdcall EnablePrivilege(wstr long)
@ stub ExtensionPropSheetPageProc
diff --git a/dlls/setupapi/tests/query.c b/dlls/setupapi/tests/query.c
index f7aeba41153..864c8d6939b 100644
--- a/dlls/setupapi/tests/query.c
+++ b/dlls/setupapi/tests/query.c
@@ -513,6 +513,72 @@ static void test_SetupGetTargetPath(void)
DeleteFileA(inf_filename);
}
+static void test_DriverStoreFindDriverPackageW(void)
+{
+ HMODULE library;
+ HRESULT result;
+ WCHAR buffer[500];
+ DWORD len;
+ HRESULT (WINAPI *pDriverStoreFindDriverPackageW)(const WCHAR*, void*, void*, DWORD, void*, WCHAR*, DWORD*);
+
+ library = LoadLibraryA("setupapi.dll");
+ ok(library != NULL, "Failed to load setupapi.dll\n");
+ if (!library) return;
+
+ pDriverStoreFindDriverPackageW = (void *)GetProcAddress(library, "DriverStoreFindDriverPackageW");
+ if (!pDriverStoreFindDriverPackageW)
+ {
+ win_skip("Can't find DriverStoreFindDriverPackageW\n");
+ return;
+ }
+
+ len = ARRAY_SIZE(buffer);
+
+ /* No invalid parameters, with flags */
+ result = pDriverStoreFindDriverPackageW(L"c:\\nonexistent.inf", 0, 0, 9, 0, buffer, &len);
+ todo_wine
+ ok(result == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "Got %lx\n", result);
+
+ /* No invalid parameters, no flags */
+ result = pDriverStoreFindDriverPackageW(L"c:\\nonexistent.inf", 0, 0, 0, 0, buffer, &len);
+ if (sizeof(void *) == 4)
+ todo_wine
+ ok(result == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "Got %lx\n", result);
+ else
+ todo_wine
+ ok(result == E_INVALIDARG, "Got %lx\n", result); /* Win64 needs flags 0x9, or it gives invalid parameter */
+
+ /* Invalid parameter tests */
+
+ result = pDriverStoreFindDriverPackageW(L"c:\\nonexistent.inf", 0, 0, 9, 0, 0, &len);
+ ok(result == E_INVALIDARG, "Got %lx\n", result);
+
+ result = pDriverStoreFindDriverPackageW(0, 0, 0, 9, 0, buffer, &len);
+ ok(result == E_INVALIDARG, "Got %lx\n", result);
+
+ result = pDriverStoreFindDriverPackageW(L"", 0, 0, 9, 0, buffer, &len);
+ todo_wine
+ ok(result == HRESULT_FROM_WIN32(ERROR_INVALID_NAME) /* win7 */ || result == E_INVALIDARG /* win10 */, "Got %lx\n", result);
+
+ result = pDriverStoreFindDriverPackageW(L"c:\\nonexistent.inf", 0, 0, 9, 0, buffer, 0);
+ ok(result == E_INVALIDARG, "Got %lx\n", result);
+
+ /* Tests with different length parameter */
+
+ len = 0;
+ result = pDriverStoreFindDriverPackageW(L"c:\\nonexistent.inf", 0, 0, 9, 0, buffer, &len);
+ ok(result == E_INVALIDARG, "Got %lx\n", result);
+
+ len = 259;
+ result = pDriverStoreFindDriverPackageW(L"c:\\nonexistent.inf", 0, 0, 9, 0, buffer, &len);
+ ok(result == E_INVALIDARG, "Got %lx\n", result);
+
+ len = 260;
+ result = pDriverStoreFindDriverPackageW(L"c:\\nonexistent.inf", 0, 0, 9, 0, buffer, &len);
+ todo_wine
+ ok(result == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "Got %lx\n", result);
+}
+
START_TEST(query)
{
get_directories();
@@ -521,4 +587,5 @@ START_TEST(query)
test_SetupGetSourceFileLocation();
test_SetupGetSourceInfo();
test_SetupGetTargetPath();
+ test_DriverStoreFindDriverPackageW();
}
--
2.43.0

View File

@@ -0,0 +1,3 @@
Fixes: [45455] setupapi: Add stub for DriverStoreFindDriverPackageW
# https://gitlab.winehq.org/wine/wine/-/merge_requests/4343

View File

@@ -1,4 +1,4 @@
From d28e399844f151103e79af3a30112a4daf130649 Mon Sep 17 00:00:00 2001
From adfeedd876396c6bb597e9591c9d0e33d9098aee Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Fri, 8 Dec 2023 13:21:19 +1100
Subject: [PATCH] Updated vkd3d to 45679a966c73669bdb7fa371569dcc34a448d8d4.

View File

@@ -0,0 +1,332 @@
From d4515b0522bca59c215a0d9171ec82cfb9105aae Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Wed, 3 Jan 2024 19:06:40 +1100
Subject: [PATCH] Updated vkd3d to 78343dcf87d3a911264c6c9a87a9146c43c859c3.
---
libs/vkd3d/include/vkd3d_shader.h | 2 +
libs/vkd3d/libs/vkd3d-shader/spirv.c | 87 +++++++++++++------
.../libs/vkd3d-shader/vkd3d_shader_private.h | 7 ++
libs/vkd3d/libs/vkd3d/state.c | 11 +++
4 files changed, 81 insertions(+), 26 deletions(-)
diff --git a/libs/vkd3d/include/vkd3d_shader.h b/libs/vkd3d/include/vkd3d_shader.h
index a6bf8964183..b1a1fff6451 100644
--- a/libs/vkd3d/include/vkd3d_shader.h
+++ b/libs/vkd3d/include/vkd3d_shader.h
@@ -1569,6 +1569,8 @@ enum vkd3d_shader_component_type
VKD3D_SHADER_COMPONENT_BOOL = 0x4,
/** 64-bit IEEE floating-point. */
VKD3D_SHADER_COMPONENT_DOUBLE = 0x5,
+ /** 64-bit unsigned integer. \since 1.11 */
+ VKD3D_SHADER_COMPONENT_UINT64 = 0x6,
VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_COMPONENT_TYPE),
};
diff --git a/libs/vkd3d/libs/vkd3d-shader/spirv.c b/libs/vkd3d/libs/vkd3d-shader/spirv.c
index f77bc25329d..9e3cd7549ba 100644
--- a/libs/vkd3d/libs/vkd3d-shader/spirv.c
+++ b/libs/vkd3d/libs/vkd3d-shader/spirv.c
@@ -1797,6 +1797,8 @@ static uint32_t vkd3d_spirv_get_type_id(struct vkd3d_spirv_builder *builder,
break;
case VKD3D_SHADER_COMPONENT_DOUBLE:
return vkd3d_spirv_get_op_type_float(builder, 64);
+ case VKD3D_SHADER_COMPONENT_UINT64:
+ return vkd3d_spirv_get_op_type_int(builder, 64, 0);
default:
FIXME("Unhandled component type %#x.\n", component_type);
return 0;
@@ -1830,6 +1832,8 @@ static uint32_t vkd3d_spirv_get_type_id_for_data_type(struct vkd3d_spirv_builder
break;
case VKD3D_DATA_DOUBLE:
return vkd3d_spirv_get_op_type_float(builder, 64);
+ case VKD3D_DATA_UINT64:
+ return vkd3d_spirv_get_op_type_int(builder, 64, 0);
case VKD3D_DATA_BOOL:
return vkd3d_spirv_get_op_type_bool(builder);
default:
@@ -2988,7 +2992,7 @@ static uint32_t spirv_compiler_get_constant64(struct spirv_compiler *compiler,
assert(0 < component_count && component_count <= VKD3D_DVEC2_SIZE);
type_id = vkd3d_spirv_get_type_id(builder, component_type, component_count);
- if (component_type != VKD3D_SHADER_COMPONENT_DOUBLE)
+ if (component_type != VKD3D_SHADER_COMPONENT_DOUBLE && component_type != VKD3D_SHADER_COMPONENT_UINT64)
{
FIXME("Unhandled component_type %#x.\n", component_type);
return vkd3d_spirv_get_op_undef(builder, type_id);
@@ -3048,6 +3052,13 @@ static uint32_t spirv_compiler_get_constant_double_vector(struct spirv_compiler
component_count, (const uint64_t *)values);
}
+static uint32_t spirv_compiler_get_constant_uint64_vector(struct spirv_compiler *compiler,
+ uint64_t value, unsigned int component_count)
+{
+ const uint64_t values[] = {value, value};
+ return spirv_compiler_get_constant64(compiler, VKD3D_SHADER_COMPONENT_UINT64, component_count, values);
+}
+
static uint32_t spirv_compiler_get_type_id_for_reg(struct spirv_compiler *compiler,
const struct vkd3d_shader_register *reg, uint32_t write_mask)
{
@@ -3932,7 +3943,7 @@ static uint32_t spirv_compiler_emit_load_reg(struct spirv_compiler *compiler,
assert(reg_info.component_type != VKD3D_SHADER_COMPONENT_DOUBLE);
spirv_compiler_emit_dereference_register(compiler, reg, &reg_info);
- write_mask32 = (reg->data_type == VKD3D_DATA_DOUBLE) ? vsir_write_mask_32_from_64(write_mask) : write_mask;
+ write_mask32 = data_type_is_64_bit(reg->data_type) ? vsir_write_mask_32_from_64(write_mask) : write_mask;
/* Intermediate value (no storage class). */
if (reg_info.storage_class == SpvStorageClassMax)
@@ -4000,7 +4011,7 @@ static uint32_t spirv_compiler_emit_neg(struct spirv_compiler *compiler,
type_id = spirv_compiler_get_type_id_for_reg(compiler, reg, write_mask);
if (reg->data_type == VKD3D_DATA_FLOAT || reg->data_type == VKD3D_DATA_DOUBLE)
return vkd3d_spirv_build_op_fnegate(builder, type_id, val_id);
- else if (reg->data_type == VKD3D_DATA_INT || reg->data_type == VKD3D_DATA_UINT)
+ else if (data_type_is_integer(reg->data_type))
return vkd3d_spirv_build_op_snegate(builder, type_id, val_id);
FIXME("Unhandled data type %#x.\n", reg->data_type);
@@ -4148,7 +4159,7 @@ static void spirv_compiler_emit_store_reg(struct spirv_compiler *compiler,
component_type = vkd3d_component_type_from_data_type(reg->data_type);
if (component_type != reg_info.component_type)
{
- if (reg->data_type == VKD3D_DATA_DOUBLE)
+ if (data_type_is_64_bit(reg->data_type))
src_write_mask = vsir_write_mask_32_from_64(write_mask);
type_id = vkd3d_spirv_get_type_id(builder, reg_info.component_type,
vsir_write_mask_component_count(src_write_mask));
@@ -4287,14 +4298,18 @@ static void spirv_compiler_decorate_builtin(struct spirv_compiler *compiler,
}
static void spirv_compiler_emit_interpolation_decorations(struct spirv_compiler *compiler,
- uint32_t id, enum vkd3d_shader_interpolation_mode mode)
+ enum vkd3d_shader_component_type component_type, uint32_t id, enum vkd3d_shader_interpolation_mode mode)
{
struct vkd3d_spirv_builder *builder = &compiler->spirv_builder;
switch (mode)
{
case VKD3DSIM_NONE:
- break;
+ /* VUID-StandaloneSpirv-Flat-04744: integer or double types must be
+ * decorated 'Flat' for fragment shaders. */
+ if (compiler->shader_type != VKD3D_SHADER_TYPE_PIXEL || component_type == VKD3D_SHADER_COMPONENT_FLOAT)
+ break;
+ /* fall through */
case VKD3DSIM_CONSTANT:
vkd3d_spirv_build_op_decorate(builder, id, SpvDecorationFlat, NULL, 0);
break;
@@ -4322,7 +4337,8 @@ static void spirv_compiler_emit_interpolation_decorations(struct spirv_compiler
}
static uint32_t spirv_compiler_emit_int_to_bool(struct spirv_compiler *compiler,
- enum vkd3d_shader_conditional_op condition, unsigned int component_count, uint32_t val_id)
+ enum vkd3d_shader_conditional_op condition, enum vkd3d_data_type data_type,
+ unsigned int component_count, uint32_t val_id)
{
struct vkd3d_spirv_builder *builder = &compiler->spirv_builder;
uint32_t type_id;
@@ -4333,7 +4349,9 @@ static uint32_t spirv_compiler_emit_int_to_bool(struct spirv_compiler *compiler,
type_id = vkd3d_spirv_get_type_id(builder, VKD3D_SHADER_COMPONENT_BOOL, component_count);
op = condition & VKD3D_SHADER_CONDITIONAL_OP_Z ? SpvOpIEqual : SpvOpINotEqual;
return vkd3d_spirv_build_op_tr2(builder, &builder->function_stream, op, type_id, val_id,
- spirv_compiler_get_constant_uint_vector(compiler, 0, component_count));
+ data_type == VKD3D_DATA_UINT64
+ ? spirv_compiler_get_constant_uint64_vector(compiler, 0, component_count)
+ : spirv_compiler_get_constant_uint_vector(compiler, 0, component_count));
}
static uint32_t spirv_compiler_emit_bool_to_int(struct spirv_compiler *compiler,
@@ -4348,6 +4366,19 @@ static uint32_t spirv_compiler_emit_bool_to_int(struct spirv_compiler *compiler,
return vkd3d_spirv_build_op_select(builder, type_id, val_id, true_id, false_id);
}
+static uint32_t spirv_compiler_emit_bool_to_int64(struct spirv_compiler *compiler,
+ unsigned int component_count, uint32_t val_id, bool signedness)
+{
+ struct vkd3d_spirv_builder *builder = &compiler->spirv_builder;
+ uint32_t type_id, true_id, false_id;
+
+ true_id = spirv_compiler_get_constant_uint64_vector(compiler, signedness ? UINT64_MAX : 1,
+ component_count);
+ false_id = spirv_compiler_get_constant_uint64_vector(compiler, 0, component_count);
+ type_id = vkd3d_spirv_get_type_id(builder, VKD3D_SHADER_COMPONENT_UINT64, component_count);
+ return vkd3d_spirv_build_op_select(builder, type_id, val_id, true_id, false_id);
+}
+
static uint32_t spirv_compiler_emit_bool_to_float(struct spirv_compiler *compiler,
unsigned int component_count, uint32_t val_id, bool signedness)
{
@@ -4874,7 +4905,8 @@ static uint32_t spirv_compiler_emit_input(struct spirv_compiler *compiler,
if (component_idx)
vkd3d_spirv_build_op_decorate1(builder, input_id, SpvDecorationComponent, component_idx);
- spirv_compiler_emit_interpolation_decorations(compiler, input_id, signature_element->interpolation_mode);
+ spirv_compiler_emit_interpolation_decorations(compiler, component_type, input_id,
+ signature_element->interpolation_mode);
}
var_id = input_id;
@@ -6670,12 +6702,14 @@ static SpvOp spirv_compiler_map_alu_instruction(const struct vkd3d_shader_instru
{VKD3DSIH_ISHR, SpvOpShiftRightArithmetic},
{VKD3DSIH_ITOD, SpvOpConvertSToF},
{VKD3DSIH_ITOF, SpvOpConvertSToF},
+ {VKD3DSIH_ITOI, SpvOpSConvert},
{VKD3DSIH_MUL, SpvOpFMul},
{VKD3DSIH_NOT, SpvOpNot},
{VKD3DSIH_OR, SpvOpBitwiseOr},
{VKD3DSIH_USHR, SpvOpShiftRightLogical},
{VKD3DSIH_UTOD, SpvOpConvertUToF},
{VKD3DSIH_UTOF, SpvOpConvertUToF},
+ {VKD3DSIH_UTOU, SpvOpUConvert},
{VKD3DSIH_XOR, SpvOpBitwiseXor},
};
unsigned int i;
@@ -6727,6 +6761,10 @@ static void spirv_compiler_emit_bool_cast(struct spirv_compiler *compiler,
{
val_id = spirv_compiler_emit_bool_to_int(compiler, 1, val_id, instruction->handler_idx == VKD3DSIH_ITOI);
}
+ else if (dst->reg.data_type == VKD3D_DATA_UINT64)
+ {
+ val_id = spirv_compiler_emit_bool_to_int64(compiler, 1, val_id, instruction->handler_idx == VKD3DSIH_ITOI);
+ }
else
{
WARN("Unhandled data type %u.\n", dst->reg.data_type);
@@ -6980,7 +7018,7 @@ static void spirv_compiler_emit_movc(struct spirv_compiler *compiler,
if (src[0].reg.data_type != VKD3D_DATA_BOOL)
condition_id = spirv_compiler_emit_int_to_bool(compiler,
- VKD3D_SHADER_CONDITIONAL_OP_NZ, component_count, condition_id);
+ VKD3D_SHADER_CONDITIONAL_OP_NZ, src[0].reg.data_type, component_count, condition_id);
val_id = vkd3d_spirv_build_op_select(builder, type_id, condition_id, src1_id, src2_id);
spirv_compiler_emit_store_dst(compiler, dst, val_id);
@@ -7005,7 +7043,7 @@ static void spirv_compiler_emit_swapc(struct spirv_compiler *compiler,
type_id = vkd3d_spirv_get_type_id(builder, VKD3D_SHADER_COMPONENT_FLOAT, component_count);
condition_id = spirv_compiler_emit_int_to_bool(compiler,
- VKD3D_SHADER_CONDITIONAL_OP_NZ, component_count, condition_id);
+ VKD3D_SHADER_CONDITIONAL_OP_NZ, src[0].reg.data_type, component_count, condition_id);
val_id = vkd3d_spirv_build_op_select(builder, type_id, condition_id, src2_id, src1_id);
spirv_compiler_emit_store_dst(compiler, &dst[0], val_id);
@@ -7167,13 +7205,6 @@ static void spirv_compiler_emit_int_div(struct spirv_compiler *compiler,
div_op = instruction->handler_idx == VKD3DSIH_IDIV ? SpvOpSDiv : SpvOpUDiv;
mod_op = instruction->handler_idx == VKD3DSIH_IDIV ? SpvOpSRem : SpvOpUMod;
- if (dst[0].reg.data_type == VKD3D_DATA_UINT64 || dst[1].reg.data_type == VKD3D_DATA_UINT64)
- {
- FIXME("Unsupported 64-bit result.\n");
- spirv_compiler_error(compiler, VKD3D_SHADER_ERROR_SPV_UNSUPPORTED_FEATURE,
- "Bool cast to 64-bit integer is not supported.");
- }
-
if (dst[0].reg.type != VKD3DSPR_NULL)
{
component_count = vsir_write_mask_component_count(dst[0].write_mask);
@@ -7183,9 +7214,11 @@ static void spirv_compiler_emit_int_div(struct spirv_compiler *compiler,
src1_id = spirv_compiler_emit_load_src(compiler, &src[1], dst[0].write_mask);
condition_id = spirv_compiler_emit_int_to_bool(compiler,
- VKD3D_SHADER_CONDITIONAL_OP_NZ, component_count, src1_id);
- uint_max_id = spirv_compiler_get_constant_uint_vector(compiler,
- 0xffffffff, component_count);
+ VKD3D_SHADER_CONDITIONAL_OP_NZ, src[1].reg.data_type, component_count, src1_id);
+ if (dst[0].reg.data_type == VKD3D_DATA_UINT64)
+ uint_max_id = spirv_compiler_get_constant_uint64_vector(compiler, UINT64_MAX, component_count);
+ else
+ uint_max_id = spirv_compiler_get_constant_uint_vector(compiler, 0xffffffff, component_count);
val_id = vkd3d_spirv_build_op_tr2(builder, &builder->function_stream, div_op, type_id, src0_id, src1_id);
/* The SPIR-V spec says: "The resulting value is undefined if Operand 2 is 0." */
@@ -7205,9 +7238,11 @@ static void spirv_compiler_emit_int_div(struct spirv_compiler *compiler,
src1_id = spirv_compiler_emit_load_src(compiler, &src[1], dst[1].write_mask);
condition_id = spirv_compiler_emit_int_to_bool(compiler,
- VKD3D_SHADER_CONDITIONAL_OP_NZ, component_count, src1_id);
- uint_max_id = spirv_compiler_get_constant_uint_vector(compiler,
- 0xffffffff, component_count);
+ VKD3D_SHADER_CONDITIONAL_OP_NZ, src[1].reg.data_type, component_count, src1_id);
+ if (dst[1].reg.data_type == VKD3D_DATA_UINT64)
+ uint_max_id = spirv_compiler_get_constant_uint64_vector(compiler, UINT64_MAX, component_count);
+ else
+ uint_max_id = spirv_compiler_get_constant_uint_vector(compiler, 0xffffffff, component_count);
}
val_id = vkd3d_spirv_build_op_tr2(builder, &builder->function_stream, mod_op, type_id, src0_id, src1_id);
@@ -7498,7 +7533,7 @@ static uint32_t spirv_compiler_emit_conditional_branch(struct spirv_compiler *co
uint32_t condition_id, merge_block_id;
condition_id = spirv_compiler_emit_load_src(compiler, src, VKD3DSP_WRITEMASK_0);
- condition_id = spirv_compiler_emit_int_to_bool(compiler, instruction->flags, 1, condition_id);
+ condition_id = spirv_compiler_emit_int_to_bool(compiler, instruction->flags, src->reg.data_type, 1, condition_id);
merge_block_id = vkd3d_spirv_alloc_id(builder);
@@ -7631,7 +7666,7 @@ static int spirv_compiler_emit_control_flow_instruction(struct spirv_compiler *c
return VKD3D_ERROR_OUT_OF_MEMORY;
val_id = spirv_compiler_emit_load_src(compiler, src, VKD3DSP_WRITEMASK_0);
- condition_id = spirv_compiler_emit_int_to_bool(compiler, instruction->flags, 1, val_id);
+ condition_id = spirv_compiler_emit_int_to_bool(compiler, instruction->flags, src->reg.data_type, 1, val_id);
true_label = vkd3d_spirv_alloc_id(builder);
merge_block_id = vkd3d_spirv_alloc_id(builder);
diff --git a/libs/vkd3d/libs/vkd3d-shader/vkd3d_shader_private.h b/libs/vkd3d/libs/vkd3d-shader/vkd3d_shader_private.h
index 274faf296e8..ce7d74a72dc 100644
--- a/libs/vkd3d/libs/vkd3d-shader/vkd3d_shader_private.h
+++ b/libs/vkd3d/libs/vkd3d-shader/vkd3d_shader_private.h
@@ -620,6 +620,11 @@ static inline bool data_type_is_bool(enum vkd3d_data_type data_type)
return data_type == VKD3D_DATA_BOOL;
}
+static inline bool data_type_is_64_bit(enum vkd3d_data_type data_type)
+{
+ return data_type == VKD3D_DATA_DOUBLE || data_type == VKD3D_DATA_UINT64;
+}
+
enum vsir_dimension
{
VSIR_DIMENSION_NONE,
@@ -1455,6 +1460,8 @@ static inline enum vkd3d_shader_component_type vkd3d_component_type_from_data_ty
return VKD3D_SHADER_COMPONENT_INT;
case VKD3D_DATA_DOUBLE:
return VKD3D_SHADER_COMPONENT_DOUBLE;
+ case VKD3D_DATA_UINT64:
+ return VKD3D_SHADER_COMPONENT_UINT64;
case VKD3D_DATA_BOOL:
return VKD3D_SHADER_COMPONENT_BOOL;
default:
diff --git a/libs/vkd3d/libs/vkd3d/state.c b/libs/vkd3d/libs/vkd3d/state.c
index 626d6d62b3c..1457ddf9c7f 100644
--- a/libs/vkd3d/libs/vkd3d/state.c
+++ b/libs/vkd3d/libs/vkd3d/state.c
@@ -2129,6 +2129,16 @@ static inline unsigned int typed_uav_compile_option(const struct d3d12_device *d
: VKD3D_SHADER_COMPILE_OPTION_TYPED_UAV_READ_FORMAT_R32;
}
+static unsigned int feature_flags_compile_option(const struct d3d12_device *device)
+{
+ unsigned int flags = 0;
+
+ if (device->feature_options1.Int64ShaderOps)
+ flags |= VKD3D_SHADER_COMPILE_OPTION_FEATURE_INT64;
+
+ return flags;
+}
+
static HRESULT create_shader_stage(struct d3d12_device *device,
struct VkPipelineShaderStageCreateInfo *stage_desc, enum VkShaderStageFlagBits stage,
const D3D12_SHADER_BYTECODE *code, const struct vkd3d_shader_interface_info *shader_interface)
@@ -2145,6 +2155,7 @@ static HRESULT create_shader_stage(struct d3d12_device *device,
{VKD3D_SHADER_COMPILE_OPTION_API_VERSION, VKD3D_SHADER_API_VERSION_1_10},
{VKD3D_SHADER_COMPILE_OPTION_TYPED_UAV, typed_uav_compile_option(device)},
{VKD3D_SHADER_COMPILE_OPTION_WRITE_TESS_GEOM_POINT_SIZE, 0},
+ {VKD3D_SHADER_COMPILE_OPTION_FEATURE, feature_flags_compile_option(device)},
};
stage_desc->sType = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO;
--
2.43.0

View File

@@ -0,0 +1,32 @@
From 0c8d2be596270def5721fe0ae2d11732e63f6b3b Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Thu, 4 Jan 2024 12:27:13 +1100
Subject: [PATCH] include: Add more D3D_FEATURE_LEVEL_ defines
---
include/d3dcommon.idl | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/d3dcommon.idl b/include/d3dcommon.idl
index 7a53a84079d..5ffb4cd5b5b 100644
--- a/include/d3dcommon.idl
+++ b/include/d3dcommon.idl
@@ -100,6 +100,7 @@ typedef enum D3D_DRIVER_TYPE
typedef enum D3D_FEATURE_LEVEL
{
+ D3D_FEATURE_LEVEL_1_0_CORE = 0x1000,
D3D_FEATURE_LEVEL_9_1 = 0x9100,
D3D_FEATURE_LEVEL_9_2 = 0x9200,
D3D_FEATURE_LEVEL_9_3 = 0x9300,
@@ -109,6 +110,7 @@ typedef enum D3D_FEATURE_LEVEL
D3D_FEATURE_LEVEL_11_1 = 0xb100,
D3D_FEATURE_LEVEL_12_0 = 0xc000,
D3D_FEATURE_LEVEL_12_1 = 0xc100,
+ D3D_FEATURE_LEVEL_12_2 = 0xc200,
} D3D_FEATURE_LEVEL;
cpp_quote("#define D3D_FL9_1_REQ_TEXTURE1D_U_DIMENSION 2048")
--
2.43.0

View File

@@ -0,0 +1,433 @@
From a725516a5c0da2fe2a145f231a99359ecf942627 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Fri, 5 Jan 2024 11:03:00 +1100
Subject: [PATCH] Updated vkd3d to 50cebc72780dada0822a1d081f3247f7d1dbc728.
---
libs/vkd3d/libs/vkd3d-shader/d3dbc.c | 24 +++-
libs/vkd3d/libs/vkd3d-shader/dxil.c | 1 +
libs/vkd3d/libs/vkd3d-shader/ir.c | 136 ++++++++++++++----
libs/vkd3d/libs/vkd3d-shader/spirv.c | 9 +-
libs/vkd3d/libs/vkd3d-shader/tpf.c | 2 +-
.../libs/vkd3d-shader/vkd3d_shader_private.h | 11 +-
libs/vkd3d/libs/vkd3d/utils.c | 12 +-
7 files changed, 149 insertions(+), 46 deletions(-)
diff --git a/libs/vkd3d/libs/vkd3d-shader/d3dbc.c b/libs/vkd3d/libs/vkd3d-shader/d3dbc.c
index ca6e3b72de9..8fec1e6371a 100644
--- a/libs/vkd3d/libs/vkd3d-shader/d3dbc.c
+++ b/libs/vkd3d/libs/vkd3d-shader/d3dbc.c
@@ -482,9 +482,23 @@ static void shader_sm1_parse_dst_param(uint32_t param, const struct vkd3d_shader
dst->reg.dimension = VSIR_DIMENSION_SCALAR;
else
dst->reg.dimension = VSIR_DIMENSION_VEC4;
- dst->write_mask = (param & VKD3D_SM1_WRITEMASK_MASK) >> VKD3D_SM1_WRITEMASK_SHIFT;
dst->modifiers = (param & VKD3D_SM1_DST_MODIFIER_MASK) >> VKD3D_SM1_DST_MODIFIER_SHIFT;
dst->shift = (param & VKD3D_SM1_DSTSHIFT_MASK) >> VKD3D_SM1_DSTSHIFT_SHIFT;
+
+ switch (dst->reg.dimension)
+ {
+ case VSIR_DIMENSION_SCALAR:
+ dst->write_mask = VKD3DSP_WRITEMASK_0;
+ break;
+
+ case VSIR_DIMENSION_VEC4:
+ dst->write_mask = (param & VKD3D_SM1_WRITEMASK_MASK) >> VKD3D_SM1_WRITEMASK_SHIFT;
+ break;
+
+ default:
+ dst->write_mask = 0;
+ break;
+ }
}
static struct signature_element *find_signature_element(const struct shader_signature *signature,
@@ -518,8 +532,6 @@ static struct signature_element *find_signature_element_by_register_index(
return NULL;
}
-#define SM1_COLOR_REGISTER_OFFSET 8
-
static bool add_signature_element(struct vkd3d_shader_sm1_parser *sm1, bool output,
const char *name, unsigned int index, enum vkd3d_shader_sysval_semantic sysval,
unsigned int register_index, bool is_dcl, unsigned int mask)
@@ -647,15 +659,15 @@ static bool add_signature_element_from_register(struct vkd3d_shader_sm1_parser *
{
case 0:
return add_signature_element(sm1, true, "POSITION", 0,
- VKD3D_SHADER_SV_POSITION, register_index, is_dcl, mask);
+ VKD3D_SHADER_SV_POSITION, SM1_RASTOUT_REGISTER_OFFSET + register_index, is_dcl, mask);
case 1:
return add_signature_element(sm1, true, "FOG", 0,
- VKD3D_SHADER_SV_NONE, register_index, is_dcl, 0x1);
+ VKD3D_SHADER_SV_NONE, SM1_RASTOUT_REGISTER_OFFSET + register_index, is_dcl, 0x1);
case 2:
return add_signature_element(sm1, true, "PSIZE", 0,
- VKD3D_SHADER_SV_NONE, register_index, is_dcl, 0x1);
+ VKD3D_SHADER_SV_NONE, SM1_RASTOUT_REGISTER_OFFSET + register_index, is_dcl, 0x1);
default:
vkd3d_shader_parser_error(&sm1->p, VKD3D_SHADER_ERROR_D3DBC_INVALID_REGISTER_INDEX,
diff --git a/libs/vkd3d/libs/vkd3d-shader/dxil.c b/libs/vkd3d/libs/vkd3d-shader/dxil.c
index 2424b176068..c744dfcedf0 100644
--- a/libs/vkd3d/libs/vkd3d-shader/dxil.c
+++ b/libs/vkd3d/libs/vkd3d-shader/dxil.c
@@ -3432,6 +3432,7 @@ static void sm6_parser_emit_dx_create_handle(struct sm6_parser *sm6, struct sm6_
/* Set idx_count to 3 for use with load instructions.
* TODO: set register type from resource type when other types are supported. */
vsir_register_init(reg, VKD3DSPR_CONSTBUFFER, VKD3D_DATA_FLOAT, 3);
+ reg->dimension = VSIR_DIMENSION_VEC4;
reg->idx[0].offset = id;
register_index_address_init(&reg->idx[1], operands[2], sm6);
reg->non_uniform = !!sm6_value_get_constant_uint(operands[3]);
diff --git a/libs/vkd3d/libs/vkd3d-shader/ir.c b/libs/vkd3d/libs/vkd3d-shader/ir.c
index d38b3c39712..bac4269198b 100644
--- a/libs/vkd3d/libs/vkd3d-shader/ir.c
+++ b/libs/vkd3d/libs/vkd3d-shader/ir.c
@@ -533,6 +533,7 @@ struct io_normaliser
{
struct vkd3d_shader_instruction_array instructions;
enum vkd3d_shader_type shader_type;
+ uint8_t major;
struct shader_signature *input_signature;
struct shader_signature *output_signature;
struct shader_signature *patch_constant_signature;
@@ -867,34 +868,65 @@ static bool shader_dst_param_io_normalise(struct vkd3d_shader_dst_param *dst_par
const struct shader_signature *signature;
const struct signature_element *e;
- if ((reg->type == VKD3DSPR_OUTPUT && io_normaliser_is_in_fork_or_join_phase(normaliser))
- || reg->type == VKD3DSPR_PATCHCONST)
- {
- signature = normaliser->patch_constant_signature;
- /* Convert patch constant outputs to the patch constant register type to avoid the need
- * to convert compiler symbols when accessed as inputs in a later stage. */
- reg->type = VKD3DSPR_PATCHCONST;
- dcl_params = normaliser->pc_dcl_params;
- }
- else if (reg->type == VKD3DSPR_OUTPUT || dst_param->reg.type == VKD3DSPR_COLOROUT)
- {
- signature = normaliser->output_signature;
- reg->type = VKD3DSPR_OUTPUT;
- dcl_params = normaliser->output_dcl_params;
- }
- else if (dst_param->reg.type == VKD3DSPR_INCONTROLPOINT || dst_param->reg.type == VKD3DSPR_INPUT)
- {
- signature = normaliser->input_signature;
- reg->type = VKD3DSPR_INPUT;
- dcl_params = normaliser->input_dcl_params;
- }
- else
+ switch (reg->type)
{
- return true;
+ case VKD3DSPR_OUTPUT:
+ reg_idx = reg->idx[reg->idx_count - 1].offset;
+ if (io_normaliser_is_in_fork_or_join_phase(normaliser))
+ {
+ signature = normaliser->patch_constant_signature;
+ /* Convert patch constant outputs to the patch constant register type to avoid the need
+ * to convert compiler symbols when accessed as inputs in a later stage. */
+ reg->type = VKD3DSPR_PATCHCONST;
+ dcl_params = normaliser->pc_dcl_params;
+ }
+ else
+ {
+ signature = normaliser->output_signature;
+ dcl_params = normaliser->output_dcl_params;
+ }
+ break;
+
+ case VKD3DSPR_PATCHCONST:
+ reg_idx = reg->idx[reg->idx_count - 1].offset;
+ signature = normaliser->patch_constant_signature;
+ dcl_params = normaliser->pc_dcl_params;
+ break;
+
+ case VKD3DSPR_COLOROUT:
+ reg_idx = reg->idx[0].offset;
+ signature = normaliser->output_signature;
+ reg->type = VKD3DSPR_OUTPUT;
+ dcl_params = normaliser->output_dcl_params;
+ break;
+
+ case VKD3DSPR_INCONTROLPOINT:
+ case VKD3DSPR_INPUT:
+ reg_idx = reg->idx[reg->idx_count - 1].offset;
+ signature = normaliser->input_signature;
+ reg->type = VKD3DSPR_INPUT;
+ dcl_params = normaliser->input_dcl_params;
+ break;
+
+ case VKD3DSPR_ATTROUT:
+ reg_idx = SM1_COLOR_REGISTER_OFFSET + reg->idx[0].offset;
+ signature = normaliser->output_signature;
+ reg->type = VKD3DSPR_OUTPUT;
+ dcl_params = normaliser->output_dcl_params;
+ break;
+
+ case VKD3DSPR_RASTOUT:
+ reg_idx = SM1_RASTOUT_REGISTER_OFFSET + reg->idx[0].offset;
+ signature = normaliser->output_signature;
+ reg->type = VKD3DSPR_OUTPUT;
+ dcl_params = normaliser->output_dcl_params;
+ break;
+
+ default:
+ return true;
}
id_idx = reg->idx_count - 1;
- reg_idx = reg->idx[id_idx].offset;
write_mask = dst_param->write_mask;
element_idx = shader_signature_find_element_for_reg(signature, reg_idx, write_mask);
e = &signature->elements[element_idx];
@@ -982,26 +1014,42 @@ static void shader_src_param_io_normalise(struct vkd3d_shader_src_param *src_par
switch (reg->type)
{
case VKD3DSPR_PATCHCONST:
+ reg_idx = reg->idx[reg->idx_count - 1].offset;
signature = normaliser->patch_constant_signature;
break;
+
case VKD3DSPR_INCONTROLPOINT:
reg->type = VKD3DSPR_INPUT;
/* fall through */
case VKD3DSPR_INPUT:
+ if (normaliser->major < 3 && normaliser->shader_type == VKD3D_SHADER_TYPE_PIXEL)
+ reg_idx = SM1_COLOR_REGISTER_OFFSET + reg->idx[0].offset;
+ else
+ reg_idx = reg->idx[reg->idx_count - 1].offset;
signature = normaliser->input_signature;
break;
+
case VKD3DSPR_OUTCONTROLPOINT:
reg->type = VKD3DSPR_OUTPUT;
/* fall through */
case VKD3DSPR_OUTPUT:
+ reg_idx = reg->idx[reg->idx_count - 1].offset;
signature = normaliser->output_signature;
break;
+
+ case VKD3DSPR_TEXTURE:
+ if (normaliser->shader_type != VKD3D_SHADER_TYPE_PIXEL)
+ return;
+ reg->type = VKD3DSPR_INPUT;
+ reg_idx = reg->idx[0].offset;
+ signature = normaliser->input_signature;
+ break;
+
default:
return;
}
id_idx = reg->idx_count - 1;
- reg_idx = reg->idx[id_idx].offset;
write_mask = VKD3DSP_WRITEMASK_0 << vsir_swizzle_get_component(src_param->swizzle, 0);
element_idx = shader_signature_find_element_for_reg(signature, reg_idx, write_mask);
@@ -1084,6 +1132,7 @@ static enum vkd3d_result shader_normalise_io_registers(struct vkd3d_shader_parse
normaliser.phase = VKD3DSIH_INVALID;
normaliser.shader_type = parser->shader_version.type;
+ normaliser.major = parser->shader_version.major;
normaliser.input_signature = &parser->shader_desc.input_signature;
normaliser.output_signature = &parser->shader_desc.output_signature;
normaliser.patch_constant_signature = &parser->shader_desc.patch_constant_signature;
@@ -1555,6 +1604,19 @@ static void vsir_validate_register(struct validation_context *ctx,
reg->idx[0].offset, temp_count);
break;
+ case VKD3DSPR_SSA:
+ if (reg->idx_count != 1)
+ validator_error(ctx, VKD3D_SHADER_ERROR_VSIR_INVALID_INDEX_COUNT, "Invalid index count %u for a SSA register.",
+ reg->idx_count);
+
+ if (reg->idx_count >= 1 && reg->idx[0].rel_addr)
+ validator_error(ctx, VKD3D_SHADER_ERROR_VSIR_INVALID_INDEX, "Non-NULL relative address for a SSA register.");
+
+ if (reg->idx_count >= 1 && reg->idx[0].offset >= ctx->parser->shader_desc.ssa_count)
+ validator_error(ctx, VKD3D_SHADER_ERROR_VSIR_INVALID_INDEX, "SSA register index %u exceeds the maximum count %u.",
+ reg->idx[0].offset, ctx->parser->shader_desc.ssa_count);
+ break;
+
case VKD3DSPR_NULL:
if (reg->idx_count != 0)
validator_error(ctx, VKD3D_SHADER_ERROR_VSIR_INVALID_INDEX_COUNT, "Invalid index count %u for a NULL register.",
@@ -1587,6 +1649,26 @@ static void vsir_validate_dst_param(struct validation_context *ctx,
validator_error(ctx, VKD3D_SHADER_ERROR_VSIR_INVALID_WRITE_MASK, "Destination has invalid write mask %#x.",
dst->write_mask);
+ switch (dst->reg.dimension)
+ {
+ case VSIR_DIMENSION_SCALAR:
+ if (dst->write_mask != VKD3DSP_WRITEMASK_0)
+ validator_error(ctx, VKD3D_SHADER_ERROR_VSIR_INVALID_WRITE_MASK, "Scalar destination has invalid write mask %#x.",
+ dst->write_mask);
+ break;
+
+ case VSIR_DIMENSION_VEC4:
+ if (dst->write_mask == 0)
+ validator_error(ctx, VKD3D_SHADER_ERROR_VSIR_INVALID_WRITE_MASK, "Vec4 destination has empty write mask.");
+ break;
+
+ default:
+ if (dst->write_mask != 0)
+ validator_error(ctx, VKD3D_SHADER_ERROR_VSIR_INVALID_WRITE_MASK, "Destination of dimension %u has invalid write mask %#x.",
+ dst->reg.dimension, dst->write_mask);
+ break;
+ }
+
if (dst->modifiers & ~VKD3DSPDM_MASK)
validator_error(ctx, VKD3D_SHADER_ERROR_VSIR_INVALID_MODIFIERS, "Destination has invalid modifiers %#x.",
dst->modifiers);
@@ -1617,6 +1699,10 @@ static void vsir_validate_src_param(struct validation_context *ctx,
validator_error(ctx, VKD3D_SHADER_ERROR_VSIR_INVALID_SWIZZLE, "Source has invalid swizzle %#x.",
src->swizzle);
+ if (src->reg.dimension != VSIR_DIMENSION_VEC4 && src->swizzle != 0)
+ validator_error(ctx, VKD3D_SHADER_ERROR_VSIR_INVALID_SWIZZLE, "Source of dimension %u has invalid swizzle %#x.",
+ src->reg.dimension, src->swizzle);
+
if (src->modifiers >= VKD3DSPSM_COUNT)
validator_error(ctx, VKD3D_SHADER_ERROR_VSIR_INVALID_MODIFIERS, "Source has invalid modifiers %#x.",
src->modifiers);
diff --git a/libs/vkd3d/libs/vkd3d-shader/spirv.c b/libs/vkd3d/libs/vkd3d-shader/spirv.c
index 387784f2358..a5565d552c0 100644
--- a/libs/vkd3d/libs/vkd3d-shader/spirv.c
+++ b/libs/vkd3d/libs/vkd3d-shader/spirv.c
@@ -3600,8 +3600,7 @@ static uint32_t spirv_compiler_get_register_id(struct spirv_compiler *compiler,
SpvStorageClassPrivate, VKD3D_SHADER_COMPONENT_FLOAT, VKD3D_VEC4_SIZE);
}
-static bool vkd3d_swizzle_is_equal(unsigned int dst_write_mask,
- unsigned int swizzle, unsigned int write_mask)
+static bool vkd3d_swizzle_is_equal(uint32_t dst_write_mask, uint32_t swizzle, uint32_t write_mask)
{
return vkd3d_compact_swizzle(VKD3D_SHADER_NO_SWIZZLE, dst_write_mask) == vkd3d_compact_swizzle(swizzle, write_mask);
}
@@ -3913,7 +3912,7 @@ static uint32_t spirv_compiler_emit_load_ssa_reg(struct spirv_compiler *compiler
}
static uint32_t spirv_compiler_emit_load_reg(struct spirv_compiler *compiler,
- const struct vkd3d_shader_register *reg, DWORD swizzle, uint32_t write_mask)
+ const struct vkd3d_shader_register *reg, uint32_t swizzle, uint32_t write_mask)
{
struct vkd3d_spirv_builder *builder = &compiler->spirv_builder;
enum vkd3d_shader_component_type component_type;
@@ -4209,7 +4208,7 @@ static void spirv_compiler_emit_store_dst(struct spirv_compiler *compiler,
static void spirv_compiler_emit_store_dst_swizzled(struct spirv_compiler *compiler,
const struct vkd3d_shader_dst_param *dst, uint32_t val_id,
- enum vkd3d_shader_component_type component_type, DWORD swizzle)
+ enum vkd3d_shader_component_type component_type, uint32_t swizzle)
{
struct vkd3d_shader_dst_param typed_dst = *dst;
val_id = spirv_compiler_emit_swizzle(compiler,
@@ -9420,9 +9419,9 @@ static void spirv_compiler_emit_sync(struct spirv_compiler *compiler,
const struct vkd3d_shader_instruction *instruction)
{
unsigned int memory_semantics = SpvMemorySemanticsAcquireReleaseMask;
- unsigned int flags = instruction->flags;
SpvScope execution_scope = SpvScopeMax;
SpvScope memory_scope = SpvScopeDevice;
+ uint32_t flags = instruction->flags;
if (flags & VKD3DSSF_GROUP_SHARED_MEMORY)
{
diff --git a/libs/vkd3d/libs/vkd3d-shader/tpf.c b/libs/vkd3d/libs/vkd3d-shader/tpf.c
index f859e758d8e..2cc56663efe 100644
--- a/libs/vkd3d/libs/vkd3d-shader/tpf.c
+++ b/libs/vkd3d/libs/vkd3d-shader/tpf.c
@@ -5488,7 +5488,7 @@ static void write_sm4_loop(const struct tpf_writer *tpf, const struct hlsl_ir_lo
static void write_sm4_gather(const struct tpf_writer *tpf, const struct hlsl_ir_node *dst,
const struct hlsl_deref *resource, const struct hlsl_deref *sampler,
- const struct hlsl_ir_node *coords, DWORD swizzle, const struct hlsl_ir_node *texel_offset)
+ const struct hlsl_ir_node *coords, uint32_t swizzle, const struct hlsl_ir_node *texel_offset)
{
struct vkd3d_shader_src_param *src;
struct sm4_instruction instr;
diff --git a/libs/vkd3d/libs/vkd3d-shader/vkd3d_shader_private.h b/libs/vkd3d/libs/vkd3d-shader/vkd3d_shader_private.h
index 47b245bd7ee..224d27f4e1b 100644
--- a/libs/vkd3d/libs/vkd3d-shader/vkd3d_shader_private.h
+++ b/libs/vkd3d/libs/vkd3d-shader/vkd3d_shader_private.h
@@ -871,14 +871,14 @@ struct vkd3d_shader_dst_param
{
struct vkd3d_shader_register reg;
uint32_t write_mask;
- DWORD modifiers;
- DWORD shift;
+ uint32_t modifiers;
+ unsigned int shift;
};
struct vkd3d_shader_src_param
{
struct vkd3d_shader_register reg;
- DWORD swizzle;
+ uint32_t swizzle;
enum vkd3d_shader_src_modifier modifiers;
};
@@ -955,6 +955,9 @@ enum vkd3d_shader_input_sysval_semantic
VKD3D_SIV_LINE_DENSITY_TESS_FACTOR = 22,
};
+#define SM1_COLOR_REGISTER_OFFSET 8
+#define SM1_RASTOUT_REGISTER_OFFSET 10
+
#define SIGNATURE_TARGET_LOCATION_UNUSED (~0u)
struct signature_element
@@ -1120,7 +1123,7 @@ struct vkd3d_shader_instruction
{
struct vkd3d_shader_location location;
enum vkd3d_shader_opcode handler_idx;
- DWORD flags;
+ uint32_t flags;
unsigned int dst_count;
unsigned int src_count;
const struct vkd3d_shader_dst_param *dst;
diff --git a/libs/vkd3d/libs/vkd3d/utils.c b/libs/vkd3d/libs/vkd3d/utils.c
index 5ebe1b63e99..751971220e7 100644
--- a/libs/vkd3d/libs/vkd3d/utils.c
+++ b/libs/vkd3d/libs/vkd3d/utils.c
@@ -683,7 +683,7 @@ const char *debug_vk_extent_3d(VkExtent3D extent)
const char *debug_vk_queue_flags(VkQueueFlags flags)
{
- char buffer[120];
+ char buffer[159];
buffer[0] = '\0';
#define FLAG_TO_STR(f) if (flags & f) { strcat(buffer, " | "#f); flags &= ~f; }
@@ -691,6 +691,10 @@ const char *debug_vk_queue_flags(VkQueueFlags flags)
FLAG_TO_STR(VK_QUEUE_COMPUTE_BIT)
FLAG_TO_STR(VK_QUEUE_TRANSFER_BIT)
FLAG_TO_STR(VK_QUEUE_SPARSE_BINDING_BIT)
+ FLAG_TO_STR(VK_QUEUE_PROTECTED_BIT)
+#undef FLAG_TO_STR
+#define FLAG_TO_STR(f, n) if (flags & f) { strcat(buffer, " | "#n); flags &= ~f; }
+ FLAG_TO_STR(0x20, VK_QUEUE_VIDEO_DECODE_BIT_KHR)
#undef FLAG_TO_STR
if (flags)
FIXME("Unrecognized flag(s) %#x.\n", flags);
@@ -729,10 +733,8 @@ const char *debug_vk_memory_property_flags(VkMemoryPropertyFlags flags)
FLAG_TO_STR(VK_MEMORY_PROPERTY_HOST_CACHED_BIT)
FLAG_TO_STR(VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT)
FLAG_TO_STR(VK_MEMORY_PROPERTY_PROTECTED_BIT)
-#undef FLAG_TO_STR
-#define FLAG_TO_STR(f, n) if (flags & f) { strcat(buffer, " | "#n); flags &= ~f; }
- FLAG_TO_STR(0x40, VK_MEMORY_PROPERTY_DEVICE_COHERENT_BIT_AMD)
- FLAG_TO_STR(0x80, VK_MEMORY_PROPERTY_DEVICE_UNCACHED_BIT_AMD)
+ FLAG_TO_STR(VK_MEMORY_PROPERTY_DEVICE_COHERENT_BIT_AMD)
+ FLAG_TO_STR(VK_MEMORY_PROPERTY_DEVICE_UNCACHED_BIT_AMD)
#undef FLAG_TO_STR
if (flags)
FIXME("Unrecognized flag(s) %#x.\n", flags);
--
2.43.0

View File

@@ -1,4 +1,4 @@
From fc31e1c213619af67684a99aa1d3b4c27ee9617d Mon Sep 17 00:00:00 2001
From 94e6e18f72a5586fc8077dadc4ea50bd994e02a3 Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dmitry@baikal.ru>
Date: Tue, 26 Jan 2016 15:41:06 +0800
Subject: [PATCH] oleaut32: Add support for decoding SLTG function help
@@ -9,10 +9,10 @@ Subject: [PATCH] oleaut32: Add support for decoding SLTG function help
1 file changed, 14 insertions(+), 10 deletions(-)
diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c
index d5c8191abba..ebf186edc2a 100644
index 988e6c1b457..9c15254727d 100644
--- a/dlls/oleaut32/typelib.c
+++ b/dlls/oleaut32/typelib.c
@@ -4203,7 +4203,8 @@ static void SLTG_DoVars(char *pBlk, char *pFirstItem, ITypeInfoImpl *pTI, unsign
@@ -4199,7 +4199,8 @@ static void SLTG_DoVars(char *pBlk, char *pFirstItem, ITypeInfoImpl *pTI, unsign
}
static void SLTG_DoFuncs(char *pBlk, char *pFirstItem, ITypeInfoImpl *pTI,
@@ -22,9 +22,9 @@ index d5c8191abba..ebf186edc2a 100644
{
SLTG_Function *pFunc;
unsigned short i;
@@ -4244,6 +4245,9 @@ static void SLTG_DoFuncs(char *pBlk, char *pFirstItem, ITypeInfoImpl *pTI,
@@ -4240,6 +4241,9 @@ static void SLTG_DoFuncs(char *pBlk, char *pFirstItem, ITypeInfoImpl *pTI,
else
pFuncDesc->funcdesc.oVft = (pFunc->vtblpos & ~1) * sizeof(void *) / pTI->pTypeLib->ptr_size;
pFuncDesc->funcdesc.oVft = (unsigned short)(pFunc->vtblpos & ~1) * sizeof(void *) / pTI->pTypeLib->ptr_size;
+ if (pFunc->helpstring != 0xffff)
+ pFuncDesc->HelpString = decode_string(hlp_strings, pBlk + pFunc->helpstring, pNameTable - pBlk, pTI->pTypeLib);
@@ -32,7 +32,7 @@ index d5c8191abba..ebf186edc2a 100644
if(pFunc->magic & SLTG_FUNCTION_FLAGS_PRESENT)
pFuncDesc->funcdesc.wFuncFlags = pFunc->funcflags;
@@ -4330,7 +4334,7 @@ static void SLTG_ProcessCoClass(char *pBlk, ITypeInfoImpl *pTI,
@@ -4326,7 +4330,7 @@ static void SLTG_ProcessCoClass(char *pBlk, ITypeInfoImpl *pTI,
static void SLTG_ProcessInterface(char *pBlk, ITypeInfoImpl *pTI,
char *pNameTable, SLTG_TypeInfoHeader *pTIHeader,
@@ -41,7 +41,7 @@ index d5c8191abba..ebf186edc2a 100644
{
char *pFirstItem;
sltg_ref_lookup_t *ref_lookup = NULL;
@@ -4347,7 +4351,7 @@ static void SLTG_ProcessInterface(char *pBlk, ITypeInfoImpl *pTI,
@@ -4343,7 +4347,7 @@ static void SLTG_ProcessInterface(char *pBlk, ITypeInfoImpl *pTI,
}
if (pTITail->funcs_off != 0xffff)
@@ -50,7 +50,7 @@ index d5c8191abba..ebf186edc2a 100644
free(ref_lookup);
@@ -4392,7 +4396,7 @@ static void SLTG_ProcessAlias(char *pBlk, ITypeInfoImpl *pTI,
@@ -4388,7 +4392,7 @@ static void SLTG_ProcessAlias(char *pBlk, ITypeInfoImpl *pTI,
static void SLTG_ProcessDispatch(char *pBlk, ITypeInfoImpl *pTI,
char *pNameTable, SLTG_TypeInfoHeader *pTIHeader,
@@ -59,7 +59,7 @@ index d5c8191abba..ebf186edc2a 100644
{
sltg_ref_lookup_t *ref_lookup = NULL;
if (pTIHeader->href_table != 0xffffffff)
@@ -4403,7 +4407,7 @@ static void SLTG_ProcessDispatch(char *pBlk, ITypeInfoImpl *pTI,
@@ -4399,7 +4403,7 @@ static void SLTG_ProcessDispatch(char *pBlk, ITypeInfoImpl *pTI,
SLTG_DoVars(pBlk, pBlk + pTITail->vars_off, pTI, pTITail->cVars, pNameTable, ref_lookup);
if (pTITail->funcs_off != 0xffff)
@@ -68,7 +68,7 @@ index d5c8191abba..ebf186edc2a 100644
if (pTITail->impls_off != 0xffff)
SLTG_DoImpls(pBlk + pTITail->impls_off, pTI, FALSE, ref_lookup);
@@ -4427,7 +4431,7 @@ static void SLTG_ProcessEnum(char *pBlk, ITypeInfoImpl *pTI,
@@ -4423,7 +4427,7 @@ static void SLTG_ProcessEnum(char *pBlk, ITypeInfoImpl *pTI,
static void SLTG_ProcessModule(char *pBlk, ITypeInfoImpl *pTI,
char *pNameTable, SLTG_TypeInfoHeader *pTIHeader,
@@ -77,7 +77,7 @@ index d5c8191abba..ebf186edc2a 100644
{
sltg_ref_lookup_t *ref_lookup = NULL;
if (pTIHeader->href_table != 0xffffffff)
@@ -4438,7 +4442,7 @@ static void SLTG_ProcessModule(char *pBlk, ITypeInfoImpl *pTI,
@@ -4434,7 +4438,7 @@ static void SLTG_ProcessModule(char *pBlk, ITypeInfoImpl *pTI,
SLTG_DoVars(pBlk, pBlk + pTITail->vars_off, pTI, pTITail->cVars, pNameTable, ref_lookup);
if (pTITail->funcs_off != 0xffff)
@@ -86,7 +86,7 @@ index d5c8191abba..ebf186edc2a 100644
free(ref_lookup);
if (TRACE_ON(typelib))
dump_TypeInfo(pTI);
@@ -4700,7 +4704,7 @@ static ITypeLib2* ITypeLib2_Constructor_SLTG(LPVOID pLib, DWORD dwTLBLength)
@@ -4696,7 +4700,7 @@ static ITypeLib2* ITypeLib2_Constructor_SLTG(LPVOID pLib, DWORD dwTLBLength)
case TKIND_INTERFACE:
SLTG_ProcessInterface((char *)(pMemHeader + 1), *ppTypeInfoImpl, pNameTable,
@@ -95,7 +95,7 @@ index d5c8191abba..ebf186edc2a 100644
break;
case TKIND_COCLASS:
@@ -4715,12 +4719,12 @@ static ITypeLib2* ITypeLib2_Constructor_SLTG(LPVOID pLib, DWORD dwTLBLength)
@@ -4711,12 +4715,12 @@ static ITypeLib2* ITypeLib2_Constructor_SLTG(LPVOID pLib, DWORD dwTLBLength)
case TKIND_DISPATCH:
SLTG_ProcessDispatch((char *)(pMemHeader + 1), *ppTypeInfoImpl, pNameTable,
@@ -111,5 +111,5 @@ index d5c8191abba..ebf186edc2a 100644
default:
--
2.40.1
2.43.0

View File

@@ -1 +1 @@
Wine Staging 9.0-rc1
Wine Staging 9.0-rc5

View File

@@ -1 +1 @@
93f7ef86701f0b5f0828c8e0c4581b00873a7676
ff1642f32cfcd2efd8d60be1a8cb432d393587c7