Compare commits

...

24 Commits

Author SHA1 Message Date
Alistair Leslie-Hughes
c263c6fabb Release v10.0-rc4 2025-01-04 11:08:38 +11:00
Alistair Leslie-Hughes
f10d2d0452 Release v10.0-rc3 2024-12-21 12:39:52 +11:00
Alistair Leslie-Hughes
bc8dead787 Updated vkd3d-latest patchset 2024-12-21 12:28:52 +11:00
Alistair Leslie-Hughes
3738f9baee Updated vkd3d-latest patchset
Squashed to release + update.
2024-12-18 06:43:04 +11:00
Alistair Leslie-Hughes
c2de76b804 Release v10.0-rc2 2024-12-14 14:48:52 +11:00
Alistair Leslie-Hughes
5a9719f283 Updated vkd3d-latest patchset 2024-12-14 11:06:53 +11:00
Alistair Leslie-Hughes
c8d46d4ca3 Rebase against 448fcbc0c60d7228ed52f1f5d90f62be0a58289a. 2024-12-13 09:11:23 +11:00
Alistair Leslie-Hughes
4f96088b1e Release v10.0-rc1 2024-12-07 09:51:57 +11:00
Alistair Leslie-Hughes
7f8391d22f Rebase against 4161e62e478f61fdcd0365d9bd7b21e3b1a5197b. 2024-12-07 08:55:33 +11:00
Alistair Leslie-Hughes
2f87552459 Updated vkd3d-latest 2024-12-06 09:17:43 +11:00
Alistair Leslie-Hughes
4f83c2f614 Rebase against 13c47c91e2d6fea81f4c0598cf5d2e81e95b0dd2. 2024-12-06 09:04:41 +11:00
Alistair Leslie-Hughes
dc277fed5e Rebase against 11e8662ebbbde9d39301aaf4bbc6f448b4cc4b77. 2024-12-05 09:54:50 +11:00
Alistair Leslie-Hughes
342b3b8162 Updated vkd3d-latest patchset 2024-12-03 09:15:55 +11:00
Alistair Leslie-Hughes
891daebf57 Rebase against 96a94318125332cd7aa80c475b35e38439b7c2b3. 2024-11-29 07:35:05 +11:00
Alistair Leslie-Hughes
7ba8823e57 Release v9.22 2024-11-23 16:12:36 +11:00
Alistair Leslie-Hughes
5a368dddd1 Rebase against 51ccd95c49c2c61ad41960b25a01f834601d70c0. 2024-11-23 16:11:07 +11:00
Alistair Leslie-Hughes
4cd3d8eba4 Rebase against 157105cb6d306f9794f0f3ebaa55d9c891e3be8f. 2024-11-22 11:15:42 +11:00
Alistair Leslie-Hughes
e0593972f0 Updated vkd3d-latest patchset
Includes Release 1.14.
2024-11-22 06:55:20 +11:00
Alistair Leslie-Hughes
e7a74d707b Rebase against f350a8782b29b3890320e48e915d026612657454. 2024-11-21 11:01:10 +11:00
Alistair Leslie-Hughes
8b3f47c1d2 Rebase against 044527c671d87b917e01f39fcf33b596cc2e7878. 2024-11-20 09:58:55 +11:00
Alistair Leslie-Hughes
78f630993b Rebase against 67c1c3c2559cc3b934cae5ae26156dcc6fbd484b. 2024-11-19 09:46:47 +11:00
Alistair Leslie-Hughes
3f86dff407 Rebase against ab40b7fd8686345bf77a27ceb12d4dfbaa753829. 2024-11-15 11:13:11 +11:00
Alistair Leslie-Hughes
65b72cb912 Updated vkd3d-latest patchset 2024-11-14 06:35:51 +11:00
Alistair Leslie-Hughes
32abf9fc97 Rebase against 6303163af0c8e1c245e45fe2efea8f664431d26c. 2024-11-12 09:53:10 +11:00
34 changed files with 17053 additions and 31966 deletions

View File

@@ -1,4 +1,4 @@
From 6dbedd8d7aebe117b013c61f9549848f13619f0e Mon Sep 17 00:00:00 2001
From 6c64a33f908b9fade24fe11d89533a70fdce352f Mon Sep 17 00:00:00 2001
From: Zebediah Figura <z.figura12@gmail.com>
Date: Wed, 13 Jun 2018 10:44:49 -0500
Subject: [PATCH] configure: Check for sys/eventfd.h, ppoll(), and shm_open().
@@ -12,10 +12,10 @@ Although perhaps we shouldn't since the server doesn't do this.
2 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 67775f9cd15..c03d4c3688b 100644
index eb7f8223b51..388ac14dc8a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -407,6 +407,7 @@ AC_CHECK_HEADERS(\
@@ -411,6 +411,7 @@ AC_CHECK_HEADERS(\
sys/cdio.h \
sys/epoll.h \
sys/event.h \
@@ -23,15 +23,15 @@ index 67775f9cd15..c03d4c3688b 100644
sys/extattr.h \
sys/filio.h \
sys/ipc.h \
@@ -2067,6 +2068,7 @@ AC_CHECK_FUNCS(\
@@ -2079,6 +2080,7 @@ AC_CHECK_FUNCS(\
port_create \
posix_fadvise \
posix_fallocate \
+ ppoll \
prctl \
sched_getcpu \
sched_yield \
renameat \
@@ -2087,6 +2089,12 @@ AC_SEARCH_LIBS(clock_gettime, rt,
@@ -2100,6 +2102,12 @@ AC_SEARCH_LIBS(clock_gettime, rt,
test "$ac_res" = "none required" || AC_SUBST(RT_LIBS,"$ac_res")])
LIBS=$ac_save_LIBS
@@ -45,10 +45,10 @@ index 67775f9cd15..c03d4c3688b 100644
AC_LINK_IFELSE([AC_LANG_PROGRAM(
[[#include <sched.h>]], [[sched_setaffinity(0, 0, 0);]])],[wine_cv_have_sched_setaffinity=yes],[wine_cv_have_sched_setaffinity=no]))
diff --git a/include/config.h.in b/include/config.h.in
index 1c3d4c4d62b..e9686e04a2a 100644
index 6033d8674f3..563b63a92df 100644
--- a/include/config.h.in
+++ b/include/config.h.in
@@ -318,6 +318,9 @@
@@ -321,6 +321,9 @@
/* Define to 1 if you have the 'posix_fallocate' function. */
#undef HAVE_POSIX_FALLOCATE
@@ -58,7 +58,7 @@ index 1c3d4c4d62b..e9686e04a2a 100644
/* Define to 1 if you have the 'prctl' function. */
#undef HAVE_PRCTL
@@ -375,7 +378,10 @@
@@ -381,7 +384,10 @@
/* Define to 1 if 'interface_id' is a member of 'sg_io_hdr_t'. */
#undef HAVE_SG_IO_HDR_T_INTERFACE_ID
@@ -70,7 +70,7 @@ index 1c3d4c4d62b..e9686e04a2a 100644
#undef HAVE_SIGINFO_T_SI_FD
/* Define to 1 if you have the 'sigprocmask' function. */
@@ -504,6 +510,9 @@
@@ -510,6 +516,9 @@
/* Define to 1 if you have the <sys/epoll.h> header file. */
#undef HAVE_SYS_EPOLL_H

View File

@@ -1,4 +1,4 @@
From a43255ead53a49837e7995ab4de0afa8e05e6334 Mon Sep 17 00:00:00 2001
From ce164f9c292bc93ad50055bdb0a786e8a8770afa Mon Sep 17 00:00:00 2001
From: Zebediah Figura <zfigura@codeweavers.com>
Date: Mon, 6 Jul 2020 15:11:12 -0500
Subject: [PATCH] server: Create eventfd file descriptors for process objects.
@@ -49,7 +49,7 @@ index 00f9e638d83..8522d8a69ae 100644
void esync_init(void);
+int esync_create_fd( int initval, int flags );
diff --git a/server/process.c b/server/process.c
index 031c0fece13..eb073551b57 100644
index 3c5a58b7b03..30555d516c8 100644
--- a/server/process.c
+++ b/server/process.c
@@ -63,6 +63,7 @@
@@ -77,7 +77,7 @@ index 031c0fece13..eb073551b57 100644
no_satisfied, /* satisfied */
no_signal, /* signal */
no_get_fd, /* get_fd */
@@ -688,6 +690,7 @@ struct process *create_process( int fd, struct process *parent, unsigned int fla
@@ -689,6 +691,7 @@ struct process *create_process( int fd, struct process *parent, unsigned int fla
process->rawinput_kbd = NULL;
memset( &process->image_info, 0, sizeof(process->image_info) );
list_init( &process->rawinput_entry );
@@ -85,7 +85,7 @@ index 031c0fece13..eb073551b57 100644
list_init( &process->kernel_object );
list_init( &process->thread_list );
list_init( &process->locks );
@@ -738,6 +741,9 @@ struct process *create_process( int fd, struct process *parent, unsigned int fla
@@ -739,6 +742,9 @@ struct process *create_process( int fd, struct process *parent, unsigned int fla
if (!process->handles || !process->token) goto error;
process->session_id = token_get_session_id( process->token );
@@ -95,7 +95,7 @@ index 031c0fece13..eb073551b57 100644
set_fd_events( process->msg_fd, POLLIN ); /* start listening to events */
return process;
@@ -786,6 +792,7 @@ static void process_destroy( struct object *obj )
@@ -787,6 +793,7 @@ static void process_destroy( struct object *obj )
free( process->rawinput_devices );
free( process->dir_cache );
free( process->image );
@@ -103,7 +103,7 @@ index 031c0fece13..eb073551b57 100644
}
/* dump a process on stdout for debugging purposes */
@@ -803,6 +810,13 @@ static int process_signaled( struct object *obj, struct wait_queue_entry *entry
@@ -804,6 +811,13 @@ static int process_signaled( struct object *obj, struct wait_queue_entry *entry
return !process->running_threads;
}
@@ -118,17 +118,17 @@ index 031c0fece13..eb073551b57 100644
{
access = default_map_access( obj, access );
diff --git a/server/process.h b/server/process.h
index 1e73e9d47dc..bedd8bb4586 100644
index 96814ab7cf8..ec74ba0490a 100644
--- a/server/process.h
+++ b/server/process.h
@@ -86,6 +86,7 @@ struct process
struct list rawinput_entry; /* entry in the rawinput process list */
struct list kernel_object; /* list of kernel object pointers */
pe_image_info_t image_info; /* main exe image info */
struct pe_image_info image_info; /* main exe image info */
+ int esync_fd; /* esync file descriptor (signaled on exit) */
};
/* process functions */
--
2.43.0
2.45.2

View File

@@ -1,4 +1,4 @@
From 622de4743d9585d895bb560b4c8ac6ab01aff23f Mon Sep 17 00:00:00 2001
From 631ec6bff81bb2e3389d0c2030364dea91719bf6 Mon Sep 17 00:00:00 2001
From: Zebediah Figura <zfigura@codeweavers.com>
Date: Mon, 6 Jul 2020 16:52:39 -0500
Subject: [PATCH] ntdll: Implement NtSignalAndWaitForSingleObject().
@@ -10,10 +10,10 @@ Subject: [PATCH] ntdll: Implement NtSignalAndWaitForSingleObject().
3 files changed, 33 insertions(+)
diff --git a/dlls/ntdll/unix/esync.c b/dlls/ntdll/unix/esync.c
index 9e980643a6e..db70e5075d1 100644
index 6d07d8057a1..ca0ffd2b8b1 100644
--- a/dlls/ntdll/unix/esync.c
+++ b/dlls/ntdll/unix/esync.c
@@ -842,6 +842,34 @@ NTSTATUS esync_wait_objects( DWORD count, const HANDLE *handles, BOOLEAN wait_an
@@ -844,6 +844,34 @@ NTSTATUS esync_wait_objects( DWORD count, const HANDLE *handles, BOOLEAN wait_an
return ret;
}
@@ -62,11 +62,11 @@ index 8eaa79a5823..88a6d5c8975 100644
/* We have to synchronize on the fd cache mutex so that our calls to receive_fd
diff --git a/dlls/ntdll/unix/sync.c b/dlls/ntdll/unix/sync.c
index 20391617e40..12ed44f7a8e 100644
index 943ba6c0da9..51fca406a4c 100644
--- a/dlls/ntdll/unix/sync.c
+++ b/dlls/ntdll/unix/sync.c
@@ -1531,6 +1531,9 @@ NTSTATUS WINAPI NtSignalAndWaitForSingleObject( HANDLE signal, HANDLE wait,
select_op_t select_op;
@@ -1636,6 +1636,9 @@ NTSTATUS WINAPI NtSignalAndWaitForSingleObject( HANDLE signal, HANDLE wait,
union select_op select_op;
UINT flags = SELECT_INTERRUPTIBLE;
+ if (do_esync())
@@ -76,5 +76,5 @@ index 20391617e40..12ed44f7a8e 100644
if (alertable) flags |= SELECT_ALERTABLE;
--
2.42.0
2.45.2

View File

@@ -1,211 +0,0 @@
From d1f5c52e07bce357d3b471e839db2a6f7a72fa86 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.
---
dlls/kernel32/tests/loader.c | 75 ++++++++++++++++++++++++++++++++++++
dlls/ntdll/loader.c | 42 ++++++++++++++++++++
2 files changed, 117 insertions(+)
diff --git a/dlls/kernel32/tests/loader.c b/dlls/kernel32/tests/loader.c
index 9b0f8f6bff2..747dfb0afa6 100644
--- a/dlls/kernel32/tests/loader.c
+++ b/dlls/kernel32/tests/loader.c
@@ -28,6 +28,7 @@
#include "winbase.h"
#include "winternl.h"
#include "winnls.h"
+#include "winuser.h"
#include "wine/test.h"
#include "delayloadhandler.h"
@@ -4651,6 +4652,79 @@ static void test_Wow64Transition(void)
debugstr_wn(name->SectionFileName.Buffer, name->SectionFileName.Length / sizeof(WCHAR)));
}
+static inline WCHAR toupperW(WCHAR c)
+{
+ WCHAR tmp = c;
+ CharUpperBuffW(&tmp, 1);
+ return tmp;
+}
+
+static ULONG hash_basename(const WCHAR *basename)
+{
+ WORD version = MAKEWORD(NtCurrentTeb()->Peb->OSMinorVersion,
+ NtCurrentTeb()->Peb->OSMajorVersion);
+ ULONG hash = 0;
+
+ if (version >= 0x0602)
+ {
+ for (; *basename; basename++)
+ hash = hash * 65599 + toupperW(*basename);
+ }
+ else if (version == 0x0601)
+ {
+ for (; *basename; basename++)
+ hash = hash + 65599 * toupperW(*basename);
+ }
+ else
+ hash = toupperW(basename[0]) - 'A';
+
+ return hash & 31;
+}
+
+static void test_HashLinks(void)
+{
+ static WCHAR ntdllW[] = {'n','t','d','l','l','.','d','l','l',0};
+ static WCHAR kernel32W[] = {'k','e','r','n','e','l','3','2','.','d','l','l',0};
+
+ LIST_ENTRY *hash_map, *entry, *mark;
+ LDR_DATA_TABLE_ENTRY *module;
+ BOOL found;
+
+ entry = &NtCurrentTeb()->Peb->LdrData->InLoadOrderModuleList;
+ entry = entry->Flink;
+
+ module = CONTAINING_RECORD(entry, LDR_DATA_TABLE_ENTRY, InLoadOrderLinks);
+ entry = module->HashLinks.Blink;
+
+ hash_map = entry - hash_basename(module->BaseDllName.Buffer);
+
+ mark = &hash_map[hash_basename(ntdllW)];
+ found = FALSE;
+ for (entry = mark->Flink; entry != mark; entry = entry->Flink)
+ {
+ module = CONTAINING_RECORD(entry, LDR_DATA_TABLE_ENTRY, HashLinks);
+ if (!lstrcmpiW(module->BaseDllName.Buffer, ntdllW))
+ {
+ found = TRUE;
+ break;
+ }
+ }
+ ok(found, "Could not find ntdll\n");
+
+ mark = &hash_map[hash_basename(kernel32W)];
+ found = FALSE;
+ for (entry = mark->Flink; entry != mark; entry = entry->Flink)
+ {
+ module = CONTAINING_RECORD(entry, LDR_DATA_TABLE_ENTRY, HashLinks);
+ if (!lstrcmpiW(module->BaseDllName.Buffer, kernel32W))
+ {
+ found = TRUE;
+ break;
+ }
+ }
+ ok(found, "Could not find kernel32\n");
+}
+
START_TEST(loader)
{
int argc;
@@ -4734,6 +4808,7 @@ START_TEST(loader)
test_InMemoryOrderModuleList();
test_LoadPackagedLibrary();
test_wow64_redirection();
+ test_HashLinks();
test_dll_file( "ntdll.dll" );
test_dll_file( "kernel32.dll" );
test_dll_file( "advapi32.dll" );
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
index 0ed37ad390c..94610a82a65 100644
--- a/dlls/ntdll/loader.c
+++ b/dlls/ntdll/loader.c
@@ -128,6 +128,9 @@ struct file_id
BYTE ObjectId[16];
};
+#define HASH_MAP_SIZE 32
+static LIST_ENTRY hash_table[HASH_MAP_SIZE];
+
/* internal representation of loaded modules */
typedef struct _wine_modref
{
@@ -603,6 +606,33 @@ static int base_address_compare( const void *key, const RTL_BALANCED_NODE *entry
return 0;
}
+/*************************************************************************
+ * hash_basename
+ *
+ * Calculates the bucket index of a dll using the basename.
+ */
+static ULONG hash_basename(const WCHAR *basename)
+{
+ WORD version = MAKEWORD(NtCurrentTeb()->Peb->OSMinorVersion,
+ NtCurrentTeb()->Peb->OSMajorVersion);
+ ULONG hash = 0;
+
+ if (version >= 0x0602)
+ {
+ for (; *basename; basename++)
+ hash = hash * 65599 + towupper(*basename);
+ }
+ else if (version == 0x0601)
+ {
+ for (; *basename; basename++)
+ hash = hash + 65599 * towupper(*basename);
+ }
+ else
+ hash = towupper(basename[0]) - 'A';
+
+ return hash & (HASH_MAP_SIZE-1);
+}
+
/*************************************************************************
* get_modref
*
@@ -1599,9 +1629,14 @@ static WINE_MODREF *alloc_module( HMODULE hModule, const UNICODE_STRING *nt_name
&wm->ldr.InLoadOrderLinks);
InsertTailList(&NtCurrentTeb()->Peb->LdrData->InMemoryOrderModuleList,
&wm->ldr.InMemoryOrderLinks);
+ InsertTailList(&hash_table[hash_basename(wm->ldr.BaseDllName.Buffer)],
+ &wm->ldr.HashLinks);
if (rtl_rb_tree_put( &base_address_index_tree, wm->ldr.DllBase, &wm->ldr.BaseAddressIndexNode, base_address_compare ))
ERR( "rtl_rb_tree_put failed.\n" );
+
/* wait until init is called for inserting into InInitializationOrderModuleList */
+ wm->ldr.InInitializationOrderLinks.Flink = NULL;
+ wm->ldr.InInitializationOrderLinks.Blink = NULL;
if (!(nt->OptionalHeader.DllCharacteristics & IMAGE_DLLCHARACTERISTICS_NX_COMPAT))
{
@@ -2299,6 +2334,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);
+ RemoveEntryList(&wm->ldr.HashLinks);
RtlRbRemoveNode( &base_address_index_tree, &wm->ldr.BaseAddressIndexNode );
/* FIXME: there are several more dangling references
@@ -3963,6 +3999,7 @@ static void free_modref( WINE_MODREF *wm )
RemoveEntryList(&wm->ldr.InLoadOrderLinks);
RemoveEntryList(&wm->ldr.InMemoryOrderLinks);
+ RemoveEntryList(&wm->ldr.HashLinks);
RtlRbRemoveNode( &base_address_index_tree, &wm->ldr.BaseAddressIndexNode );
if (wm->ldr.InInitializationOrderLinks.Flink)
RemoveEntryList(&wm->ldr.InInitializationOrderLinks);
@@ -4384,6 +4421,7 @@ void loader_init( CONTEXT *context, void **entry )
ANSI_STRING ctrl_routine = RTL_CONSTANT_STRING( "CtrlRoutine" );
WINE_MODREF *kernel32;
PEB *peb = NtCurrentTeb()->Peb;
+ unsigned int i;
peb->LdrData = &ldr;
peb->FastPebLock = &peb_lock;
@@ -4402,6 +4440,10 @@ void loader_init( CONTEXT *context, void **entry )
if (!(tls_dirs = RtlAllocateHeap( GetProcessHeap(), HEAP_ZERO_MEMORY, tls_module_count * sizeof(*tls_dirs) )))
NtTerminateProcess( GetCurrentProcess(), STATUS_NO_MEMORY );
+ /* initialize hash table */
+ for (i = 0; i < HASH_MAP_SIZE; i++)
+ InitializeListHead( &hash_table[i] );
+
init_user_process_params();
load_global_options();
version_init();
--
2.45.2

View File

@@ -1,34 +0,0 @@
From ddd05cd2289136f417a8de210aef68a076da8399 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:56:19 +0200
Subject: [PATCH] ntdll: Use HashLinks when searching for a dll using the
basename.
---
dlls/ntdll/loader.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
index 3e275e8c409..7f4aa8eba06 100644
--- a/dlls/ntdll/loader.c
+++ b/dlls/ntdll/loader.c
@@ -543,13 +543,13 @@ static WINE_MODREF *find_basename_module( LPCWSTR name )
if (cached_modref && RtlEqualUnicodeString( &name_str, &cached_modref->ldr.BaseDllName, TRUE ))
return cached_modref;
- mark = &NtCurrentTeb()->Peb->LdrData->InLoadOrderModuleList;
+ mark = &hash_table[hash_basename(name)];
for (entry = mark->Flink; entry != mark; entry = entry->Flink)
{
- WINE_MODREF *mod = CONTAINING_RECORD(entry, WINE_MODREF, ldr.InLoadOrderLinks);
+ WINE_MODREF *mod = CONTAINING_RECORD(entry, WINE_MODREF, ldr.HashLinks);
if (RtlEqualUnicodeString( &name_str, &mod->ldr.BaseDllName, TRUE ) && !mod->system)
{
- cached_modref = CONTAINING_RECORD(mod, WINE_MODREF, ldr);
+ cached_modref = CONTAINING_RECORD(&mod->ldr, WINE_MODREF, ldr);
return cached_modref;
}
}
--
2.35.1

View File

@@ -1 +0,0 @@
Fixes: Implement and use hash links when looking up LDR module

View File

@@ -1,4 +1,4 @@
From 43ca4e4a3c633d405b3d282badb028c4250f942d Mon Sep 17 00:00:00 2001
From e93243e7863c239a1e4b2d91cb12dcd2cb373b36 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 fbad84d2c36..5afeb0f63b0 100644
index 9dcb475c148..9e61c38d773 100644
--- a/dlls/ntdll/loader.c
+++ b/dlls/ntdll/loader.c
@@ -87,6 +87,9 @@ const WCHAR system_dir[] = L"C:\\windows\\system32\\";
@@ -88,6 +88,9 @@ const WCHAR system_dir[] = L"C:\\windows\\system32\\";
/* system search path */
static const WCHAR system_path[] = L"C:\\windows\\system32;C:\\windows\\system;C:\\windows";
@@ -23,7 +23,7 @@ index fbad84d2c36..5afeb0f63b0 100644
static BOOL is_prefix_bootstrap; /* are we bootstrapping the prefix? */
static BOOL imports_fixup_done = FALSE; /* set once the imports have been fixed up, before attaching them */
static BOOL process_detaching = FALSE; /* set on process detach to avoid deadlocks with thread detach */
@@ -106,6 +109,8 @@ struct dll_dir_entry
@@ -107,6 +110,8 @@ struct dll_dir_entry
static struct list dll_dir_list = LIST_INIT( dll_dir_list ); /* extra dirs from LdrAddDllDirectory */
@@ -32,7 +32,7 @@ index fbad84d2c36..5afeb0f63b0 100644
struct ldr_notification
{
struct list entry;
@@ -2030,6 +2035,96 @@ NTSTATUS WINAPI LdrUnlockLoaderLock( ULONG flags, ULONG_PTR magic )
@@ -2022,6 +2027,96 @@ NTSTATUS WINAPI LdrUnlockLoaderLock( ULONG flags, ULONG_PTR magic )
}
@@ -129,7 +129,7 @@ index fbad84d2c36..5afeb0f63b0 100644
/******************************************************************
* LdrGetProcedureAddress (NTDLL.@)
*/
@@ -2050,7 +2145,7 @@ NTSTATUS WINAPI LdrGetProcedureAddress(HMODULE module, const ANSI_STRING *name,
@@ -2042,7 +2137,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 );
@@ -138,7 +138,7 @@ index fbad84d2c36..5afeb0f63b0 100644
{
*address = proc;
ret = STATUS_SUCCESS;
@@ -2311,6 +2406,8 @@ static void build_ntdll_module(void)
@@ -2304,6 +2399,8 @@ static void build_ntdll_module(void)
wm->ldr.Flags &= ~LDR_DONT_RESOLVE_REFS;
node_ntdll = wm->ldr.DdagNode;
if (TRACE_ON(relay)) RELAY_SetupDLL( module );
@@ -148,12 +148,12 @@ index fbad84d2c36..5afeb0f63b0 100644
diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h
index cffe27d847c..d3c4a9cae68 100644
index fb5fb311646..a342cbf7d26 100644
--- a/dlls/ntdll/ntdll_misc.h
+++ b/dlls/ntdll/ntdll_misc.h
@@ -145,6 +145,11 @@ static inline TEB64 *NtCurrentTeb64(void) { return NULL; }
static inline TEB64 *NtCurrentTeb64(void) { return (TEB64 *)NtCurrentTeb()->GdiBatchCount; }
#endif
@@ -117,6 +117,11 @@ static inline void *get_rva( HMODULE module, DWORD va )
return (void *)((char *)module + va);
}
+/* version */
+extern const char * CDECL wine_get_version(void);
@@ -164,5 +164,5 @@ index cffe27d847c..d3c4a9cae68 100644
static inline void ascii_to_unicode( WCHAR *dst, const char *src, size_t len )
{
--
2.43.0
2.45.2

View File

@@ -1,4 +1,4 @@
From bdbc1c90697424373a5248cf6c2bda589785bd37 Mon Sep 17 00:00:00 2001
From 7b9165576a8ba0e317c280c9bedd2137fb745149 Mon Sep 17 00:00:00 2001
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
Date: Thu, 16 Jan 2014 20:56:49 -0700
Subject: [PATCH] ntdll: Add support for creating reparse points.
@@ -13,12 +13,12 @@ Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
5 files changed, 451 insertions(+), 19 deletions(-)
diff --git a/configure.ac b/configure.ac
index d380c66ff40..4314be5553c 100644
index 0368b661e61..eb7f8223b51 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2078,6 +2078,8 @@ AC_CHECK_FUNCS(\
posix_fallocate \
@@ -2082,6 +2082,8 @@ AC_CHECK_FUNCS(\
prctl \
sched_getcpu \
sched_yield \
+ renameat \
+ renameat2 \
@@ -39,7 +39,7 @@ index 37bd6c86e31..f9a15d28ed2 100644
EXTRADLLFLAGS = -nodefaultlibs
i386_EXTRADLLFLAGS = -Wl,--image-base,0x7bc00000
diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c
index 7d3618a3804..148b6058cee 100644
index 02bdf67796d..63b5ebcab54 100644
--- a/dlls/ntdll/tests/file.c
+++ b/dlls/ntdll/tests/file.c
@@ -38,6 +38,7 @@
@@ -50,7 +50,7 @@ index 7d3618a3804..148b6058cee 100644
#ifndef IO_COMPLETION_ALL_ACCESS
#define IO_COMPLETION_ALL_ACCESS 0x001F0003
@@ -5863,32 +5864,154 @@ static void test_mailslot_name(void)
@@ -5952,32 +5953,154 @@ static void test_mailslot_name(void)
CloseHandle( device );
}
@@ -221,8 +221,8 @@ index 7d3618a3804..148b6058cee 100644
+ RemoveDirectoryW(path);
}
START_TEST(file)
@@ -5969,6 +6092,6 @@ START_TEST(file)
static void test_set_io_completion_ex(void)
@@ -6117,6 +6240,6 @@ START_TEST(file)
test_ioctl();
test_query_ea();
test_flush_buffers_file();
@@ -231,7 +231,7 @@ index 7d3618a3804..148b6058cee 100644
+ test_mailslot_name();
}
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
index ca95dd347eb..ac4de149455 100644
index 8bc69557057..00ac7377dd4 100644
--- a/dlls/ntdll/unix/file.c
+++ b/dlls/ntdll/unix/file.c
@@ -36,6 +36,8 @@
@@ -243,7 +243,7 @@ index ca95dd347eb..ac4de149455 100644
#include <limits.h>
#include <unistd.h>
#ifdef HAVE_MNTENT_H
@@ -124,6 +126,7 @@
@@ -121,6 +123,7 @@
#include "wine/list.h"
#include "wine/debug.h"
#include "unix_private.h"
@@ -251,7 +251,7 @@ index ca95dd347eb..ac4de149455 100644
WINE_DEFAULT_DEBUG_CHANNEL(file);
WINE_DECLARE_DEBUG_CHANNEL(winediag);
@@ -135,6 +138,12 @@ WINE_DECLARE_DEBUG_CHANNEL(winediag);
@@ -132,6 +135,12 @@ WINE_DECLARE_DEBUG_CHANNEL(winediag);
#undef EXT2_IOC_GETFLAGS
#undef EXT4_CASEFOLD_FL
@@ -264,7 +264,7 @@ index ca95dd347eb..ac4de149455 100644
#ifdef linux
/* We want the real kernel dirent structure, not the libc one */
@@ -246,6 +255,95 @@ static const BOOL is_case_sensitive = FALSE;
@@ -243,6 +252,95 @@ static const BOOL is_case_sensitive = FALSE;
static pthread_mutex_t dir_mutex = PTHREAD_MUTEX_INITIALIZER;
static pthread_mutex_t mnt_mutex = PTHREAD_MUTEX_INITIALIZER;
@@ -360,7 +360,7 @@ index ca95dd347eb..ac4de149455 100644
/* check if a given Unicode char is OK in a DOS short name */
static inline BOOL is_invalid_dos_char( WCHAR ch )
{
@@ -1644,6 +1742,28 @@ static int parse_samba_dos_attrib_data( char *data, int len )
@@ -1641,6 +1739,28 @@ static int parse_samba_dos_attrib_data( char *data, int len )
}
@@ -389,7 +389,7 @@ index ca95dd347eb..ac4de149455 100644
static BOOL fd_is_mount_point( int fd, const struct stat *st )
{
struct stat parent;
@@ -3418,6 +3538,181 @@ done:
@@ -3416,6 +3536,181 @@ done:
}
@@ -571,7 +571,7 @@ index ca95dd347eb..ac4de149455 100644
/******************************************************************************
* lookup_unix_name
*
@@ -6249,6 +6544,13 @@ NTSTATUS WINAPI NtFsControlFile( HANDLE handle, HANDLE event, PIO_APC_ROUTINE ap
@@ -6246,6 +6541,13 @@ NTSTATUS WINAPI NtFsControlFile( HANDLE handle, HANDLE event, PIO_APC_ROUTINE ap
break;
}

View File

@@ -1,4 +1,4 @@
From c2236d2048faf1e01da3130fdb81688da6829d4a Mon Sep 17 00:00:00 2001
From 742f9b17c321b671e6b7bcd3bc7772e3ef66729d Mon Sep 17 00:00:00 2001
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
Date: Thu, 16 Jan 2014 21:02:11 -0700
Subject: [PATCH] server: Implement FILE_OPEN_REPARSE_POINT option.
@@ -10,7 +10,7 @@ Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
2 files changed, 142 insertions(+), 7 deletions(-)
diff --git a/dlls/kernelbase/file.c b/dlls/kernelbase/file.c
index 1f13511fa7b..1c41e0011f3 100644
index 249f476eb7e..2ea3d81a264 100644
--- a/dlls/kernelbase/file.c
+++ b/dlls/kernelbase/file.c
@@ -769,6 +769,8 @@ static UINT get_nt_file_options( DWORD attributes )
@@ -23,7 +23,7 @@ index 1f13511fa7b..1c41e0011f3 100644
}
diff --git a/server/fd.c b/server/fd.c
index 04688c5eb0d..94b8bd088ed 100644
index c82ed49034e..cd4b35915d4 100644
--- a/server/fd.c
+++ b/server/fd.c
@@ -32,6 +32,7 @@
@@ -201,16 +201,7 @@ index 04688c5eb0d..94b8bd088ed 100644
if ((fd->unix_fd = open( name, rw_mode | (flags & ~O_TRUNC), *mode )) == -1)
{
/* if we tried to open a directory for write access, retry read-only */
@@ -1945,7 +2066,7 @@ struct fd *open_fd( struct fd *root, const char *name, struct unicode_str nt_nam
fd->unix_name = NULL;
if ((path = dup_fd_name( root, name )))
{
- fd->unix_name = realpath( path, NULL );
+ fd->unix_name = normalize_path( path, flags );
free( path );
}
@@ -1956,10 +2077,11 @@ struct fd *open_fd( struct fd *root, const char *name, struct unicode_str nt_nam
@@ -1947,10 +2068,11 @@ struct fd *open_fd( struct fd *root, const char *name, struct unicode_str nt_nam
*mode = st.st_mode;
/* only bother with an inode for normal files and directories */
@@ -223,7 +214,16 @@ index 04688c5eb0d..94b8bd088ed 100644
if (!inode)
{
@@ -1974,13 +2096,17 @@ struct fd *open_fd( struct fd *root, const char *name, struct unicode_str nt_nam
@@ -1962,7 +2084,7 @@ struct fd *open_fd( struct fd *root, const char *name, struct unicode_str nt_nam
if ((path = dup_fd_name( root, name )))
{
- fd->unix_name = realpath( path, NULL );
+ fd->unix_name = normalize_path( path, flags );
free( path );
}
@@ -1975,13 +2097,17 @@ struct fd *open_fd( struct fd *root, const char *name, struct unicode_str nt_nam
list_add_head( &inode->open, &fd->inode_entry );
closed_fd = NULL;
@@ -243,7 +243,7 @@ index 04688c5eb0d..94b8bd088ed 100644
{
set_error( STATUS_FILE_IS_A_DIRECTORY );
goto error;
@@ -2427,6 +2553,7 @@ static struct fd *get_handle_fd_obj( struct process *process, obj_handle_t handl
@@ -2428,6 +2554,7 @@ static struct fd *get_handle_fd_obj( struct process *process, obj_handle_t handl
static int is_dir_empty( int fd )
{
@@ -251,7 +251,7 @@ index 04688c5eb0d..94b8bd088ed 100644
DIR *dir;
int empty;
struct dirent *de;
@@ -2434,8 +2561,13 @@ static int is_dir_empty( int fd )
@@ -2435,8 +2562,13 @@ static int is_dir_empty( int fd )
if ((fd = dup( fd )) == -1)
return -1;
@@ -266,7 +266,7 @@ index 04688c5eb0d..94b8bd088ed 100644
close( fd );
return -1;
}
@@ -2447,6 +2579,7 @@ static int is_dir_empty( int fd )
@@ -2448,6 +2580,7 @@ static int is_dir_empty( int fd )
empty = 0;
}
closedir( dir );
@@ -274,7 +274,7 @@ index 04688c5eb0d..94b8bd088ed 100644
return empty;
}
@@ -2485,7 +2618,7 @@ static void set_fd_disposition( struct fd *fd, unsigned int flags )
@@ -2486,7 +2619,7 @@ static void set_fd_disposition( struct fd *fd, unsigned int flags )
file_set_error();
return;
}

View File

@@ -1,4 +1,4 @@
From 48124df7efbda048d841899cc9bde77a3684622b Mon Sep 17 00:00:00 2001
From 2c353379e4e6da08174cc6bc7b0fd95f26c2d16e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
Date: Mon, 26 Aug 2019 14:37:20 +0200
Subject: [PATCH] server: Add send_hardware_message flags for rawinput
@@ -6,15 +6,15 @@ Subject: [PATCH] server: Add send_hardware_message flags for rawinput
---
include/ntuser.h | 4 ++++
server/protocol.def | 3 +--
server/queue.c | 20 ++++++++++++--------
3 files changed, 17 insertions(+), 10 deletions(-)
server/protocol.def | 5 ++---
server/queue.c | 26 +++++++++++++++-----------
3 files changed, 21 insertions(+), 14 deletions(-)
diff --git a/include/ntuser.h b/include/ntuser.h
index bd11567290f..c75e691b4ee 100644
index 3d981927395..f20945f4122 100644
--- a/include/ntuser.h
+++ b/include/ntuser.h
@@ -1480,6 +1480,10 @@ struct hid_packet
@@ -1613,6 +1613,10 @@ struct hid_packet
C_ASSERT(sizeof(struct hid_packet) == offsetof(struct hid_packet, data[0]));
@@ -26,19 +26,21 @@ index bd11567290f..c75e691b4ee 100644
{
UINT flags;
diff --git a/server/protocol.def b/server/protocol.def
index 222a283477a..320b87775b7 100644
index ae53a65db64..1fcace0d131 100644
--- a/server/protocol.def
+++ b/server/protocol.def
@@ -2208,7 +2208,7 @@ enum message_type
@@ -2262,8 +2262,8 @@ enum message_type
/* Send a hardware message to a thread queue */
@REQ(send_hardware_message)
user_handle_t win; /* window handle */
hw_input_t input; /* input data */
- union hw_input input; /* input data */
- unsigned int flags; /* flags (see below) */
+ union hw_input input; /* input data */
+ unsigned int flags; /* flags (see ntuser.h) */
VARARG(report,bytes); /* HID report data */
@REPLY
int wait; /* do we need to wait for a reply? */
@@ -2217,7 +2217,6 @@ enum message_type
@@ -2272,7 +2272,6 @@ enum message_type
int new_x; /* new cursor position */
int new_y;
@END
@@ -47,19 +49,21 @@ index 222a283477a..320b87775b7 100644
/* Get a message from the current queue */
diff --git a/server/queue.c b/server/queue.c
index 784443ce955..0db4faab193 100644
index 94169a57db6..9695eceff28 100644
--- a/server/queue.c
+++ b/server/queue.c
@@ -2056,7 +2056,7 @@ static void dispatch_rawinput_message( struct desktop *desktop, struct rawinput_
@@ -2243,8 +2243,8 @@ static void dispatch_rawinput_message( struct desktop *desktop, struct rawinput_
}
/* queue a hardware message for a mouse event */
static int queue_mouse_message( struct desktop *desktop, user_handle_t win, const hw_input_t *input,
-static int queue_mouse_message( struct desktop *desktop, user_handle_t win, const union hw_input *input,
- unsigned int origin, struct msg_queue *sender )
+static int queue_mouse_message( struct desktop *desktop, user_handle_t win, const union hw_input *input,
+ unsigned int origin, struct msg_queue *sender, unsigned int send_flags )
{
const desktop_shm_t *desktop_shm = desktop->shared;
struct hardware_msg_data *msg_data;
@@ -2117,7 +2117,7 @@ static int queue_mouse_message( struct desktop *desktop, user_handle_t win, cons
@@ -2305,7 +2305,7 @@ static int queue_mouse_message( struct desktop *desktop, user_handle_t win, cons
y = desktop_shm->cursor.y;
}
@@ -68,7 +72,7 @@ index 784443ce955..0db4faab193 100644
{
memset( &raw_msg, 0, sizeof(raw_msg) );
raw_msg.foreground = foreground;
@@ -2132,6 +2132,8 @@ static int queue_mouse_message( struct desktop *desktop, user_handle_t win, cons
@@ -2320,6 +2320,8 @@ static int queue_mouse_message( struct desktop *desktop, user_handle_t win, cons
release_object( foreground );
}
@@ -77,11 +81,13 @@ index 784443ce955..0db4faab193 100644
for (i = 0; i < ARRAY_SIZE( messages ); i++)
{
if (!messages[i]) continue;
@@ -2162,14 +2164,14 @@ static int queue_mouse_message( struct desktop *desktop, user_handle_t win, cons
@@ -2349,15 +2351,15 @@ static int queue_mouse_message( struct desktop *desktop, user_handle_t win, cons
return wait;
}
static int queue_keyboard_message( struct desktop *desktop, user_handle_t win, const hw_input_t *input,
-static int queue_keyboard_message( struct desktop *desktop, user_handle_t win, const union hw_input *input,
- unsigned int origin, struct msg_queue *sender, int repeat );
+static int queue_keyboard_message( struct desktop *desktop, user_handle_t win, const union hw_input *input,
+ unsigned int origin, struct msg_queue *sender, int repeat, unsigned int send_flags);
static void key_repeat_timeout( void *private )
@@ -94,16 +100,18 @@ index 784443ce955..0db4faab193 100644
}
static void stop_key_repeat( struct desktop *desktop )
@@ -2182,7 +2184,7 @@ static void stop_key_repeat( struct desktop *desktop )
@@ -2369,8 +2371,8 @@ static void stop_key_repeat( struct desktop *desktop )
}
/* queue a hardware message for a keyboard event */
static int queue_keyboard_message( struct desktop *desktop, user_handle_t win, const hw_input_t *input,
-static int queue_keyboard_message( struct desktop *desktop, user_handle_t win, const union hw_input *input,
- unsigned int origin, struct msg_queue *sender, int repeat )
+static int queue_keyboard_message( struct desktop *desktop, user_handle_t win, const union hw_input *input,
+ unsigned int origin, struct msg_queue *sender, int repeat, unsigned int send_flags )
{
const desktop_shm_t *desktop_shm = desktop->shared;
struct hw_msg_source source = { IMDT_KEYBOARD, origin };
@@ -2305,7 +2307,7 @@ static int queue_keyboard_message( struct desktop *desktop, user_handle_t win, c
@@ -2493,7 +2495,7 @@ static int queue_keyboard_message( struct desktop *desktop, user_handle_t win, c
}
}
@@ -112,7 +120,7 @@ index 784443ce955..0db4faab193 100644
{
struct rawinput_message raw_msg = {0};
raw_msg.foreground = foreground;
@@ -2320,6 +2322,8 @@ static int queue_keyboard_message( struct desktop *desktop, user_handle_t win, c
@@ -2508,6 +2510,8 @@ static int queue_keyboard_message( struct desktop *desktop, user_handle_t win, c
release_object( foreground );
}
@@ -121,7 +129,7 @@ index 784443ce955..0db4faab193 100644
if (!(msg = alloc_hardware_message( input->kbd.info, source, time, 0 ))) return 0;
msg_data = msg->data;
@@ -3075,10 +3079,10 @@ DECL_HANDLER(send_hardware_message)
@@ -3294,10 +3298,10 @@ DECL_HANDLER(send_hardware_message)
switch (req->input.type)
{
case INPUT_MOUSE:
@@ -135,5 +143,5 @@ index 784443ce955..0db4faab193 100644
case INPUT_HARDWARE:
queue_custom_hardware_message( desktop, req->win, origin, &req->input );
--
2.43.0
2.45.2

View File

@@ -1,4 +1,4 @@
From 03ca1a439ace6f14b8551a5e9a83dec83872577f Mon Sep 17 00:00:00 2001
From 14dc22e926e64a1ab824278ba245caabe7e1449b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
Date: Thu, 19 Dec 2019 22:34:44 +0100
Subject: [PATCH] winex11: Keep track of mouse device and pointer button
@@ -17,10 +17,10 @@ Original patch by Andrew Eikum <aeikum@codeweavers.com>.
5 files changed, 114 insertions(+), 6 deletions(-)
diff --git a/configure.ac b/configure.ac
index d7d8411c1a3..720e016d0af 100644
index 51b453b9af4..7dcc220aecb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1203,6 +1203,7 @@ then
@@ -1209,6 +1209,7 @@ then
dnl *** All of the following tests require X11/Xlib.h
AC_CHECK_HEADERS([X11/extensions/shape.h \
@@ -29,7 +29,7 @@ index d7d8411c1a3..720e016d0af 100644
X11/extensions/XShm.h \
X11/extensions/Xfixes.h \
diff --git a/dlls/winex11.drv/keyboard.c b/dlls/winex11.drv/keyboard.c
index bb5bf6220e1..af0bdb54205 100644
index 7b7371ed696..fdca9d67e0b 100644
--- a/dlls/winex11.drv/keyboard.c
+++ b/dlls/winex11.drv/keyboard.c
@@ -1820,11 +1820,7 @@ BOOL X11DRV_ActivateKeyboardLayout(HKL hkl, UINT flags)
@@ -71,7 +71,7 @@ index bb5bf6220e1..af0bdb54205 100644
/***********************************************************************
* VkKeyScanEx (X11DRV.@)
diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c
index e513e302351..23ceb5eb00a 100644
index 501a8e5ebc2..ad8b86c1e61 100644
--- a/dlls/winex11.drv/mouse.c
+++ b/dlls/winex11.drv/mouse.c
@@ -31,6 +31,9 @@
@@ -175,7 +175,7 @@ index e513e302351..23ceb5eb00a 100644
#ifdef HAVE_X11_EXTENSIONS_XINPUT2_H
/***********************************************************************
* update_relative_valuators
@@ -1671,6 +1751,8 @@ static BOOL X11DRV_DeviceChanged( XGenericEventCookie *xev )
@@ -1664,6 +1744,8 @@ static BOOL X11DRV_DeviceChanged( XGenericEventCookie *xev )
if (event->deviceid != data->xinput2_pointer) return FALSE;
update_relative_valuators( event->classes, event->num_classes );
@@ -184,7 +184,7 @@ index e513e302351..23ceb5eb00a 100644
return TRUE;
}
@@ -1819,7 +1901,7 @@ static BOOL X11DRV_TouchEvent( HWND hwnd, XGenericEventCookie *xev )
@@ -1812,7 +1894,7 @@ static BOOL X11DRV_TouchEvent( HWND hwnd, XGenericEventCookie *xev )
*/
void x11drv_xinput2_load(void)
{
@@ -193,7 +193,7 @@ index e513e302351..23ceb5eb00a 100644
int event, error;
void *libxi_handle = dlopen( SONAME_LIBXI, RTLD_NOW );
@@ -1835,11 +1917,20 @@ void x11drv_xinput2_load(void)
@@ -1828,11 +1910,20 @@ void x11drv_xinput2_load(void)
return; \
}
@@ -215,19 +215,19 @@ index e513e302351..23ceb5eb00a 100644
xinput2_available = XQueryExtension( gdi_display, "XInputExtension", &xinput2_opcode, &event, &error );
diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h
index 1e669f9fe61..a6cfd5a483e 100644
index 625e37eecc5..fbc7efc4ffa 100644
--- a/dlls/winex11.drv/x11drv.h
+++ b/dlls/winex11.drv/x11drv.h
@@ -687,6 +687,7 @@ extern void reapply_cursor_clipping(void);
@@ -701,6 +701,7 @@ extern void reapply_cursor_clipping(void);
extern void ungrab_clipping_window(void);
extern void move_resize_window( HWND hwnd, int dir );
extern void move_resize_window( HWND hwnd, int dir, POINT pos );
extern void X11DRV_InitKeyboard( Display *display );
+extern void X11DRV_InitMouse( Display *display );
extern BOOL X11DRV_ProcessEvents( DWORD mask );
extern HWND *build_hwnd_list(void);
diff --git a/dlls/winex11.drv/x11drv_main.c b/dlls/winex11.drv/x11drv_main.c
index abc14032c61..d95c4761529 100644
index 7f05acccea6..40157645c53 100644
--- a/dlls/winex11.drv/x11drv_main.c
+++ b/dlls/winex11.drv/x11drv_main.c
@@ -672,6 +672,7 @@ static NTSTATUS x11drv_init( void *arg )

View File

@@ -1,478 +0,0 @@
From 9f1222c0cc241c9a3256403a637d16ffd26587fc Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Thu, 24 Oct 2024 07:08:51 +1100
Subject: [PATCH] Updated vkd3d to 91701f83035c0d67d1ab917e0f6b73f91e8583d4.
---
libs/vkd3d/libs/vkd3d-shader/d3dbc.c | 12 --
libs/vkd3d/libs/vkd3d-shader/dxil.c | 15 ---
libs/vkd3d/libs/vkd3d-shader/tpf.c | 12 --
.../libs/vkd3d-shader/vkd3d_shader_main.c | 105 +++++++++---------
.../libs/vkd3d-shader/vkd3d_shader_private.h | 6 -
libs/vkd3d/libs/vkd3d/device.c | 65 ++++++-----
libs/vkd3d/libs/vkd3d/resource.c | 14 ++-
libs/vkd3d/libs/vkd3d/state.c | 21 ++--
libs/vkd3d/libs/vkd3d/vkd3d_private.h | 23 ++--
9 files changed, 123 insertions(+), 150 deletions(-)
diff --git a/libs/vkd3d/libs/vkd3d-shader/d3dbc.c b/libs/vkd3d/libs/vkd3d-shader/d3dbc.c
index bbebf86e6d5..9e2eacbcfa6 100644
--- a/libs/vkd3d/libs/vkd3d-shader/d3dbc.c
+++ b/libs/vkd3d/libs/vkd3d-shader/d3dbc.c
@@ -1391,18 +1391,6 @@ int d3dbc_parse(const struct vkd3d_shader_compile_info *compile_info, uint64_t c
if (ret < 0)
{
- WARN("Failed to parse shader.\n");
- vsir_program_cleanup(program);
- return ret;
- }
-
- if ((ret = vkd3d_shader_parser_validate(&sm1.p, config_flags)) < 0)
- {
- WARN("Failed to validate shader after parsing, ret %d.\n", ret);
-
- if (TRACE_ON())
- vsir_program_trace(program);
-
vsir_program_cleanup(program);
return ret;
}
diff --git a/libs/vkd3d/libs/vkd3d-shader/dxil.c b/libs/vkd3d/libs/vkd3d-shader/dxil.c
index 570af5eca5a..3235a278769 100644
--- a/libs/vkd3d/libs/vkd3d-shader/dxil.c
+++ b/libs/vkd3d/libs/vkd3d-shader/dxil.c
@@ -10603,22 +10603,7 @@ int dxil_parse(const struct vkd3d_shader_compile_info *compile_info, uint64_t co
vkd3d_free(byte_code);
if (ret < 0)
- {
- WARN("Failed to parse shader.\n");
- return ret;
- }
-
- if ((ret = vkd3d_shader_parser_validate(&sm6.p, config_flags)) < 0)
- {
- WARN("Failed to validate shader after parsing, ret %d.\n", ret);
-
- if (TRACE_ON())
- vsir_program_trace(program);
-
- sm6_parser_cleanup(&sm6);
- vsir_program_cleanup(program);
return ret;
- }
sm6_parser_cleanup(&sm6);
diff --git a/libs/vkd3d/libs/vkd3d-shader/tpf.c b/libs/vkd3d/libs/vkd3d-shader/tpf.c
index f96d300676c..c937b245559 100644
--- a/libs/vkd3d/libs/vkd3d-shader/tpf.c
+++ b/libs/vkd3d/libs/vkd3d-shader/tpf.c
@@ -2964,22 +2964,10 @@ int tpf_parse(const struct vkd3d_shader_compile_info *compile_info, uint64_t con
if (sm4.p.failed)
{
- WARN("Failed to parse shader.\n");
vsir_program_cleanup(program);
return VKD3D_ERROR_INVALID_SHADER;
}
- if ((ret = vkd3d_shader_parser_validate(&sm4.p, config_flags)) < 0)
- {
- WARN("Failed to validate shader after parsing, ret %d.\n", ret);
-
- if (TRACE_ON())
- vsir_program_trace(program);
-
- vsir_program_cleanup(program);
- return ret;
- }
-
return VKD3D_OK;
}
diff --git a/libs/vkd3d/libs/vkd3d-shader/vkd3d_shader_main.c b/libs/vkd3d/libs/vkd3d-shader/vkd3d_shader_main.c
index ca012d4948a..3355e18b88e 100644
--- a/libs/vkd3d/libs/vkd3d-shader/vkd3d_shader_main.c
+++ b/libs/vkd3d/libs/vkd3d-shader/vkd3d_shader_main.c
@@ -489,13 +489,13 @@ static void vkd3d_shader_dump_shader(const struct shader_dump_data *dump_data,
if ((f = fopen(filename, "wb")))
{
if (fwrite(data, 1, size, f) != size)
- ERR("Failed to write shader to %s.\n", filename);
+ WARN("Failed to write shader to %s.\n", filename);
if (fclose(f))
- ERR("Failed to close stream %s.\n", filename);
+ WARN("Failed to close stream %s.\n", filename);
}
else
{
- ERR("Failed to open %s for dumping shader.\n", filename);
+ WARN("Failed to open %s for dumping shader.\n", filename);
}
}
@@ -680,6 +680,50 @@ static int vkd3d_shader_validate_compile_info(const struct vkd3d_shader_compile_
return VKD3D_OK;
}
+static enum vkd3d_result vsir_parse(const struct vkd3d_shader_compile_info *compile_info, uint64_t config_flags,
+ struct vkd3d_shader_message_context *message_context, struct vsir_program *program)
+{
+ enum vkd3d_result ret;
+
+ switch (compile_info->source_type)
+ {
+ case VKD3D_SHADER_SOURCE_D3D_BYTECODE:
+ ret = d3dbc_parse(compile_info, config_flags, message_context, program);
+ break;
+
+ case VKD3D_SHADER_SOURCE_DXBC_TPF:
+ ret = tpf_parse(compile_info, config_flags, message_context, program);
+ break;
+
+ case VKD3D_SHADER_SOURCE_DXBC_DXIL:
+ ret = dxil_parse(compile_info, config_flags, message_context, program);
+ break;
+
+ default:
+ ERR("Unsupported source type %#x.\n", compile_info->source_type);
+ ret = VKD3D_ERROR_INVALID_ARGUMENT;
+ break;
+ }
+
+ if (ret < 0)
+ {
+ WARN("Failed to parse shader.\n");
+ return ret;
+ }
+
+ if ((ret = vsir_program_validate(program, config_flags, compile_info->source_name, message_context)) < 0)
+ {
+ WARN("Failed to validate shader after parsing, ret %d.\n", ret);
+
+ if (TRACE_ON())
+ vsir_program_trace(program);
+
+ vsir_program_cleanup(program);
+ }
+
+ return ret;
+}
+
void vkd3d_shader_free_messages(char *messages)
{
TRACE("messages %p.\n", messages);
@@ -1578,31 +1622,7 @@ int vkd3d_shader_scan(const struct vkd3d_shader_compile_info *compile_info, char
uint64_t config_flags = vkd3d_shader_init_config_flags();
struct vsir_program program;
- switch (compile_info->source_type)
- {
- case VKD3D_SHADER_SOURCE_D3D_BYTECODE:
- ret = d3dbc_parse(compile_info, config_flags, &message_context, &program);
- break;
-
- case VKD3D_SHADER_SOURCE_DXBC_TPF:
- ret = tpf_parse(compile_info, config_flags, &message_context, &program);
- break;
-
- case VKD3D_SHADER_SOURCE_DXBC_DXIL:
- ret = dxil_parse(compile_info, config_flags, &message_context, &program);
- break;
-
- default:
- ERR("Unsupported source type %#x.\n", compile_info->source_type);
- ret = VKD3D_ERROR_INVALID_ARGUMENT;
- break;
- }
-
- if (ret < 0)
- {
- WARN("Failed to parse shader.\n");
- }
- else
+ if (!(ret = vsir_parse(compile_info, config_flags, &message_context, &program)))
{
ret = vsir_program_scan(&program, compile_info, &message_context, NULL);
vsir_program_cleanup(&program);
@@ -1719,38 +1739,15 @@ int vkd3d_shader_compile(const struct vkd3d_shader_compile_info *compile_info,
uint64_t config_flags = vkd3d_shader_init_config_flags();
struct vsir_program program;
- switch (compile_info->source_type)
- {
- case VKD3D_SHADER_SOURCE_D3D_BYTECODE:
- ret = d3dbc_parse(compile_info, config_flags, &message_context, &program);
- break;
-
- case VKD3D_SHADER_SOURCE_DXBC_TPF:
- ret = tpf_parse(compile_info, config_flags, &message_context, &program);
- break;
-
- case VKD3D_SHADER_SOURCE_DXBC_DXIL:
- ret = dxil_parse(compile_info, config_flags, &message_context, &program);
- break;
-
- default:
- ERR("Unsupported source type %#x.\n", compile_info->source_type);
- ret = VKD3D_ERROR_INVALID_ARGUMENT;
- break;
- }
-
- if (ret < 0)
- {
- WARN("Failed to parse shader.\n");
- }
- else
+ if (!(ret = vsir_parse(compile_info, config_flags, &message_context, &program)))
{
ret = vsir_program_compile(&program, config_flags, compile_info, out, &message_context);
vsir_program_cleanup(&program);
}
}
- vkd3d_shader_dump_shader(&dump_data, out->code, out->size, false);
+ if (ret >= 0)
+ vkd3d_shader_dump_shader(&dump_data, out->code, out->size, false);
vkd3d_shader_message_context_trace_messages(&message_context);
if (!vkd3d_shader_message_context_copy_messages(&message_context, messages))
diff --git a/libs/vkd3d/libs/vkd3d-shader/vkd3d_shader_private.h b/libs/vkd3d/libs/vkd3d-shader/vkd3d_shader_private.h
index d6c68155ee7..5ae938e0525 100644
--- a/libs/vkd3d/libs/vkd3d-shader/vkd3d_shader_private.h
+++ b/libs/vkd3d/libs/vkd3d-shader/vkd3d_shader_private.h
@@ -1477,12 +1477,6 @@ void vkd3d_shader_parser_init(struct vkd3d_shader_parser *parser, struct vsir_pr
void vkd3d_shader_parser_warning(struct vkd3d_shader_parser *parser,
enum vkd3d_shader_error error, const char *format, ...) VKD3D_PRINTF_FUNC(3, 4);
-static inline enum vkd3d_result vkd3d_shader_parser_validate(struct vkd3d_shader_parser *parser, uint64_t config_flags)
-{
- return vsir_program_validate(parser->program, config_flags,
- parser->location.source_name, parser->message_context);
-}
-
struct vkd3d_shader_descriptor_info1
{
enum vkd3d_shader_descriptor_type type;
diff --git a/libs/vkd3d/libs/vkd3d/device.c b/libs/vkd3d/libs/vkd3d/device.c
index fd0ca20838f..54a39e18a0f 100644
--- a/libs/vkd3d/libs/vkd3d/device.c
+++ b/libs/vkd3d/libs/vkd3d/device.c
@@ -136,7 +136,8 @@ static HRESULT vkd3d_create_vk_descriptor_heap_layout(struct d3d12_device *devic
VK_DESCRIPTOR_TYPE_STORAGE_IMAGE,
};
- if (device->vk_info.EXT_mutable_descriptor_type && index && index != VKD3D_SET_INDEX_UAV_COUNTER
+ if (device->vk_info.EXT_mutable_descriptor_type
+ && index != VKD3D_SET_INDEX_MUTABLE && index != VKD3D_SET_INDEX_UAV_COUNTER
&& device->vk_descriptor_heap_layouts[index].applicable_heap_type == D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV)
{
device->vk_descriptor_heap_layouts[index].vk_set_layout = VK_NULL_HANDLE;
@@ -144,7 +145,7 @@ static HRESULT vkd3d_create_vk_descriptor_heap_layout(struct d3d12_device *devic
}
binding.binding = 0;
- binding.descriptorType = (device->vk_info.EXT_mutable_descriptor_type && !index)
+ binding.descriptorType = (device->vk_info.EXT_mutable_descriptor_type && index == VKD3D_SET_INDEX_MUTABLE)
? VK_DESCRIPTOR_TYPE_MUTABLE_EXT : device->vk_descriptor_heap_layouts[index].type;
binding.descriptorCount = device->vk_descriptor_heap_layouts[index].count;
binding.stageFlags = VK_SHADER_STAGE_ALL;
@@ -200,14 +201,20 @@ static HRESULT vkd3d_vk_descriptor_heap_layouts_init(struct d3d12_device *device
{
static const struct vkd3d_vk_descriptor_heap_layout vk_descriptor_heap_layouts[VKD3D_SET_INDEX_COUNT] =
{
- {VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, true, D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV},
- {VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER, true, D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV},
- {VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, false, D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV},
- {VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER, true, D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV},
- {VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, false, D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV},
- {VK_DESCRIPTOR_TYPE_SAMPLER, false, D3D12_DESCRIPTOR_HEAP_TYPE_SAMPLER},
- /* UAV counters */
- {VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER, true, D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV},
+ [VKD3D_SET_INDEX_UNIFORM_BUFFER] =
+ {VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, true, D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV},
+ [VKD3D_SET_INDEX_UNIFORM_TEXEL_BUFFER] =
+ {VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER, true, D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV},
+ [VKD3D_SET_INDEX_SAMPLED_IMAGE] =
+ {VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, false, D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV},
+ [VKD3D_SET_INDEX_STORAGE_TEXEL_BUFFER] =
+ {VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER, true, D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV},
+ [VKD3D_SET_INDEX_STORAGE_IMAGE] =
+ {VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, false, D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV},
+ [VKD3D_SET_INDEX_SAMPLER] =
+ {VK_DESCRIPTOR_TYPE_SAMPLER, false, D3D12_DESCRIPTOR_HEAP_TYPE_SAMPLER},
+ [VKD3D_SET_INDEX_UAV_COUNTER] =
+ {VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER, true, D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV},
};
const struct vkd3d_device_descriptor_limits *limits = &device->vk_info.descriptor_limits;
enum vkd3d_vk_descriptor_set_index set;
@@ -1918,24 +1925,26 @@ static HRESULT vkd3d_init_device_caps(struct d3d12_device *device,
&& descriptor_indexing->descriptorBindingUniformTexelBufferUpdateAfterBind
&& descriptor_indexing->descriptorBindingStorageTexelBufferUpdateAfterBind;
- /* Many Vulkan implementations allow up to 8 descriptor sets. Unfortunately
- * using vkd3d with Vulkan heaps and push descriptors currently requires up
- * to 9 descriptor sets (up to one for the push descriptors, up to one for
- * the static samplers and seven for Vulkan heaps, one for each needed
- * descriptor type). If we detect such situation, we disable push
- * descriptors, which allows us to stay within the limits (not doing so is
- * fatal on many implmentations).
- *
- * It is possible that a different strategy might be used. For example, we
- * could move the static samplers to one of the seven Vulkan heaps sets. Or
- * we could decide whether to create the push descriptor set when creating
- * the root signature, depending on whether there are static samplers or
- * not. */
- if (device->vk_info.device_limits.maxBoundDescriptorSets == 8 && device->use_vk_heaps
- && device->vk_info.KHR_push_descriptor)
- {
- TRACE("Disabling VK_KHR_push_descriptor to save a descriptor set.\n");
- device->vk_info.KHR_push_descriptor = VK_FALSE;
+ if (device->use_vk_heaps && device->vk_info.KHR_push_descriptor)
+ {
+ /* VKD3D_SET_INDEX_COUNT for the Vulkan heaps, one for the push
+ * descriptors set and one for the static samplers set. */
+ unsigned int descriptor_set_count = VKD3D_SET_INDEX_COUNT + 2;
+
+ /* A mutable descriptor set can replace all those that should otherwise
+ * back the SRV-UAV-CBV descriptor heap. */
+ if (device->vk_info.EXT_mutable_descriptor_type)
+ descriptor_set_count -= VKD3D_SET_INDEX_COUNT - (VKD3D_SET_INDEX_MUTABLE + 1);
+
+ /* For many Vulkan implementations maxBoundDescriptorSets == 8; also,
+ * if mutable descriptors are not available the descriptor set count
+ * will be 9; so saving a descriptor set is going to be often
+ * significant. */
+ if (descriptor_set_count > device->vk_info.device_limits.maxBoundDescriptorSets)
+ {
+ WARN("Disabling VK_KHR_push_descriptor to save a descriptor set.\n");
+ device->vk_info.KHR_push_descriptor = VK_FALSE;
+ }
}
if (device->use_vk_heaps)
diff --git a/libs/vkd3d/libs/vkd3d/resource.c b/libs/vkd3d/libs/vkd3d/resource.c
index 6d6820d3752..1f7d90eb95f 100644
--- a/libs/vkd3d/libs/vkd3d/resource.c
+++ b/libs/vkd3d/libs/vkd3d/resource.c
@@ -2498,7 +2498,7 @@ static void d3d12_desc_write_vk_heap_null_descriptor(struct d3d12_descriptor_hea
enum vkd3d_vk_descriptor_set_index set, end;
unsigned int i = writes->count;
- end = device->vk_info.EXT_mutable_descriptor_type ? VKD3D_SET_INDEX_UNIFORM_BUFFER
+ end = device->vk_info.EXT_mutable_descriptor_type ? VKD3D_SET_INDEX_MUTABLE
: VKD3D_SET_INDEX_STORAGE_IMAGE;
/* Binding a shader with the wrong null descriptor type works in Windows.
* To support that here we must write one to all applicable Vulkan sets. */
@@ -4250,7 +4250,8 @@ static HRESULT d3d12_descriptor_heap_create_descriptor_pool(struct d3d12_descrip
if (device->vk_descriptor_heap_layouts[set].applicable_heap_type == desc->Type
&& device->vk_descriptor_heap_layouts[set].vk_set_layout)
{
- pool_sizes[pool_desc.poolSizeCount].type = (device->vk_info.EXT_mutable_descriptor_type && !set)
+ pool_sizes[pool_desc.poolSizeCount].type =
+ (device->vk_info.EXT_mutable_descriptor_type && set == VKD3D_SET_INDEX_MUTABLE)
? VK_DESCRIPTOR_TYPE_MUTABLE_EXT : device->vk_descriptor_heap_layouts[set].type;
pool_sizes[pool_desc.poolSizeCount++].descriptorCount = desc->NumDescriptors;
}
@@ -4280,11 +4281,12 @@ static HRESULT d3d12_descriptor_heap_create_descriptor_set(struct d3d12_descript
if (!device->vk_descriptor_heap_layouts[set].vk_set_layout)
{
- /* Set 0 uses mutable descriptors, and this set is unused. */
- if (!descriptor_heap->vk_descriptor_sets[0].vk_set
- && FAILED(hr = d3d12_descriptor_heap_create_descriptor_set(descriptor_heap, device, 0)))
+ /* Mutable descriptors are in use, and this set is unused. */
+ if (!descriptor_heap->vk_descriptor_sets[VKD3D_SET_INDEX_MUTABLE].vk_set
+ && FAILED(hr = d3d12_descriptor_heap_create_descriptor_set(descriptor_heap,
+ device, VKD3D_SET_INDEX_MUTABLE)))
return hr;
- descriptor_set->vk_set = descriptor_heap->vk_descriptor_sets[0].vk_set;
+ descriptor_set->vk_set = descriptor_heap->vk_descriptor_sets[VKD3D_SET_INDEX_MUTABLE].vk_set;
descriptor_set->vk_type = device->vk_descriptor_heap_layouts[set].type;
return S_OK;
}
diff --git a/libs/vkd3d/libs/vkd3d/state.c b/libs/vkd3d/libs/vkd3d/state.c
index 8e5ec70a577..e7476a01bd7 100644
--- a/libs/vkd3d/libs/vkd3d/state.c
+++ b/libs/vkd3d/libs/vkd3d/state.c
@@ -1016,7 +1016,7 @@ static void vkd3d_descriptor_heap_binding_from_descriptor_range(const struct d3d
}
else
{
- binding->set = 0;
+ binding->set = VKD3D_SET_INDEX_MUTABLE;
descriptor_set_size = descriptor_limits->sampled_image_max_descriptors;
}
}
@@ -1483,21 +1483,24 @@ static unsigned int d3d12_root_signature_copy_descriptor_set_layouts(const struc
{
const struct d3d12_device *device = root_signature->device;
enum vkd3d_vk_descriptor_set_index set;
+ VkDescriptorSetLayout vk_set_layout;
unsigned int i;
for (i = 0; i < root_signature->vk_set_count; ++i)
vk_set_layouts[i] = root_signature->descriptor_set_layouts[i].vk_layout;
- if (device->use_vk_heaps)
+ if (!device->use_vk_heaps)
+ return i;
+
+ for (set = 0; set < ARRAY_SIZE(device->vk_descriptor_heap_layouts); ++set)
{
- VkDescriptorSetLayout mutable_layout = device->vk_descriptor_heap_layouts[0].vk_set_layout;
+ vk_set_layout = device->vk_descriptor_heap_layouts[set].vk_set_layout;
- for (set = 0; set < ARRAY_SIZE(device->vk_descriptor_heap_layouts); ++set)
- {
- VkDescriptorSetLayout vk_set_layout = device->vk_descriptor_heap_layouts[set].vk_set_layout;
- /* All layouts must be valid, so if null, just set it to the mutable one. */
- vk_set_layouts[i++] = vk_set_layout ? vk_set_layout : mutable_layout;
- }
+ VKD3D_ASSERT(vk_set_layout);
+ vk_set_layouts[i++] = vk_set_layout;
+
+ if (device->vk_info.EXT_mutable_descriptor_type && set == VKD3D_SET_INDEX_MUTABLE)
+ break;
}
return i;
diff --git a/libs/vkd3d/libs/vkd3d/vkd3d_private.h b/libs/vkd3d/libs/vkd3d/vkd3d_private.h
index e6d477a5c12..97a99782d6a 100644
--- a/libs/vkd3d/libs/vkd3d/vkd3d_private.h
+++ b/libs/vkd3d/libs/vkd3d/vkd3d_private.h
@@ -772,14 +772,21 @@ void d3d12_dsv_desc_create_dsv(struct d3d12_dsv_desc *dsv_desc, struct d3d12_dev
enum vkd3d_vk_descriptor_set_index
{
- VKD3D_SET_INDEX_UNIFORM_BUFFER = 0,
- VKD3D_SET_INDEX_UNIFORM_TEXEL_BUFFER = 1,
- VKD3D_SET_INDEX_SAMPLED_IMAGE = 2,
- VKD3D_SET_INDEX_STORAGE_TEXEL_BUFFER = 3,
- VKD3D_SET_INDEX_STORAGE_IMAGE = 4,
- VKD3D_SET_INDEX_SAMPLER = 5,
- VKD3D_SET_INDEX_UAV_COUNTER = 6,
- VKD3D_SET_INDEX_COUNT = 7
+ VKD3D_SET_INDEX_SAMPLER,
+ VKD3D_SET_INDEX_UAV_COUNTER,
+ VKD3D_SET_INDEX_MUTABLE,
+
+ /* These are used when mutable descriptors are not available to back
+ * SRV-UAV-CBV descriptor heaps. They must stay at the end of this
+ * enumeration, so that they can be ignored when mutable descriptors are
+ * used. */
+ VKD3D_SET_INDEX_UNIFORM_BUFFER = VKD3D_SET_INDEX_MUTABLE,
+ VKD3D_SET_INDEX_UNIFORM_TEXEL_BUFFER,
+ VKD3D_SET_INDEX_SAMPLED_IMAGE,
+ VKD3D_SET_INDEX_STORAGE_TEXEL_BUFFER,
+ VKD3D_SET_INDEX_STORAGE_IMAGE,
+
+ VKD3D_SET_INDEX_COUNT
};
extern const enum vkd3d_vk_descriptor_set_index vk_descriptor_set_index_table[];
--
2.45.2

Some files were not shown because too many files have changed in this diff Show More