Compare commits

..

15 Commits
v9.5 ... v9.6

Author SHA1 Message Date
Alistair Leslie-Hughes
506d9500b8 Release v9.6 2024-04-06 12:01:11 +11:00
Alistair Leslie-Hughes
6839d5b534 Updated vkd3d-latest patchset 2024-04-05 10:27:32 +11:00
Alistair Leslie-Hughes
9d59c4b21a Updated ntdll-WRITECOPY patchset
This extra patch allows Battle.net once again.
2024-04-05 10:27:32 +11:00
Alistair Leslie-Hughes
ac31c3f5c5 Updated vkd3d-latest patchset 2024-04-05 10:27:32 +11:00
Zebediah Figura
a1057e16a6 widl-SLTG_Typelib_Support: Delete upstreamed patches. 2024-04-04 13:21:17 -05:00
Alistair Leslie-Hughes
bcf38efc5b Rebase against a2c20d0e93290b3f998ad78c7aeaed8028aee2da. 2024-03-30 05:37:35 +11:00
Alistair Leslie-Hughes
320847e6f5 Updated vkd3d-latest patchset
Squashed to previous wine-staging release
Add latest changes.
2024-03-28 10:43:34 +11:00
Zebediah Figura
5d8ef8d881 Rebase against e01cb2b9156f808acc279a1b4753a48de0fda327. 2024-03-27 18:08:14 -05:00
Zebediah Figura
fdd0f9a334 mfplat-streaming-support: Remove patch 0055.
Addressed upstream by ea4b9bafb2f18ae0805c166e49bbb03641fc066c.
2024-03-27 13:53:01 -05:00
Alistair Leslie-Hughes
3ed5b91e33 Rebase against 4573910acc2783a3f678a428aa313377b09a04e8. 2024-03-27 11:44:08 +11:00
Alistair Leslie-Hughes
f3b50676a1 Rebase against cf08bbaa0f95f40b972b330e1ee687e2cac0501c.
Update the commit it, so the macos build should work again.
2024-03-26 14:37:08 +11:00
Alistair Leslie-Hughes
4ca74ae0ca Revert "macOS.yml: Set ac_cv_lib_soname_vulkan"
This reverts commit 810ecd4aab.

Fixed upstream.
2024-03-26 09:22:55 +11:00
Alistair Leslie-Hughes
1219be1be0 Updated windows.networking.connectivity-new-dll patchset
Registry all the interfaces
2024-03-25 08:50:14 +11:00
Alistair Leslie-Hughes
9dc6767d18 Updated windows.networking.connectivity-new-dll patchset
Correctly append the .dll onto the filename.

Ref: https://bugs.winehq.org/show_bug.cgi?id=46534
2024-03-24 08:16:31 +11:00
Dean M Greer
810ecd4aab macOS.yml: Set ac_cv_lib_soname_vulkan 2024-03-23 09:41:22 +00:00
39 changed files with 12654 additions and 12806 deletions

View File

@@ -1,4 +1,4 @@
From 0a5214d0fe032778fa3ca4ee60c3d2ba64f8f4c0 Mon Sep 17 00:00:00 2001
From 2c5da9b35cb387a1ca09fe49f662189536ee664a Mon Sep 17 00:00:00 2001
From: Matthew Wong <itsmattkc@gmail.com>
Date: Fri, 18 Sep 2020 00:47:13 +0000
Subject: [PATCH] ddraw: Implement Pick() and GetPickRecords().
@@ -31,16 +31,16 @@ Signed-off-by: Matthew Wong <itsmattkc@gmail.com>
Signed-off-by: Myah Caron <qsniyg@protonmail.com>
---
dlls/ddraw/ddraw_private.h | 7 +-
dlls/ddraw/device.c | 67 ++++++++++++--
dlls/ddraw/device.c | 77 ++++++++++++----
dlls/ddraw/executebuffer.c | 176 ++++++++++++++++++++++++++++++++++++-
dlls/ddraw/tests/ddraw1.c | 133 ++++++++++++++++++++++++++++
4 files changed, 373 insertions(+), 10 deletions(-)
4 files changed, 372 insertions(+), 21 deletions(-)
diff --git a/dlls/ddraw/ddraw_private.h b/dlls/ddraw/ddraw_private.h
index 6fc93b91860..c90b894ea61 100644
index 1f0c94a9c6e..157384e3579 100644
--- a/dlls/ddraw/ddraw_private.h
+++ b/dlls/ddraw/ddraw_private.h
@@ -338,6 +338,11 @@ struct d3d_device
@@ -337,6 +337,11 @@ struct d3d_device
struct d3d_viewport *current_viewport;
D3DVIEWPORT7 active_viewport;
@@ -52,7 +52,7 @@ index 6fc93b91860..c90b894ea61 100644
/* Required to keep track which of two available texture blending modes in d3ddevice3 is used */
BOOL legacyTextureBlending;
D3DTEXTUREBLEND texture_map_blend;
@@ -571,7 +576,7 @@ struct d3d_execute_buffer *unsafe_impl_from_IDirect3DExecuteBuffer(IDirect3DExec
@@ -573,7 +578,7 @@ struct d3d_execute_buffer *unsafe_impl_from_IDirect3DExecuteBuffer(IDirect3DExec
/* The execute function */
HRESULT d3d_execute_buffer_execute(struct d3d_execute_buffer *execute_buffer,
@@ -62,20 +62,30 @@ index 6fc93b91860..c90b894ea61 100644
/*****************************************************************************
* IDirect3DVertexBuffer
diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c
index bc1d91ee00b..82a813f9064 100644
index f64db3aa633..fe29bf0d16e 100644
--- a/dlls/ddraw/device.c
+++ b/dlls/ddraw/device.c
@@ -349,6 +349,9 @@ static ULONG WINAPI d3d_device_inner_Release(IUnknown *iface)
@@ -321,17 +321,8 @@ static ULONG WINAPI d3d_device_inner_Release(IUnknown *iface)
IDirect3DDevice3_DeleteViewport(&This->IDirect3DDevice3_iface, &vp->IDirect3DViewport3_iface);
}
- wined3d_stateblock_decref(This->state);
- if (This->recording)
- wined3d_stateblock_decref(This->recording);
-
- /* Releasing the render target below may release the last reference to the ddraw object. Detach
- * the device from it before so it doesn't try to save / restore state on the teared down device. */
- if (This->ddraw)
- {
- list_remove(&This->ddraw_entry);
- This->ddraw = NULL;
- }
+ if (This->pick_record_size > 0)
+ free(This->pick_records);
+
TRACE("Releasing render target %p.\n", This->rt_iface);
rt_iface = This->rt_iface;
This->rt_iface = NULL;
@@ -758,7 +761,7 @@ static HRESULT WINAPI d3d_device1_Execute(IDirect3DDevice *iface,
@@ -739,7 +730,7 @@ static HRESULT WINAPI d3d_device1_Execute(IDirect3DDevice *iface,
/* Execute... */
wined3d_mutex_lock();
@@ -84,7 +94,7 @@ index bc1d91ee00b..82a813f9064 100644
wined3d_mutex_unlock();
return hr;
@@ -1025,16 +1028,44 @@ static HRESULT WINAPI d3d_device1_NextViewport(IDirect3DDevice *iface,
@@ -1006,16 +997,44 @@ static HRESULT WINAPI d3d_device1_NextViewport(IDirect3DDevice *iface,
* x2 and y2 are ignored.
*
* Returns:
@@ -133,7 +143,7 @@ index bc1d91ee00b..82a813f9064 100644
}
/*****************************************************************************
@@ -1050,13 +1081,35 @@ static HRESULT WINAPI d3d_device1_Pick(IDirect3DDevice *iface, IDirect3DExecuteB
@@ -1031,13 +1050,35 @@ static HRESULT WINAPI d3d_device1_Pick(IDirect3DDevice *iface, IDirect3DExecuteB
* D3DPickRec: Address to store the resulting D3DPICKRECORD array.
*
* Returns:
@@ -172,7 +182,7 @@ index bc1d91ee00b..82a813f9064 100644
return D3D_OK;
}
diff --git a/dlls/ddraw/executebuffer.c b/dlls/ddraw/executebuffer.c
index 320ce6649d4..84366dafd7d 100644
index 0cf0bf121f3..89915fb7145 100644
--- a/dlls/ddraw/executebuffer.c
+++ b/dlls/ddraw/executebuffer.c
@@ -45,15 +45,106 @@ static void _dump_D3DEXECUTEBUFFERDESC(const D3DEXECUTEBUFFERDESC *lpDesc) {
@@ -378,7 +388,7 @@ index 320ce6649d4..84366dafd7d 100644
/* Drop through. */
case 2:
indices[(i * primitive_size) + 1] = ci->v2;
@@ -426,6 +597,7 @@ HRESULT d3d_execute_buffer_execute(struct d3d_execute_buffer *buffer, struct d3d
@@ -424,6 +595,7 @@ HRESULT d3d_execute_buffer_execute(struct d3d_execute_buffer *buffer, struct d3d
end_of_buffer:
return D3D_OK;
}
@@ -387,7 +397,7 @@ index 320ce6649d4..84366dafd7d 100644
static inline struct d3d_execute_buffer *impl_from_IDirect3DExecuteBuffer(IDirect3DExecuteBuffer *iface)
{
diff --git a/dlls/ddraw/tests/ddraw1.c b/dlls/ddraw/tests/ddraw1.c
index d8fcb188c40..bacd9049d6e 100644
index 0940aa8d78a..faf4e2b7694 100644
--- a/dlls/ddraw/tests/ddraw1.c
+++ b/dlls/ddraw/tests/ddraw1.c
@@ -15467,6 +15467,137 @@ static void test_enum_devices(void)
@@ -536,7 +546,7 @@ index d8fcb188c40..bacd9049d6e 100644
DestroyWindow(window);
}
@@ -15646,6 +15778,7 @@ START_TEST(ddraw1)
@@ -15749,6 +15881,7 @@ START_TEST(ddraw1)
test_vtbl_protection();
test_window_position();
test_get_display_mode();

View File

@@ -1,153 +0,0 @@
From 8caf8262a8ae8b5f0275172a62d807240d86968d Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Sun, 29 Aug 2021 13:26:53 +1000
Subject: [PATCH 1/3] fltmgr.sys: Implement FltBuildDefaultSecurityDescriptor
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
---
dlls/fltmgr.sys/Makefile.in | 1 +
dlls/fltmgr.sys/fltmgr.sys.spec | 4 +-
dlls/fltmgr.sys/main.c | 75 ++++++++++++++++++++++++++++++++-
include/ddk/fltkernel.h | 3 +-
4 files changed, 79 insertions(+), 4 deletions(-)
diff --git a/dlls/fltmgr.sys/Makefile.in b/dlls/fltmgr.sys/Makefile.in
index 6ebd48d9412..ae0e812cb22 100644
--- a/dlls/fltmgr.sys/Makefile.in
+++ b/dlls/fltmgr.sys/Makefile.in
@@ -1,5 +1,6 @@
MODULE = fltmgr.sys
EXTRADLLFLAGS = -Wl,--subsystem,native
+IMPORTS = ntoskrnl
SOURCES = \
fltmgr.sys.spec \
diff --git a/dlls/fltmgr.sys/fltmgr.sys.spec b/dlls/fltmgr.sys/fltmgr.sys.spec
index 39ce6798178..8943b9f85cf 100644
--- a/dlls/fltmgr.sys/fltmgr.sys.spec
+++ b/dlls/fltmgr.sys/fltmgr.sys.spec
@@ -10,7 +10,7 @@
@ stub FltAllocatePoolAlignedWithTag
@ stub FltAttachVolume
@ stub FltAttachVolumeAtAltitude
-@ stub FltBuildDefaultSecurityDescriptor
+@ stdcall FltBuildDefaultSecurityDescriptor(ptr long)
@ stub FltCancelFileOpen
@ stub FltCancelIo
@ stub FltCbdqDisable
@@ -60,7 +60,7 @@
@ stub FltFreeFileLock
@ stub FltFreeGenericWorkItem
@ stub FltFreePoolAlignedWithTag
-@ stub FltFreeSecurityDescriptor
+@ stdcall FltFreeSecurityDescriptor(ptr)
@ stub FltFsControlFile
@ stub FltGetBottomInstance
@ stub FltGetContexts
diff --git a/dlls/fltmgr.sys/main.c b/dlls/fltmgr.sys/main.c
index e1016a4989c..9a85f4b6c82 100644
--- a/dlls/fltmgr.sys/main.c
+++ b/dlls/fltmgr.sys/main.c
@@ -23,7 +23,6 @@
#include "ntstatus.h"
#define WIN32_NO_STATUS
#include "windef.h"
-#include "winbase.h"
#include "winternl.h"
#include "ddk/fltkernel.h"
@@ -93,3 +92,77 @@ void* WINAPI FltGetRoutineAddress(LPCSTR name)
return func;
}
+
+NTSTATUS WINAPI FltBuildDefaultSecurityDescriptor(PSECURITY_DESCRIPTOR *descriptor, ACCESS_MASK access)
+{
+ PACL dacl;
+ NTSTATUS ret = STATUS_INSUFFICIENT_RESOURCES;
+ DWORD sid_len;
+ SID *sid;
+ SID *sid_system = NULL;
+ PSECURITY_DESCRIPTOR sec_desc = NULL;
+ SID_IDENTIFIER_AUTHORITY auth = { SECURITY_NULL_SID_AUTHORITY };
+
+ *descriptor = NULL;
+
+ sid_len = RtlLengthRequiredSid(2);
+ sid = ExAllocatePool(PagedPool, sid_len);
+ if (!sid)
+ goto done;
+ RtlInitializeSid(sid, &auth, 2);
+ sid->SubAuthority[1] = DOMAIN_GROUP_RID_ADMINS;
+ sid->SubAuthority[0] = SECURITY_BUILTIN_DOMAIN_RID;
+
+ sid_len = RtlLengthRequiredSid(1);
+ sid_system = ExAllocatePool(PagedPool, sid_len);
+ if (!sid_system)
+ goto done;
+ RtlInitializeSid(sid_system, &auth, 1);
+ sid_system->SubAuthority[0] = SECURITY_LOCAL_SYSTEM_RID;
+
+ sid_len = SECURITY_DESCRIPTOR_MIN_LENGTH + sizeof(ACL) +
+ sizeof(ACCESS_ALLOWED_ACE) + RtlLengthSid(sid) +
+ sizeof(ACCESS_ALLOWED_ACE) + RtlLengthSid(sid_system);
+
+ sec_desc = ExAllocatePool(PagedPool, sid_len);
+ if (!sec_desc)
+ {
+ ret = STATUS_NO_MEMORY;
+ goto done;
+ }
+
+ ret = RtlCreateSecurityDescriptor(sec_desc, SECURITY_DESCRIPTOR_REVISION);
+ if (ret != STATUS_SUCCESS)
+ goto done;
+
+ dacl = (PACL)((char*)sec_desc + SECURITY_DESCRIPTOR_MIN_LENGTH);
+ ret = RtlCreateAcl(dacl, sid_len - SECURITY_DESCRIPTOR_MIN_LENGTH, ACL_REVISION);
+ if (ret != STATUS_SUCCESS)
+ goto done;
+
+ ret = RtlAddAccessAllowedAce(dacl, ACL_REVISION, access, sid);
+ if (ret != STATUS_SUCCESS)
+ goto done;
+
+ ret = RtlAddAccessAllowedAce(dacl, ACL_REVISION, access, sid_system);
+ if (ret != STATUS_SUCCESS)
+ goto done;
+
+ ret = RtlSetDaclSecurityDescriptor(sec_desc, 1, dacl, 0);
+ if (ret == STATUS_SUCCESS)
+ *descriptor = sec_desc;
+
+done:
+ if (ret != STATUS_SUCCESS)
+ ExFreePool(sec_desc);
+
+ ExFreePool(sid);
+ ExFreePool(sid_system);
+
+ return ret;
+}
+
+void WINAPI FltFreeSecurityDescriptor(PSECURITY_DESCRIPTOR descriptor)
+{
+ ExFreePool(descriptor);
+}
diff --git a/include/ddk/fltkernel.h b/include/ddk/fltkernel.h
index 49c9d55dbaa..e5483d5a3fa 100644
--- a/include/ddk/fltkernel.h
+++ b/include/ddk/fltkernel.h
@@ -653,7 +653,8 @@ typedef struct _FLT_REGISTRATION
PFLT_SECTION_CONFLICT_NOTIFICATION_CALLBACK SectionNotificationCallback;
} FLT_REGISTRATION, *PFLT_REGISTRATION;
-
+NTSTATUS WINAPI FltBuildDefaultSecurityDescriptor(PSECURITY_DESCRIPTOR *, ACCESS_MASK);
+void WINAPI FltFreeSecurityDescriptor(PSECURITY_DESCRIPTOR);
void* WINAPI FltGetRoutineAddress(LPCSTR name);
NTSTATUS WINAPI FltRegisterFilter(PDRIVER_OBJECT, const FLT_REGISTRATION *, PFLT_FILTER *);
NTSTATUS WINAPI FltStartFiltering(PFLT_FILTER);
--
2.42.0

View File

@@ -1,23 +0,0 @@
From c1af142bac149b296b2dea06cd99c13e0f8814c9 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Mon, 30 Aug 2021 15:15:35 +1000
Subject: [PATCH 2/3] fltmgr.sys: Create import library
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
---
dlls/fltmgr.sys/Makefile.in | 1 +
1 file changed, 1 insertion(+)
diff --git a/dlls/fltmgr.sys/Makefile.in b/dlls/fltmgr.sys/Makefile.in
index ae0e812cb22..ae02da9b5d6 100644
--- a/dlls/fltmgr.sys/Makefile.in
+++ b/dlls/fltmgr.sys/Makefile.in
@@ -1,4 +1,5 @@
MODULE = fltmgr.sys
+IMPORTLIB = fltmgr
EXTRADLLFLAGS = -Wl,--subsystem,native
IMPORTS = ntoskrnl
--
2.42.0

View File

@@ -1,133 +0,0 @@
From c69247afcbd83af223f471342c67bc06deeffda0 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Mon, 30 Aug 2021 15:16:06 +1000
Subject: [PATCH] ntoskrnl.exe: Add FltBuildDefaultSecurityDescriptor test
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
---
dlls/ntoskrnl.exe/tests/Makefile.in | 2 +-
dlls/ntoskrnl.exe/tests/driver.c | 81 +++++++++++++++++++++++++++++
2 files changed, 82 insertions(+), 1 deletion(-)
diff --git a/dlls/ntoskrnl.exe/tests/Makefile.in b/dlls/ntoskrnl.exe/tests/Makefile.in
index f610df6a947..97dee8b25cf 100644
--- a/dlls/ntoskrnl.exe/tests/Makefile.in
+++ b/dlls/ntoskrnl.exe/tests/Makefile.in
@@ -1,7 +1,7 @@
TESTDLL = ntoskrnl.exe
IMPORTS = advapi32 crypt32 newdev setupapi user32 wintrust ws2_32 hid
-driver_IMPORTS = winecrt0 ntoskrnl hal
+driver_IMPORTS = winecrt0 ntoskrnl hal fltmgr
driver_EXTRADLLFLAGS = -nodefaultlibs -nostartfiles -Wl,--subsystem,native
driver2_IMPORTS = winecrt0 ntoskrnl hal
driver2_EXTRADLLFLAGS = -nodefaultlibs -nostartfiles -Wl,--subsystem,native
diff --git a/dlls/ntoskrnl.exe/tests/driver.c b/dlls/ntoskrnl.exe/tests/driver.c
index ea4bd03ee44..844a181472c 100644
--- a/dlls/ntoskrnl.exe/tests/driver.c
+++ b/dlls/ntoskrnl.exe/tests/driver.c
@@ -36,6 +36,7 @@
#include "ddk/ntddk.h"
#include "ddk/ntifs.h"
#include "ddk/wdm.h"
+#include "ddk/fltkernel.h"
#include "driver.h"
@@ -2393,6 +2394,85 @@ static void test_default_modules(void)
ok(dxgmms1, "Failed to find dxgmms1.sys\n");
}
+static void test_default_security(void)
+{
+ PSECURITY_DESCRIPTOR sd = NULL;
+ NTSTATUS status;
+ PSID group = NULL, owner = NULL;
+ BOOLEAN isdefault, present;
+ PACL acl = NULL;
+ PACCESS_ALLOWED_ACE ace;
+ SID_IDENTIFIER_AUTHORITY auth = { SECURITY_NULL_SID_AUTHORITY };
+ SID_IDENTIFIER_AUTHORITY authwine7 = { SECURITY_NT_AUTHORITY };
+ PSID sid1, sid2, sidwin7;
+ BOOL ret;
+
+ status = FltBuildDefaultSecurityDescriptor(&sd, STANDARD_RIGHTS_ALL);
+ ok(status == STATUS_SUCCESS, "got %#lx\n", status);
+ if (status != STATUS_SUCCESS)
+ {
+ win_skip("Skipping FltBuildDefaultSecurityDescriptor tests\n");
+ return;
+ }
+ ok(sd != NULL, "Failed to return descriptor\n");
+
+ status = RtlGetGroupSecurityDescriptor(sd, &group, &isdefault);
+ ok(status == STATUS_SUCCESS, "got %#lx\n", status);
+ ok(group == NULL, "group isn't NULL\n");
+
+ status = RtlGetOwnerSecurityDescriptor(sd, &owner, &isdefault);
+ ok(status == STATUS_SUCCESS, "got %#lx\n", status);
+ ok(owner == NULL, "owner isn't NULL\n");
+
+ status = RtlGetDaclSecurityDescriptor(sd, &present, &acl, &isdefault);
+ ok(status == STATUS_SUCCESS, "got %#lx\n", status);
+ ok(acl != NULL, "acl is NULL\n");
+ ok(acl->AceCount == 2, "got %d\n", acl->AceCount);
+
+ sid1 = ExAllocatePool(NonPagedPool, RtlLengthRequiredSid(2));
+ status = RtlInitializeSid(sid1, &auth, 2);
+ ok(status == STATUS_SUCCESS, "got %#lx\n", status);
+ *RtlSubAuthoritySid(sid1, 0) = SECURITY_BUILTIN_DOMAIN_RID;
+ *RtlSubAuthoritySid(sid1, 1) = DOMAIN_GROUP_RID_ADMINS;
+
+ sidwin7 = ExAllocatePool(NonPagedPool, RtlLengthRequiredSid(2));
+ status = RtlInitializeSid(sidwin7, &authwine7, 2);
+ ok(status == STATUS_SUCCESS, "got %#lx\n", status);
+ *RtlSubAuthoritySid(sidwin7, 0) = SECURITY_BUILTIN_DOMAIN_RID;
+ *RtlSubAuthoritySid(sidwin7, 1) = DOMAIN_ALIAS_RID_ADMINS;
+
+ sid2 = ExAllocatePool(NonPagedPool, RtlLengthRequiredSid(1));
+ RtlInitializeSid(sid2, &auth, 1);
+ *RtlSubAuthoritySid(sid2, 0) = SECURITY_LOCAL_SYSTEM_RID;
+
+ /* SECURITY_BUILTIN_DOMAIN_RID */
+ status = RtlGetAce(acl, 0, (void**)&ace);
+ ok(status == STATUS_SUCCESS, "got %#lx\n", status);
+
+ ok(ace->Header.AceType == ACCESS_ALLOWED_ACE_TYPE, "got %#x\n", ace->Header.AceType);
+ ok(ace->Header.AceFlags == 0, "got %#x\n", ace->Header.AceFlags);
+ ok(ace->Mask == STANDARD_RIGHTS_ALL, "got %#lx\n", ace->Mask);
+
+ ret = RtlEqualSid(sid1, (PSID)&ace->SidStart) || RtlEqualSid(sidwin7, (PSID)&ace->SidStart);
+ ok(ret, "SID not equal\n");
+
+ /* SECURITY_LOCAL_SYSTEM_RID */
+ status = RtlGetAce(acl, 1, (void**)&ace);
+ ok(status == STATUS_SUCCESS, "got %#lx\n", status);
+
+ ok(ace->Header.AceType == ACCESS_ALLOWED_ACE_TYPE, "got %#x\n", ace->Header.AceType);
+ ok(ace->Header.AceFlags == 0, "got %#x\n", ace->Header.AceFlags);
+ ok(ace->Mask == STANDARD_RIGHTS_ALL, "got %#lx\n", ace->Mask);
+
+ ret = RtlEqualSid(sid2, (PSID)&ace->SidStart) || RtlEqualSid(sidwin7, (PSID)&ace->SidStart);
+ ok(ret, "SID not equal\n");
+
+ ExFreePool(sid1);
+ ExFreePool(sid2);
+
+ FltFreeSecurityDescriptor(sd);
+}
+
static NTSTATUS main_test(DEVICE_OBJECT *device, IRP *irp, IO_STACK_LOCATION *stack)
{
void *buffer = irp->AssociatedIrp.SystemBuffer;
@@ -2438,6 +2518,7 @@ static NTSTATUS main_test(DEVICE_OBJECT *device, IRP *irp, IO_STACK_LOCATION *st
test_process_memory(test_input);
test_permanence();
test_driver_object_extension();
+ test_default_security();
IoMarkIrpPending(irp);
IoQueueWorkItem(work_item, main_test_task, DelayedWorkQueue, irp);
--
2.42.0

View File

@@ -1,2 +0,0 @@
Fixes: [49089] fltmgr.sys: Implement FltBuildDefaultSecurityDescriptor
Depends: winedevice-Default_Drivers

View File

@@ -1,37 +0,0 @@
From af54761b8536f81831f2813ef0ff9b627dcc5ca4 Mon Sep 17 00:00:00 2001
From: Nikolay Sivov <nsivov@codeweavers.com>
Date: Wed, 12 Jan 2022 22:48:35 +0300
Subject: [PATCH] winegstreamer: Add MFVideoFormat_ARGB32 output for the
source.
(cherry picked from commit 9812591f0003c5c611faa59ab9b3cb73a85be637)
CW-Bug-Id: #19975
---
dlls/winegstreamer/media_source.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dlls/winegstreamer/media_source.c b/dlls/winegstreamer/media_source.c
index 00c40dc2f47..7a0f65b4247 100644
--- a/dlls/winegstreamer/media_source.c
+++ b/dlls/winegstreamer/media_source.c
@@ -856,7 +856,7 @@ static HRESULT new_media_stream(struct media_source *source,
static HRESULT media_stream_init_desc(struct media_stream *stream)
{
IMFMediaTypeHandler *type_handler = NULL;
- IMFMediaType *stream_types[6];
+ IMFMediaType *stream_types[7];
struct wg_format format;
DWORD type_count = 0;
unsigned int i;
@@ -875,6 +875,7 @@ static HRESULT media_stream_init_desc(struct media_stream *stream)
WG_VIDEO_FORMAT_YV12,
WG_VIDEO_FORMAT_YUY2,
WG_VIDEO_FORMAT_I420,
+ WG_VIDEO_FORMAT_BGRA,
};
IMFMediaType *base_type = mf_media_type_from_wg_format(&format);
--
2.40.0

View File

@@ -0,0 +1,28 @@
From 321e3228c6c28256bfb209efdc372b61f9c8535f Mon Sep 17 00:00:00 2001
From: Fabian Maurer <dark.shadow4@web.de>
Date: Thu, 21 Dec 2023 20:09:23 +0100
Subject: [PATCH] kernelbase: Correct return value in VirtualProtect for
PAGE_WRITECOPY
---
dlls/kernelbase/memory.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/dlls/kernelbase/memory.c b/dlls/kernelbase/memory.c
index 4f4bba9a13b..de42395b33b 100644
--- a/dlls/kernelbase/memory.c
+++ b/dlls/kernelbase/memory.c
@@ -481,7 +481,9 @@ BOOL WINAPI DECLSPEC_HOTPATCH VirtualLock( void *addr, SIZE_T size )
*/
BOOL WINAPI DECLSPEC_HOTPATCH VirtualProtect( void *addr, SIZE_T size, DWORD new_prot, DWORD *old_prot )
{
- return VirtualProtectEx( GetCurrentProcess(), addr, size, new_prot, old_prot );
+ BOOL ret = VirtualProtectEx( GetCurrentProcess(), addr, size, new_prot, old_prot );
+ if (*old_prot == PAGE_WRITECOPY) *old_prot = PAGE_READWRITE;
+ return ret;
}
--
2.43.0

View File

@@ -1,7 +1,7 @@
From 36b85f294e94ff58ba190d7b6606e34d64af1a31 Mon Sep 17 00:00:00 2001
From e1f8622b3b787ca19ca1cfc149492c517e5833c4 Mon Sep 17 00:00:00 2001
From: Paul Gofman <pgofman@codeweavers.com>
Date: Tue, 20 Jun 2023 11:54:06 -0600
Subject: [PATCH 2/3] ntdll: Implement NtFlushKey().
Subject: [PATCH] ntdll: Implement NtFlushKey().
---
dlls/ntdll/unix/registry.c | 155 +++++++++++++++++++++++++++++++++++--
@@ -10,7 +10,7 @@ Subject: [PATCH 2/3] ntdll: Implement NtFlushKey().
3 files changed, 247 insertions(+), 14 deletions(-)
diff --git a/dlls/ntdll/unix/registry.c b/dlls/ntdll/unix/registry.c
index b63c7a66925..14b3ade3e6d 100644
index 88ad7e569a1..492dd00d67a 100644
--- a/dlls/ntdll/unix/registry.c
+++ b/dlls/ntdll/unix/registry.c
@@ -29,6 +29,8 @@
@@ -42,7 +42,7 @@ index b63c7a66925..14b3ade3e6d 100644
}
@@ -901,22 +904,162 @@ NTSTATUS WINAPI NtNotifyChangeKey( HANDLE key, HANDLE event, PIO_APC_ROUTINE apc
@@ -916,22 +919,162 @@ NTSTATUS WINAPI NtNotifyChangeKey( HANDLE key, HANDLE event, PIO_APC_ROUTINE apc
io, filter, subtree, buffer, length, async );
}
@@ -210,10 +210,10 @@ index b63c7a66925..14b3ade3e6d 100644
}
diff --git a/server/protocol.def b/server/protocol.def
index 12aa43a43e7..0e62f609459 100644
index 1117e3b797a..910960285a0 100644
--- a/server/protocol.def
+++ b/server/protocol.def
@@ -1818,6 +1818,18 @@ struct process_info
@@ -1834,6 +1834,18 @@ struct process_info
/* Flush a registry key */
@REQ(flush_key)
obj_handle_t hkey; /* handle to the key */
@@ -233,7 +233,7 @@ index 12aa43a43e7..0e62f609459 100644
diff --git a/server/registry.c b/server/registry.c
index 3365d4e9a4b..f6d57c579f4 100644
index ec1ca27be80..6ec1202cf7a 100644
--- a/server/registry.c
+++ b/server/registry.c
@@ -90,6 +90,7 @@ struct key
@@ -290,7 +290,7 @@ index 3365d4e9a4b..f6d57c579f4 100644
}
/* go through all the notifications and send them if necessary */
@@ -2004,6 +2010,7 @@ void init_registry(void)
@@ -1995,6 +2001,7 @@ void init_registry(void)
/* save a registry branch to a file */
static void save_all_subkeys( struct key *key, FILE *f )
{
@@ -298,16 +298,16 @@ index 3365d4e9a4b..f6d57c579f4 100644
fprintf( f, "WINE REGISTRY Version 2\n" );
fprintf( f, ";; All keys relative to " );
dump_path( key, NULL, f );
@@ -2192,7 +2199,7 @@ static int save_branch( struct key *key, const char *path )
@@ -2179,7 +2186,7 @@ static int save_branch( struct key *key, const char *filename )
}
done:
free( tmp );
- if (ret) make_clean( key );
+ if (ret) make_clean( key, key->timestamp_counter );
return ret;
}
@@ -2240,6 +2247,36 @@ static int is_wow64_thread( struct thread *thread )
@@ -2227,6 +2234,36 @@ static int is_wow64_thread( struct thread *thread )
return (is_machine_64bit( native_machine ) && !is_machine_64bit( thread->process->machine ));
}
@@ -344,7 +344,7 @@ index 3365d4e9a4b..f6d57c579f4 100644
/* create a registry key */
DECL_HANDLER(create_key)
@@ -2304,15 +2341,56 @@ DECL_HANDLER(delete_key)
@@ -2291,15 +2328,56 @@ DECL_HANDLER(delete_key)
}
}
@@ -372,7 +372,7 @@ index 3365d4e9a4b..f6d57c579f4 100644
- release_object( key );
+ if (!(save_branch_info[branches[i]].key->flags & KEY_DIRTY)) continue;
+ ++reply->branch_count;
+ path_len = strlen( save_branch_info[branches[i]].path ) + 1;
+ path_len = strlen( save_branch_info[branches[i]].filename ) + 1;
+ reply->total += sizeof(int) + sizeof(int) + path_len + save_registry( save_branch_info[branches[i]].key, NULL );
+ }
+ if (reply->total > get_reply_max_size())
@@ -388,10 +388,10 @@ index 3365d4e9a4b..f6d57c579f4 100644
+ if (!(save_branch_info[branches[i]].key->flags & KEY_DIRTY)) continue;
+ *(int *)data = branches[i];
+ data += sizeof(int);
+ path_len = strlen( save_branch_info[branches[i]].path ) + 1;
+ path_len = strlen( save_branch_info[branches[i]].filename ) + 1;
+ *(int *)data = path_len;
+ data += sizeof(int);
+ memcpy( data, save_branch_info[branches[i]].path, path_len );
+ memcpy( data, save_branch_info[branches[i]].filename, path_len );
+ data += path_len;
+ data += save_registry( save_branch_info[branches[i]].key, data );
+ }
@@ -406,5 +406,5 @@ index 3365d4e9a4b..f6d57c579f4 100644
/* enumerate registry subkeys */
--
2.40.1
2.43.0

View File

@@ -1,7 +1,7 @@
From 093f14e3ce1753ef399681ec2ccdeecb4443c7a1 Mon Sep 17 00:00:00 2001
From 71559b3e6e2ba78682c3968a9837bf2fa6719830 Mon Sep 17 00:00:00 2001
From: Paul Gofman <pgofman@codeweavers.com>
Date: Tue, 20 Jun 2023 12:17:36 -0600
Subject: [PATCH 3/3] mountmgr.sys: Perform periodic registry flush instead of
Subject: [PATCH] mountmgr.sys: Perform periodic registry flush instead of
server.
---
@@ -10,10 +10,10 @@ Subject: [PATCH 3/3] mountmgr.sys: Perform periodic registry flush instead of
2 files changed, 22 insertions(+), 26 deletions(-)
diff --git a/dlls/mountmgr.sys/mountmgr.c b/dlls/mountmgr.sys/mountmgr.c
index 1850051a258..ee8d282594f 100644
index 52bc6536693..fecac943b41 100644
--- a/dlls/mountmgr.sys/mountmgr.c
+++ b/dlls/mountmgr.sys/mountmgr.c
@@ -618,6 +618,27 @@ static DWORD WINAPI run_loop_thread( void *arg )
@@ -616,6 +616,27 @@ static DWORD WINAPI run_loop_thread( void *arg )
return MOUNTMGR_CALL( run_loop, &params );
}
@@ -41,7 +41,7 @@ index 1850051a258..ee8d282594f 100644
/* main entry point for the mount point manager driver */
NTSTATUS WINAPI DriverEntry( DRIVER_OBJECT *driver, UNICODE_STRING *path )
@@ -661,6 +682,7 @@ NTSTATUS WINAPI DriverEntry( DRIVER_OBJECT *driver, UNICODE_STRING *path )
@@ -659,6 +680,7 @@ NTSTATUS WINAPI DriverEntry( DRIVER_OBJECT *driver, UNICODE_STRING *path )
thread = CreateThread( NULL, 0, device_op_thread, NULL, 0, NULL );
CloseHandle( CreateThread( NULL, 0, run_loop_thread, thread, 0, NULL ));
@@ -50,7 +50,7 @@ index 1850051a258..ee8d282594f 100644
#ifdef _WIN64
/* create a symlink so that the Wine port overrides key can be edited with 32-bit reg or regedit */
diff --git a/server/registry.c b/server/registry.c
index f6d57c579f4..21566057fa1 100644
index 6ec1202cf7a..09badf44bcd 100644
--- a/server/registry.c
+++ b/server/registry.c
@@ -125,15 +125,12 @@ static abstime_t change_timestamp_counter;
@@ -69,7 +69,7 @@ index f6d57c579f4..21566057fa1 100644
static struct key_value *find_value( const struct key *key, const struct unicode_str *name, int *index );
/* information about where to save a registry branch */
@@ -1983,9 +1980,6 @@ void init_registry(void)
@@ -1976,9 +1973,6 @@ void init_registry(void)
release_object( hklm );
release_object( hkcu );
@@ -79,7 +79,7 @@ index f6d57c579f4..21566057fa1 100644
/* create windows directories */
if (!mkdir( "drive_c/windows", 0777 ))
@@ -2203,26 +2197,6 @@ done:
@@ -2190,26 +2184,6 @@ done:
return ret;
}
@@ -91,7 +91,7 @@ index f6d57c579f4..21566057fa1 100644
- if (fchdir( config_dir_fd ) == -1) return;
- save_timeout_user = NULL;
- for (i = 0; i < save_branch_count; i++)
- save_branch( save_branch_info[i].key, save_branch_info[i].path );
- save_branch( save_branch_info[i].key, save_branch_info[i].filename );
- if (fchdir( server_dir_fd ) == -1) fatal_error( "chdir to server dir: %s\n", strerror( errno ));
- set_periodic_save_timer();
-}
@@ -107,5 +107,5 @@ index f6d57c579f4..21566057fa1 100644
void flush_registry(void)
{
--
2.40.1
2.43.0

View File

@@ -1,437 +0,0 @@
From 1123af8d7108c26d7c4b4fdb6495d8ad03d8aaa0 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Wed, 20 Mar 2024 12:18:36 +1100
Subject: [PATCH] Updated vkd3d to 166dc24b2f73b0541a14815081ee4c8d9eab3269.
---
libs/vkd3d/include/private/vkd3d_common.h | 181 +++++++++++++++++-
libs/vkd3d/include/private/vkd3d_memory.h | 2 +-
libs/vkd3d/libs/vkd3d-common/blob.c | 1 -
libs/vkd3d/libs/vkd3d-common/debug.c | 2 +-
libs/vkd3d/libs/vkd3d-common/error.c | 1 -
libs/vkd3d/libs/vkd3d-shader/ir.c | 8 +-
libs/vkd3d/libs/vkd3d-shader/spirv.c | 3 +-
.../libs/vkd3d-shader/vkd3d_shader_private.h | 5 +-
libs/vkd3d/libs/vkd3d/vkd3d_private.h | 67 -------
9 files changed, 189 insertions(+), 81 deletions(-)
diff --git a/libs/vkd3d/include/private/vkd3d_common.h b/libs/vkd3d/include/private/vkd3d_common.h
index 6a3b530d868..974ff9446db 100644
--- a/libs/vkd3d/include/private/vkd3d_common.h
+++ b/libs/vkd3d/include/private/vkd3d_common.h
@@ -30,6 +30,9 @@
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
+#ifndef _WIN32
+#include <pthread.h>
+#endif
#ifdef _MSC_VER
#include <intrin.h>
@@ -105,11 +108,130 @@ VKD3D_NORETURN static inline void vkd3d_unreachable_(const char *filename, unsig
#define vkd3d_unreachable() vkd3d_unreachable_(__FILE__, __LINE__)
#endif
+#ifdef VKD3D_NO_TRACE_MESSAGES
+#define TRACE(args...) do { } while (0)
+#define TRACE_ON() (false)
+#endif
+
+#ifdef VKD3D_NO_DEBUG_MESSAGES
+#define WARN(args...) do { } while (0)
+#define FIXME(args...) do { } while (0)
+#endif
+
+enum vkd3d_dbg_level
+{
+ VKD3D_DBG_LEVEL_NONE,
+ VKD3D_DBG_LEVEL_ERR,
+ VKD3D_DBG_LEVEL_FIXME,
+ VKD3D_DBG_LEVEL_WARN,
+ VKD3D_DBG_LEVEL_TRACE,
+};
+
+enum vkd3d_dbg_level vkd3d_dbg_get_level(void);
+
+void vkd3d_dbg_printf(enum vkd3d_dbg_level level, const char *function, const char *fmt, ...) VKD3D_PRINTF_FUNC(3, 4);
+void vkd3d_dbg_set_log_callback(PFN_vkd3d_log callback);
+
+const char *vkd3d_dbg_sprintf(const char *fmt, ...) VKD3D_PRINTF_FUNC(1, 2);
+const char *vkd3d_dbg_vsprintf(const char *fmt, va_list args);
+const char *debugstr_a(const char *str);
+const char *debugstr_an(const char *str, size_t n);
+const char *debugstr_w(const WCHAR *wstr, size_t wchar_size);
+
+#define VKD3D_DBG_LOG(level) \
+ do { \
+ const enum vkd3d_dbg_level vkd3d_dbg_level = VKD3D_DBG_LEVEL_##level; \
+ VKD3D_DBG_PRINTF
+
+#define VKD3D_DBG_LOG_ONCE(first_time_level, level) \
+ do { \
+ static bool vkd3d_dbg_next_time; \
+ const enum vkd3d_dbg_level vkd3d_dbg_level = vkd3d_dbg_next_time \
+ ? VKD3D_DBG_LEVEL_##level : VKD3D_DBG_LEVEL_##first_time_level; \
+ vkd3d_dbg_next_time = true; \
+ VKD3D_DBG_PRINTF
+
+#define VKD3D_DBG_PRINTF(...) \
+ vkd3d_dbg_printf(vkd3d_dbg_level, __FUNCTION__, __VA_ARGS__); } while (0)
+
+#ifndef TRACE
+#define TRACE VKD3D_DBG_LOG(TRACE)
+#endif
+
+#ifndef WARN
+#define WARN VKD3D_DBG_LOG(WARN)
+#endif
+
+#ifndef FIXME
+#define FIXME VKD3D_DBG_LOG(FIXME)
+#endif
+
+#define ERR VKD3D_DBG_LOG(ERR)
+
+#ifndef TRACE_ON
+#define TRACE_ON() (vkd3d_dbg_get_level() == VKD3D_DBG_LEVEL_TRACE)
+#endif
+
+#ifndef WARN_ON
+#define WARN_ON() (vkd3d_dbg_get_level() >= VKD3D_DBG_LEVEL_WARN)
+#endif
+
+#define FIXME_ONCE VKD3D_DBG_LOG_ONCE(FIXME, WARN)
+
+#define VKD3D_DEBUG_ENV_NAME(name) const char *const vkd3d_dbg_env_name = name
+
+static inline const char *debugstr_guid(const GUID *guid)
+{
+ if (!guid)
+ return "(null)";
+
+ return vkd3d_dbg_sprintf("{%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}",
+ (unsigned long)guid->Data1, guid->Data2, guid->Data3, guid->Data4[0],
+ guid->Data4[1], guid->Data4[2], guid->Data4[3], guid->Data4[4],
+ guid->Data4[5], guid->Data4[6], guid->Data4[7]);
+}
+
+static inline const char *debugstr_hresult(HRESULT hr)
+{
+ switch (hr)
+ {
+#define TO_STR(u) case u: return #u;
+ TO_STR(S_OK)
+ TO_STR(S_FALSE)
+ TO_STR(E_NOTIMPL)
+ TO_STR(E_NOINTERFACE)
+ TO_STR(E_POINTER)
+ TO_STR(E_ABORT)
+ TO_STR(E_FAIL)
+ TO_STR(E_OUTOFMEMORY)
+ TO_STR(E_INVALIDARG)
+ TO_STR(DXGI_ERROR_NOT_FOUND)
+ TO_STR(DXGI_ERROR_MORE_DATA)
+ TO_STR(DXGI_ERROR_UNSUPPORTED)
+#undef TO_STR
+ default:
+ return vkd3d_dbg_sprintf("%#x", (int)hr);
+ }
+}
+
+unsigned int vkd3d_env_var_as_uint(const char *name, unsigned int default_value);
+
+struct vkd3d_debug_option
+{
+ const char *name;
+ uint64_t flag;
+};
+
+bool vkd3d_debug_list_has_member(const char *string, const char *member);
+uint64_t vkd3d_parse_debug_options(const char *string,
+ const struct vkd3d_debug_option *options, unsigned int option_count);
+void vkd3d_set_thread_name(const char *name);
+
static inline unsigned int vkd3d_popcount(unsigned int v)
{
#ifdef _MSC_VER
return __popcnt(v);
-#elif defined(__MINGW32__)
+#elif defined(HAVE_BUILTIN_POPCOUNT)
return __builtin_popcount(v);
#else
v -= (v >> 1) & 0x55555555;
@@ -305,6 +427,63 @@ static inline uint32_t vkd3d_atomic_increment_u32(uint32_t volatile *x)
return vkd3d_atomic_add_fetch_u32(x, 1);
}
+struct vkd3d_mutex
+{
+#ifdef _WIN32
+ CRITICAL_SECTION lock;
+#else
+ pthread_mutex_t lock;
+#endif
+};
+
+static inline void vkd3d_mutex_init(struct vkd3d_mutex *lock)
+{
+#ifdef _WIN32
+ InitializeCriticalSection(&lock->lock);
+#else
+ int ret;
+
+ if ((ret = pthread_mutex_init(&lock->lock, NULL)))
+ ERR("Failed to initialise the mutex, ret %d.\n", ret);
+#endif
+}
+
+static inline void vkd3d_mutex_lock(struct vkd3d_mutex *lock)
+{
+#ifdef _WIN32
+ EnterCriticalSection(&lock->lock);
+#else
+ int ret;
+
+ if ((ret = pthread_mutex_lock(&lock->lock)))
+ ERR("Failed to lock the mutex, ret %d.\n", ret);
+#endif
+}
+
+static inline void vkd3d_mutex_unlock(struct vkd3d_mutex *lock)
+{
+#ifdef _WIN32
+ LeaveCriticalSection(&lock->lock);
+#else
+ int ret;
+
+ if ((ret = pthread_mutex_unlock(&lock->lock)))
+ ERR("Failed to unlock the mutex, ret %d.\n", ret);
+#endif
+}
+
+static inline void vkd3d_mutex_destroy(struct vkd3d_mutex *lock)
+{
+#ifdef _WIN32
+ DeleteCriticalSection(&lock->lock);
+#else
+ int ret;
+
+ if ((ret = pthread_mutex_destroy(&lock->lock)))
+ ERR("Failed to destroy the mutex, ret %d.\n", ret);
+#endif
+}
+
static inline void vkd3d_parse_version(const char *version, int *major, int *minor)
{
*major = atoi(version);
diff --git a/libs/vkd3d/include/private/vkd3d_memory.h b/libs/vkd3d/include/private/vkd3d_memory.h
index 8a2edb1000d..bb177e39add 100644
--- a/libs/vkd3d/include/private/vkd3d_memory.h
+++ b/libs/vkd3d/include/private/vkd3d_memory.h
@@ -24,7 +24,7 @@
#include <stdlib.h>
#include <string.h>
-#include "vkd3d_debug.h"
+#include "vkd3d_common.h"
static inline void *vkd3d_malloc(size_t size)
{
diff --git a/libs/vkd3d/libs/vkd3d-common/blob.c b/libs/vkd3d/libs/vkd3d-common/blob.c
index dbb26de7d73..6bc95dc55c4 100644
--- a/libs/vkd3d/libs/vkd3d-common/blob.c
+++ b/libs/vkd3d/libs/vkd3d-common/blob.c
@@ -21,7 +21,6 @@
#define CONST_VTABLE
#include "vkd3d.h"
#include "vkd3d_blob.h"
-#include "vkd3d_debug.h"
#include "vkd3d_memory.h"
#include "d3d12shader.h"
diff --git a/libs/vkd3d/libs/vkd3d-common/debug.c b/libs/vkd3d/libs/vkd3d-common/debug.c
index e12cd39450a..4523fc997ef 100644
--- a/libs/vkd3d/libs/vkd3d-common/debug.c
+++ b/libs/vkd3d/libs/vkd3d-common/debug.c
@@ -20,7 +20,7 @@
# define _WIN32_WINNT 0x0600 /* For InitOnceExecuteOnce(). */
#endif
-#include "vkd3d_debug.h"
+#include "vkd3d_common.h"
#include <assert.h>
#include <ctype.h>
diff --git a/libs/vkd3d/libs/vkd3d-common/error.c b/libs/vkd3d/libs/vkd3d-common/error.c
index 3572669ac1c..b8350a5404c 100644
--- a/libs/vkd3d/libs/vkd3d-common/error.c
+++ b/libs/vkd3d/libs/vkd3d-common/error.c
@@ -17,7 +17,6 @@
*/
#include "vkd3d_common.h"
-#include "vkd3d_debug.h"
HRESULT hresult_from_vkd3d_result(int vkd3d_result)
{
diff --git a/libs/vkd3d/libs/vkd3d-shader/ir.c b/libs/vkd3d/libs/vkd3d-shader/ir.c
index ec32faae8da..4f0226187af 100644
--- a/libs/vkd3d/libs/vkd3d-shader/ir.c
+++ b/libs/vkd3d/libs/vkd3d-shader/ir.c
@@ -4393,11 +4393,9 @@ fail:
return ret;
}
-enum vkd3d_result vkd3d_shader_normalise(struct vkd3d_shader_parser *parser,
- const struct vkd3d_shader_compile_info *compile_info)
+enum vkd3d_result vsir_program_normalise(struct vsir_program *program, uint64_t config_flags,
+ const struct vkd3d_shader_compile_info *compile_info, struct vkd3d_shader_message_context *message_context)
{
- struct vkd3d_shader_message_context *message_context = parser->message_context;
- struct vsir_program *program = &parser->program;
enum vkd3d_result result = VKD3D_OK;
remove_dcl_temps(program);
@@ -4488,7 +4486,7 @@ enum vkd3d_result vkd3d_shader_normalise(struct vkd3d_shader_parser *parser,
if (TRACE_ON())
vkd3d_shader_trace(program);
- if ((result = vsir_program_validate(program, parser->config_flags,
+ if ((result = vsir_program_validate(program, config_flags,
compile_info->source_name, message_context)) < 0)
return result;
diff --git a/libs/vkd3d/libs/vkd3d-shader/spirv.c b/libs/vkd3d/libs/vkd3d-shader/spirv.c
index f830bbdaa6d..673400efd69 100644
--- a/libs/vkd3d/libs/vkd3d-shader/spirv.c
+++ b/libs/vkd3d/libs/vkd3d-shader/spirv.c
@@ -10133,7 +10133,8 @@ static int spirv_compiler_generate_spirv(struct spirv_compiler *compiler,
enum vkd3d_result result = VKD3D_OK;
unsigned int i;
- if ((result = vkd3d_shader_normalise(parser, compile_info)) < 0)
+ if ((result = vsir_program_normalise(program, compiler->config_flags,
+ compile_info, compiler->message_context)) < 0)
return result;
if (program->temp_count)
diff --git a/libs/vkd3d/libs/vkd3d-shader/vkd3d_shader_private.h b/libs/vkd3d/libs/vkd3d-shader/vkd3d_shader_private.h
index 7503d564af0..a33b6d2d967 100644
--- a/libs/vkd3d/libs/vkd3d-shader/vkd3d_shader_private.h
+++ b/libs/vkd3d/libs/vkd3d-shader/vkd3d_shader_private.h
@@ -1321,6 +1321,8 @@ struct vsir_program
bool vsir_program_init(struct vsir_program *program, const struct vkd3d_shader_version *version, unsigned int reserve);
void vsir_program_cleanup(struct vsir_program *program);
+enum vkd3d_result vsir_program_normalise(struct vsir_program *program, uint64_t config_flags,
+ const struct vkd3d_shader_compile_info *compile_info, struct vkd3d_shader_message_context *message_context);
enum vkd3d_result vsir_program_validate(struct vsir_program *program, uint64_t config_flags,
const char *source_name, struct vkd3d_shader_message_context *message_context);
@@ -1784,7 +1786,4 @@ void dxbc_writer_add_section(struct dxbc_writer *dxbc, uint32_t tag, const void
void dxbc_writer_init(struct dxbc_writer *dxbc);
int dxbc_writer_write(struct dxbc_writer *dxbc, struct vkd3d_shader_code *code);
-enum vkd3d_result vkd3d_shader_normalise(struct vkd3d_shader_parser *parser,
- const struct vkd3d_shader_compile_info *compile_info);
-
#endif /* __VKD3D_SHADER_PRIVATE_H */
diff --git a/libs/vkd3d/libs/vkd3d/vkd3d_private.h b/libs/vkd3d/libs/vkd3d/vkd3d_private.h
index 34a98c4fc3d..39d892a6fa7 100644
--- a/libs/vkd3d/libs/vkd3d/vkd3d_private.h
+++ b/libs/vkd3d/libs/vkd3d/vkd3d_private.h
@@ -203,36 +203,11 @@ union vkd3d_thread_handle
void *handle;
};
-struct vkd3d_mutex
-{
- CRITICAL_SECTION lock;
-};
-
struct vkd3d_cond
{
CONDITION_VARIABLE cond;
};
-static inline void vkd3d_mutex_init(struct vkd3d_mutex *lock)
-{
- InitializeCriticalSection(&lock->lock);
-}
-
-static inline void vkd3d_mutex_lock(struct vkd3d_mutex *lock)
-{
- EnterCriticalSection(&lock->lock);
-}
-
-static inline void vkd3d_mutex_unlock(struct vkd3d_mutex *lock)
-{
- LeaveCriticalSection(&lock->lock);
-}
-
-static inline void vkd3d_mutex_destroy(struct vkd3d_mutex *lock)
-{
- DeleteCriticalSection(&lock->lock);
-}
-
static inline void vkd3d_cond_init(struct vkd3d_cond *cond)
{
InitializeConditionVariable(&cond->cond);
@@ -288,53 +263,11 @@ union vkd3d_thread_handle
void *handle;
};
-struct vkd3d_mutex
-{
- pthread_mutex_t lock;
-};
-
struct vkd3d_cond
{
pthread_cond_t cond;
};
-
-static inline void vkd3d_mutex_init(struct vkd3d_mutex *lock)
-{
- int ret;
-
- ret = pthread_mutex_init(&lock->lock, NULL);
- if (ret)
- ERR("Could not initialize the mutex, error %d.\n", ret);
-}
-
-static inline void vkd3d_mutex_lock(struct vkd3d_mutex *lock)
-{
- int ret;
-
- ret = pthread_mutex_lock(&lock->lock);
- if (ret)
- ERR("Could not lock the mutex, error %d.\n", ret);
-}
-
-static inline void vkd3d_mutex_unlock(struct vkd3d_mutex *lock)
-{
- int ret;
-
- ret = pthread_mutex_unlock(&lock->lock);
- if (ret)
- ERR("Could not unlock the mutex, error %d.\n", ret);
-}
-
-static inline void vkd3d_mutex_destroy(struct vkd3d_mutex *lock)
-{
- int ret;
-
- ret = pthread_mutex_destroy(&lock->lock);
- if (ret)
- ERR("Could not destroy the mutex, error %d.\n", ret);
-}
-
static inline void vkd3d_cond_init(struct vkd3d_cond *cond)
{
int ret;
--
2.43.0

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