Compare commits

...

11 Commits
v8.4 ... v8.5

Author SHA1 Message Date
Alistair Leslie-Hughes
abe75a7741 Release v8.5 2023-04-01 15:19:47 +11:00
Alistair Leslie-Hughes
be92c5d768 Added ntdll-hidden_file_attr patchset 2023-04-01 11:07:21 +11:00
Alistair Leslie-Hughes
6d45ccd523 Added win32u-GPU_properties patchset 2023-04-01 10:27:27 +11:00
Alistair Leslie-Hughes
6dbab0f2e5 Updated mfplat-streaming-support patchset
Fixes a crash on some videos.
2023-03-29 20:24:12 +11:00
Alistair Leslie-Hughes
e0766792bd Rebase against da0ec7fbbde45126320e15b2bfb00b357b45ffb6. 2023-03-29 13:53:46 +11:00
Alistair Leslie-Hughes
df3886edb6 Rebase against d62e2268d77c237e8430e158bb337958d88486ba. 2023-03-28 18:40:22 +11:00
Alistair Leslie-Hughes
7bcf1f6358 Rebase against 3149d27220acaf276bfa651e040ff006edcd6944. 2023-03-24 09:51:18 +11:00
Zebediah Figura
cd4d265f07 Revert "patchinstall.py: Use --git-dir instead of -C."
This reverts commit cf29ed121d.

This doesn't quite do what I thought it did, and breaks the intended setup.
2023-03-21 00:42:48 -05:00
Zebediah Figura
cf29ed121d patchinstall.py: Use --git-dir instead of -C.
This reportedly works better for nested git trees.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51877
2023-03-20 17:51:52 -05:00
Zebediah Figura
09634de79c dinput-joy-mappings: Restore tests to patch 1.
The patch set is disabled now. We want to make sure that these tests are ported when it's rewritten.
2023-03-20 17:32:58 -05:00
Zebediah Figura
68cc39d3ba Rebase against fd99bd4e247a879e8cb186212d1dc66268aa0888. 2023-03-20 17:32:04 -05:00
20 changed files with 961 additions and 149 deletions

View File

@@ -1,17 +1,18 @@
From 01097ee44ab6835a4c139261c188ae6535bfb311 Mon Sep 17 00:00:00 2001
From e7104770d4b57539d5b64a67212504910692e920 Mon Sep 17 00:00:00 2001
From: Jetro Jormalainen <jje-wine@jv.jetro.fi>
Date: Tue, 30 Apr 2019 09:20:54 +1000
Subject: [PATCH] dinput: Allow empty Joystick mappings.
---
dlls/dinput/device.c | 77 ++++++++++++++++++++++++++++++++++++--------
1 file changed, 63 insertions(+), 14 deletions(-)
dlls/dinput/device.c | 77 ++++++++++++++++++++++++++++++-------
dlls/dinput/tests/device8.c | 50 ++++++++++++++++++++++++
2 files changed, 113 insertions(+), 14 deletions(-)
diff --git a/dlls/dinput/device.c b/dlls/dinput/device.c
index c001d1ef29a..d1ff222a653 100644
index 6cc190ee7fb..2fd9329aa68 100644
--- a/dlls/dinput/device.c
+++ b/dlls/dinput/device.c
@@ -341,12 +341,26 @@ static DWORD semantic_to_obj_id( struct dinput_device *This, DWORD dwSemantic )
@@ -364,12 +364,26 @@ static DWORD semantic_to_obj_id( struct dinput_device *This, DWORD dwSemantic )
return type | (0x0000ff00 & (instance << 8));
}
@@ -39,7 +40,7 @@ index c001d1ef29a..d1ff222a653 100644
{
static const WCHAR *subkey = L"Software\\Wine\\DirectInput\\Mappings\\%s\\%s\\%s";
HKEY hkey;
@@ -357,8 +371,11 @@ static HKEY get_mapping_key(const WCHAR *device, const WCHAR *username, const WC
@@ -380,8 +394,11 @@ static HKEY get_mapping_key(const WCHAR *device, const WCHAR *username, const WC
swprintf( keyname, len, subkey, username, device, guid );
/* The key used is HKCU\Software\Wine\DirectInput\Mappings\[username]\[device]\[mapping_guid] */
@@ -53,7 +54,7 @@ index c001d1ef29a..d1ff222a653 100644
free( keyname );
@@ -378,7 +395,9 @@ static HRESULT save_mapping_settings(IDirectInputDevice8W *iface, LPDIACTIONFORM
@@ -401,7 +418,9 @@ static HRESULT save_mapping_settings(IDirectInputDevice8W *iface, LPDIACTIONFORM
if (StringFromCLSID(&lpdiaf->guidActionMap, &guid_str) != S_OK)
return DI_SETTINGSNOTSAVED;
@@ -64,7 +65,7 @@ index c001d1ef29a..d1ff222a653 100644
if (!hkey)
{
@@ -413,7 +432,7 @@ static BOOL load_mapping_settings( struct dinput_device *This, LPDIACTIONFORMATW
@@ -436,7 +455,7 @@ static BOOL load_mapping_settings( struct dinput_device *This, LPDIACTIONFORMATW
HKEY hkey;
WCHAR *guid_str;
DIDEVICEINSTANCEW didev;
@@ -73,7 +74,7 @@ index c001d1ef29a..d1ff222a653 100644
didev.dwSize = sizeof(didev);
IDirectInputDevice8_GetDeviceInfo(&This->IDirectInputDevice8W_iface, &didev);
@@ -421,7 +440,7 @@ static BOOL load_mapping_settings( struct dinput_device *This, LPDIACTIONFORMATW
@@ -444,7 +463,7 @@ static BOOL load_mapping_settings( struct dinput_device *This, LPDIACTIONFORMATW
if (StringFromCLSID(&lpdiaf->guidActionMap, &guid_str) != S_OK)
return FALSE;
@@ -82,7 +83,7 @@ index c001d1ef29a..d1ff222a653 100644
if (!hkey)
{
@@ -441,15 +460,20 @@ static BOOL load_mapping_settings( struct dinput_device *This, LPDIACTIONFORMATW
@@ -464,15 +483,20 @@ static BOOL load_mapping_settings( struct dinput_device *This, LPDIACTIONFORMATW
{
lpdiaf->rgoAction[i].dwObjID = id;
lpdiaf->rgoAction[i].guidInstance = didev.guidInstance;
@@ -106,7 +107,7 @@ index c001d1ef29a..d1ff222a653 100644
}
static BOOL set_app_data( struct dinput_device *dev, int offset, UINT_PTR app_data )
@@ -1896,13 +1920,18 @@ static HRESULT WINAPI dinput_device_BuildActionMap( IDirectInputDevice8W *iface,
@@ -1935,13 +1959,18 @@ static HRESULT WINAPI dinput_device_BuildActionMap( IDirectInputDevice8W *iface,
load_success = load_mapping_settings( impl, format, username_buf );
}
@@ -129,7 +130,7 @@ index c001d1ef29a..d1ff222a653 100644
genre = format->rgoAction[i].dwSemantic & DIGENRE_ANY;
if (devMask == genre || (devMask == DIGENRE_ANY && genre != DIMOUSE_MASK && genre != DIKEYBOARD_MASK))
{
@@ -1934,6 +1963,14 @@ static HRESULT WINAPI dinput_device_BuildActionMap( IDirectInputDevice8W *iface,
@@ -1973,6 +2002,14 @@ static HRESULT WINAPI dinput_device_BuildActionMap( IDirectInputDevice8W *iface,
}
}
@@ -144,7 +145,7 @@ index c001d1ef29a..d1ff222a653 100644
if (!has_actions) return DI_NOEFFECT;
if (flags & (DIDBAM_DEFAULT|DIDBAM_PRESERVE|DIDBAM_INITIALIZE|DIDBAM_HWDEFAULTS))
FIXME( "Unimplemented flags %#lx\n", flags );
@@ -1951,6 +1988,7 @@ static HRESULT WINAPI dinput_device_SetActionMap( IDirectInputDevice8W *iface, D
@@ -1990,6 +2027,7 @@ static HRESULT WINAPI dinput_device_SetActionMap( IDirectInputDevice8W *iface, D
DIPROPSTRING dps;
WCHAR username_buf[MAX_PATH];
DWORD username_len = MAX_PATH;
@@ -152,7 +153,7 @@ index c001d1ef29a..d1ff222a653 100644
int i, action = 0, num_actions = 0;
unsigned int offset = 0;
const DIDATAFORMAT *df;
@@ -1983,12 +2021,23 @@ static HRESULT WINAPI dinput_device_SetActionMap( IDirectInputDevice8W *iface, D
@@ -2022,12 +2060,23 @@ static HRESULT WINAPI dinput_device_SetActionMap( IDirectInputDevice8W *iface, D
data_format.dwFlags = DIDF_RELAXIS;
data_format.dwDataSize = format->dwDataSize;
@@ -177,6 +178,81 @@ index c001d1ef29a..d1ff222a653 100644
/* Construct the dataformat and actionmap */
obj_df = malloc( sizeof(DIOBJECTDATAFORMAT) * num_actions );
diff --git a/dlls/dinput/tests/device8.c b/dlls/dinput/tests/device8.c
index 2586736cb1d..e2be36ad7d3 100644
--- a/dlls/dinput/tests/device8.c
+++ b/dlls/dinput/tests/device8.c
@@ -48,6 +48,8 @@ struct enum_data {
/* Dummy GUID */
static const GUID ACTION_MAPPING_GUID = { 0x1, 0x2, 0x3, { 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb } };
+static const GUID NULL_GUID = { 0, 0, 0, { 0, 0, 0, 0, 0, 0, 0, 0 } };
+
enum {
DITEST_AXIS,
DITEST_BUTTON,
@@ -472,6 +474,17 @@ static void test_action_mapping(void)
hr = IDirectInputDevice8_SetActionMap(data.keyboard, data.lpdiaf, NULL, 0);
ok (hr == DI_NOEFFECT, "SetActionMap should have no effect with no actions to map hr=%#lx\n", hr);
+ /* Test that after changing actionformat SetActionMap has effect and that second
+ * SetActionMap call with same empty actionformat has no effect */
+ af.dwDataSize = 4 * 1;
+ af.dwNumActions = 1;
+
+ hr = IDirectInputDevice8_SetActionMap(data.keyboard, data.lpdiaf, NULL, 0);
+ ok (hr != DI_NOEFFECT, "SetActionMap should have effect as actionformat has changed hr=%08x\n", hr);
+
+ hr = IDirectInputDevice8_SetActionMap(data.keyboard, data.lpdiaf, NULL, 0);
+ ok (hr == DI_NOEFFECT, "SetActionMap should have no effect with no actions to map hr=%08x\n", hr);
+
af.dwDataSize = 4 * ARRAY_SIZE(actionMapping);
af.dwNumActions = ARRAY_SIZE(actionMapping);
@@ -663,6 +676,43 @@ static void test_save_settings(void)
"Mapped incorrectly expected: 0x%#lx got: 0x%#lx\n", other_results[1], af.rgoAction[1].dwObjID);
ok (IsEqualGUID(&GUID_SysKeyboard, &af.rgoAction[1].guidInstance), "Action should be mapped to keyboard\n");
+ /* Save and load empty mapping */
+ af.rgoAction[0].dwObjID = 0;
+ af.rgoAction[0].dwHow = 0;
+ memset(&af.rgoAction[0].guidInstance, 0, sizeof(GUID));
+ af.rgoAction[1].dwObjID = 0;
+ af.rgoAction[1].dwHow = 0;
+ memset(&af.rgoAction[1].guidInstance, 0, sizeof(GUID));
+
+ hr = IDirectInputDevice8_SetActionMap(pKey, &af, NULL, DIDSAM_FORCESAVE);
+ ok (SUCCEEDED(hr), "SetActionMap failed hr=%08x\n", hr);
+
+ if (hr == DI_SETTINGSNOTSAVED)
+ {
+ skip ("Can't test saving settings if SetActionMap returns DI_SETTINGSNOTSAVED\n");
+ return;
+ }
+
+ af.rgoAction[0].dwObjID = other_results[0];
+ af.rgoAction[0].dwHow = DIAH_USERCONFIG;
+ af.rgoAction[0].guidInstance = GUID_SysKeyboard;
+ af.rgoAction[1].dwObjID = other_results[1];
+ af.rgoAction[1].dwHow = DIAH_USERCONFIG;
+ af.rgoAction[1].guidInstance = GUID_SysKeyboard;
+
+ hr = IDirectInputDevice8_BuildActionMap(pKey, &af, NULL, 0);
+ ok (SUCCEEDED(hr), "BuildActionMap failed hr=%08x\n", hr);
+
+ ok (other_results[0] == af.rgoAction[0].dwObjID,
+ "Mapped incorrectly expected: 0x%08x got: 0x%08x\n", other_results[0], af.rgoAction[0].dwObjID);
+ ok (af.rgoAction[0].dwHow == DIAH_UNMAPPED, "dwHow should have been DIAH_UNMAPPED\n");
+ ok (IsEqualGUID(&NULL_GUID, &af.rgoAction[0].guidInstance), "Action should not be mapped\n");
+
+ ok (other_results[1] == af.rgoAction[1].dwObjID,
+ "Mapped incorrectly expected: 0x%08x got: 0x%08x\n", other_results[1], af.rgoAction[1].dwObjID);
+ ok (af.rgoAction[1].dwHow == DIAH_UNMAPPED, "dwHow should have been DIAH_UNMAPPED\n");
+ ok (IsEqualGUID(&NULL_GUID, &af.rgoAction[1].guidInstance), "Action should not be mapped\n");
+
IDirectInputDevice_Release(pKey);
IDirectInput_Release(pDI);
}
--
2.39.2
2.34.1

View File

@@ -1,73 +0,0 @@
From 98a9b8337d40c1f6df21227dff3d993f270aef46 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Fri, 24 May 2019 16:16:13 +1000
Subject: [PATCH] dinput: Allow mapping of controls based of Genre type.
---
dlls/dinput/device.c | 41 ++++++++++++++++++++++++++++++++++++++++-
1 file changed, 40 insertions(+), 1 deletion(-)
diff --git a/dlls/dinput/device.c b/dlls/dinput/device.c
index e826cc89c1e..a4815f24958 100644
--- a/dlls/dinput/device.c
+++ b/dlls/dinput/device.c
@@ -1741,8 +1741,15 @@ static HRESULT WINAPI dinput_device_SetActionMap( IDirectInputDevice8W *iface, D
/* Count the actions */
for (i = 0; i < format->dwNumActions; i++)
- if (IsEqualGUID( &impl->guid, &format->rgoAction[i].guidInstance ))
+ {
+ if (IsEqualGUID(&impl->guid, &format->rgoAction[i].guidInstance) ||
+ (IsEqualGUID(&IID_NULL, &format->rgoAction[i].guidInstance) &&
+ ((format->rgoAction[i].dwSemantic & format->dwGenre) == format->dwGenre ||
+ (format->rgoAction[i].dwSemantic & 0xff000000) == 0xff000000 /* Any Axis */) ))
+ {
num_actions++;
+ }
+ }
/* Should return DI_NOEFFECT if we dont have any actions and actionformat has not changed */
if (num_actions == 0 && format->dwCRC == new_crc && !(flags & DIDSAM_FORCESAVE)) return DI_NOEFFECT;
@@ -1779,7 +1786,39 @@ static HRESULT WINAPI dinput_device_SetActionMap( IDirectInputDevice8W *iface, D
action++;
}
+ else if ((format->rgoAction[i].dwSemantic & format->dwGenre) == format->dwGenre ||
+ (format->rgoAction[i].dwSemantic & 0xff000000) == 0xff000000 /* Any Axis */)
+ {
+ DWORD obj_id = semantic_to_obj_id(impl, format->rgoAction[i].dwSemantic);
+ DWORD type = DIDFT_GETTYPE(obj_id);
+ DWORD inst = DIDFT_GETINSTANCE(obj_id);
+ LPDIOBJECTDATAFORMAT obj;
+
+ if (type == DIDFT_PSHBUTTON) type = DIDFT_BUTTON;
+ else if (type == DIDFT_RELAXIS) type = DIDFT_AXIS;
+
+ obj = dataformat_to_odf_by_type(df, inst, type);
+ TRACE("obj %p, inst 0x%08lx, type 0x%08lx\n", obj, inst, type);
+ if(obj)
+ {
+ memcpy(&obj_df[action], obj, df->dwObjSize);
+
+ impl->action_map[action].uAppData = format->rgoAction[i].uAppData;
+ impl->action_map[action].offset = offset;
+ obj_df[action].dwOfs = offset;
+ offset += (type & DIDFT_BUTTON) ? 1 : 4;
+
+ action++;
+ }
+ }
+ }
+
+ if (action == 0)
+ {
+ free( obj_df );
+ return DI_NOEFFECT;
}
+ data_format.dwNumObjs = action;
IDirectInputDevice8_SetDataFormat( iface, &data_format );
--
2.33.0

View File

@@ -1,3 +1,5 @@
Fixes: [34108] dinput: Improve support for user Joystick configuration.
Fixes: [47326] dinput: Allow mapping of controls based of genre type.
Fixes: [35815] dinput: Allow remapping of joystick buttons.
# Seeing active work...
Disabled: true

View File

@@ -1,18 +1,18 @@
From e1c18d8fda84e300fc6ae2b90bf3770c4f2bb2c7 Mon Sep 17 00:00:00 2001
From ca64589b2447f378651f19eb15672f27c2133493 Mon Sep 17 00:00:00 2001
From: Derek Lesho <dlesho@codeweavers.com>
Date: Fri, 19 Mar 2021 17:01:54 -0400
Subject: [PATCH] winegstreamer: Report streams backwards in media source.
Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
---
dlls/winegstreamer/media_source.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
dlls/winegstreamer/media_source.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/winegstreamer/media_source.c b/dlls/winegstreamer/media_source.c
index 542189b28f5..a9e97f545dd 100644
index 1b57d8bfba8..4d2a29a6bc1 100644
--- a/dlls/winegstreamer/media_source.c
+++ b/dlls/winegstreamer/media_source.c
@@ -1496,7 +1496,7 @@ static HRESULT media_source_constructor(IMFByteStream *bytestream, struct media_
@@ -1497,7 +1497,7 @@ static HRESULT media_source_constructor(IMFByteStream *bytestream, struct media_
DWORD len;
char *str;
@@ -21,6 +21,15 @@ index 542189b28f5..a9e97f545dd 100644
for (j = 0; j < ARRAY_SIZE(tags); ++j)
{
@@ -1510,7 +1510,7 @@ static HRESULT media_source_constructor(IMFByteStream *bytestream, struct media_
}
strW = malloc(len * sizeof(*strW));
if (MultiByteToWideChar(CP_UTF8, 0, str, -1, strW, len))
- IMFStreamDescriptor_SetString(descriptors[i], tags[j].mf_attr, strW);
+ IMFStreamDescriptor_SetString(descriptors[object->stream_count - 1 - i], tags[j].mf_attr, strW);
free(strW);
free(str);
}
--
2.38.1
2.40.0

View File

@@ -1,4 +1,4 @@
From 94bf6ec892be0a018d4529456c47df34efdb99ce Mon Sep 17 00:00:00 2001
From 6fbb8f079b1024d742f2cc34425e6099e23f2f39 Mon Sep 17 00:00:00 2001
From: Paul Gofman <pgofman@codeweavers.com>
Date: Thu, 10 Nov 2022 18:53:10 -0600
Subject: [PATCH] ntdll: Support MEM_RESERVE_PLACEHOLDER in
@@ -10,10 +10,10 @@ Based on a patch by Nikolay Sivov.
1 file changed, 24 insertions(+), 2 deletions(-)
diff --git a/dlls/ntdll/unix/virtual.c b/dlls/ntdll/unix/virtual.c
index 66256a4712f..5bea8ba8322 100644
index f078e114b4c..6204ed5a452 100644
--- a/dlls/ntdll/unix/virtual.c
+++ b/dlls/ntdll/unix/virtual.c
@@ -3918,13 +3918,18 @@ static NTSTATUS allocate_virtual_memory( void **ret, SIZE_T *size_ptr, ULONG typ
@@ -3891,13 +3891,18 @@ static NTSTATUS allocate_virtual_memory( void **ret, SIZE_T *size_ptr, ULONG typ
/* Compute the alloc type flags */
@@ -34,7 +34,7 @@ index 66256a4712f..5bea8ba8322 100644
/* Reserve the memory */
server_enter_uninterrupted_section( &virtual_mutex, &sigset );
@@ -3935,6 +3940,7 @@ static NTSTATUS allocate_virtual_memory( void **ret, SIZE_T *size_ptr, ULONG typ
@@ -3908,6 +3913,7 @@ static NTSTATUS allocate_virtual_memory( void **ret, SIZE_T *size_ptr, ULONG typ
{
if (type & MEM_COMMIT) vprot |= VPROT_COMMITTED;
if (type & MEM_WRITE_WATCH) vprot |= VPROT_WRITEWATCH;
@@ -42,7 +42,7 @@ index 66256a4712f..5bea8ba8322 100644
if (protect & PAGE_NOCACHE) vprot |= SEC_NOCACHE;
if (vprot & VPROT_WRITECOPY) status = STATUS_INVALID_PAGE_PROTECTION;
@@ -3954,6 +3960,7 @@ static NTSTATUS allocate_virtual_memory( void **ret, SIZE_T *size_ptr, ULONG typ
@@ -3927,6 +3933,7 @@ static NTSTATUS allocate_virtual_memory( void **ret, SIZE_T *size_ptr, ULONG typ
{
if (!(view = find_view( base, size ))) status = STATUS_NOT_MAPPED_VIEW;
else if (view->protect & SEC_FILE) status = STATUS_ALREADY_COMMITTED;
@@ -50,7 +50,7 @@ index 66256a4712f..5bea8ba8322 100644
else if (!(status = set_protection( view, base, size, protect )) && (view->protect & SEC_RESERVE))
{
SERVER_START_REQ( add_mapping_committed_range )
@@ -3987,6 +3994,7 @@ static NTSTATUS allocate_virtual_memory( void **ret, SIZE_T *size_ptr, ULONG typ
@@ -3960,6 +3967,7 @@ static NTSTATUS allocate_virtual_memory( void **ret, SIZE_T *size_ptr, ULONG typ
NTSTATUS WINAPI NtAllocateVirtualMemory( HANDLE process, PVOID *ret, ULONG_PTR zero_bits,
SIZE_T *size_ptr, ULONG type, ULONG protect )
{
@@ -58,8 +58,8 @@ index 66256a4712f..5bea8ba8322 100644
ULONG_PTR limit;
TRACE("%p %p %08lx %x %08x\n", process, *ret, *size_ptr, (int)type, (int)protect );
@@ -3998,6 +4006,12 @@ NTSTATUS WINAPI NtAllocateVirtualMemory( HANDLE process, PVOID *ret, ULONG_PTR z
if (!is_wow64 && zero_bits >= 32) return STATUS_INVALID_PARAMETER_3;
@@ -3971,6 +3979,12 @@ NTSTATUS WINAPI NtAllocateVirtualMemory( HANDLE process, PVOID *ret, ULONG_PTR z
if (!is_old_wow64() && zero_bits >= 32) return STATUS_INVALID_PARAMETER_3;
#endif
+ if (type & ~type_mask)
@@ -71,7 +71,7 @@ index 66256a4712f..5bea8ba8322 100644
if (process != NtCurrentProcess())
{
apc_call_t call;
@@ -4040,6 +4054,8 @@ NTSTATUS WINAPI NtAllocateVirtualMemoryEx( HANDLE process, PVOID *ret, SIZE_T *s
@@ -4013,6 +4027,8 @@ NTSTATUS WINAPI NtAllocateVirtualMemoryEx( HANDLE process, PVOID *ret, SIZE_T *s
ULONG protect, MEM_EXTENDED_PARAMETER *parameters,
ULONG count )
{
@@ -80,7 +80,7 @@ index 66256a4712f..5bea8ba8322 100644
ULONG_PTR limit = 0;
ULONG_PTR align = 0;
@@ -4048,6 +4064,12 @@ NTSTATUS WINAPI NtAllocateVirtualMemoryEx( HANDLE process, PVOID *ret, SIZE_T *s
@@ -4021,6 +4037,12 @@ NTSTATUS WINAPI NtAllocateVirtualMemoryEx( HANDLE process, PVOID *ret, SIZE_T *s
if (count && !parameters) return STATUS_INVALID_PARAMETER;
@@ -94,5 +94,5 @@ index 66256a4712f..5bea8ba8322 100644
{
MEM_ADDRESS_REQUIREMENTS *r = NULL;
--
2.38.1
2.40.0

View File

@@ -0,0 +1,123 @@
From cd0e7d0bd693a35fde5a83f76af16cd04b17c5e3 Mon Sep 17 00:00:00 2001
From: Torge Matthies <tmatthies@codeweavers.com>
Date: Thu, 30 Mar 2023 05:46:38 +0200
Subject: [PATCH 1/6] ntdll/tests: Add test for file attributes of files with
names beginning with a dot.
---
dlls/ntdll/tests/file.c | 92 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 92 insertions(+)
diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c
index 6186afdfb63..beaa4734931 100644
--- a/dlls/ntdll/tests/file.c
+++ b/dlls/ntdll/tests/file.c
@@ -4051,6 +4051,97 @@ static void test_file_attribute_tag_information(void)
CloseHandle( h );
}
+static void rename_file( HANDLE h, const WCHAR *filename )
+{
+ FILE_RENAME_INFORMATION *fri;
+ UNICODE_STRING ntpath;
+ IO_STATUS_BLOCK io;
+ NTSTATUS status;
+ BOOLEAN ret;
+ ULONG size;
+
+ ret = pRtlDosPathNameToNtPathName_U( filename, &ntpath, NULL, NULL );
+ ok( ret, "RtlDosPathNameToNtPathName_U failed\n" );
+
+ size = offsetof( FILE_RENAME_INFORMATION, FileName ) + ntpath.Length;
+ fri = HeapAlloc( GetProcessHeap(), 0, size );
+ ok( fri != NULL, "HeapAlloc failed\n" );
+ fri->ReplaceIfExists = TRUE;
+ fri->RootDirectory = NULL;
+ fri->FileNameLength = ntpath.Length;
+ memcpy( fri->FileName, ntpath.Buffer, ntpath.Length );
+ pRtlFreeUnicodeString( &ntpath );
+
+ status = pNtSetInformationFile( h, &io, fri, size, FileRenameInformation );
+ HeapFree( GetProcessHeap(), 0, fri );
+ ok( status == STATUS_SUCCESS, "got %#lx\n", status );
+}
+
+static void test_dotfile_file_attributes(void)
+{
+ char temppath[MAX_PATH], filename[MAX_PATH];
+ WCHAR temppathW[MAX_PATH], filenameW[MAX_PATH];
+ FILE_BASIC_INFORMATION info = {};
+ IO_STATUS_BLOCK io;
+ NTSTATUS status;
+ DWORD attrs;
+ HANDLE h;
+
+ GetTempPathA( MAX_PATH, temppath );
+ GetTempFileNameA( temppath, ".foo", 0, filename );
+ h = CreateFileA( filename, GENERIC_READ | GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_FLAG_DELETE_ON_CLOSE, 0 );
+ ok( h != INVALID_HANDLE_VALUE, "failed to create temp file\n" );
+
+ status = nt_get_file_attrs(filename, &attrs);
+ ok( status == STATUS_SUCCESS, "got %#lx\n", status );
+ todo_wine ok( !(attrs & FILE_ATTRIBUTE_HIDDEN), "got attributes %#lx\n", attrs );
+
+ status = pNtQueryInformationFile( h, &io, &info, sizeof(info), FileBasicInformation );
+ ok( status == STATUS_SUCCESS, "got %#lx\n", status );
+ ok( !(info.FileAttributes & FILE_ATTRIBUTE_HIDDEN), "got attributes %#lx\n", info.FileAttributes );
+
+ info.FileAttributes = FILE_ATTRIBUTE_SYSTEM;
+ status = pNtSetInformationFile( h, &io, &info, sizeof(info), FileBasicInformation );
+ ok( status == STATUS_SUCCESS, "got %#lx\n", status );
+
+ status = nt_get_file_attrs(filename, &attrs);
+ ok( status == STATUS_SUCCESS, "got %#lx\n", status );
+ ok( attrs & FILE_ATTRIBUTE_SYSTEM, "got attributes %#lx\n", attrs );
+ todo_wine ok( !(attrs & FILE_ATTRIBUTE_HIDDEN), "got attributes %#lx\n", attrs );
+
+ status = pNtQueryInformationFile( h, &io, &info, sizeof(info), FileBasicInformation );
+ ok( status == STATUS_SUCCESS, "got %#lx\n", status );
+ ok( info.FileAttributes & FILE_ATTRIBUTE_SYSTEM, "got attributes %#lx\n", info.FileAttributes );
+ ok( !(info.FileAttributes & FILE_ATTRIBUTE_HIDDEN), "got attributes %#lx\n", info.FileAttributes );
+
+ CloseHandle( h );
+
+ GetTempPathW( MAX_PATH, temppathW );
+ GetTempFileNameW( temppathW, L"foo", 0, filenameW );
+ h = CreateFileW( filenameW, GENERIC_READ | GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_FLAG_DELETE_ON_CLOSE, 0 );
+ ok( h != INVALID_HANDLE_VALUE, "failed to create temp file\n" );
+
+ GetTempFileNameW( temppathW, L".foo", 0, filenameW );
+ winetest_push_context("foo -> .foo");
+ rename_file( h, filenameW );
+ winetest_pop_context();
+
+ status = pNtQueryInformationFile( h, &io, &info, sizeof(info), FileBasicInformation );
+ ok( status == STATUS_SUCCESS, "got %#lx\n", status );
+ ok( !(info.FileAttributes & FILE_ATTRIBUTE_HIDDEN), "got attributes %#lx\n", info.FileAttributes );
+
+ GetTempFileNameW( temppathW, L"foo", 0, filenameW );
+ winetest_push_context(".foo -> foo");
+ rename_file( h, filenameW );
+ winetest_pop_context();
+
+ status = pNtQueryInformationFile( h, &io, &info, sizeof(info), FileBasicInformation );
+ ok( status == STATUS_SUCCESS, "got %#lx\n", status );
+ ok( !(info.FileAttributes & FILE_ATTRIBUTE_HIDDEN), "got attributes %#lx\n", info.FileAttributes );
+
+ CloseHandle( h );
+}
+
static void test_file_mode(void)
{
UNICODE_STRING file_name, pipe_dev_name, mountmgr_dev_name, mailslot_dev_name;
@@ -5499,6 +5590,7 @@ START_TEST(file)
test_file_id_information();
test_file_access_information();
test_file_attribute_tag_information();
+ test_dotfile_file_attributes();
test_file_mode();
test_file_readonly_access();
test_query_volume_information_file();
--
2.40.0

View File

@@ -0,0 +1,46 @@
From bf28841ea6e717ed625ccd02a025fb6153f45677 Mon Sep 17 00:00:00 2001
From: Torge Matthies <tmatthies@codeweavers.com>
Date: Thu, 30 Mar 2023 05:46:39 +0200
Subject: [PATCH 2/6] ntdll: Do not open-code hidden file handling in
get_dir_data_entry.
Signed-off-by: Torge Matthies <tmatthies@codeweavers.com>
---
dlls/ntdll/unix/file.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
index eca75b2d4fb..f48de4641b3 100644
--- a/dlls/ntdll/unix/file.c
+++ b/dlls/ntdll/unix/file.c
@@ -1303,7 +1303,7 @@ static BOOL is_hidden_file( const UNICODE_STRING *name )
end = p = name->Buffer + name->Length/sizeof(WCHAR);
while (p > name->Buffer && p[-1] == '\\') p--;
while (p > name->Buffer && p[-1] != '\\') p--;
- return (p < end && *p == '.');
+ return (p < end && p + 1 != end && p[0] == '.' && p[1] != '\\' && (p[1] != '.' || (p + 2 != end && p[2] != '\\')));
}
@@ -2224,6 +2224,7 @@ static NTSTATUS get_dir_data_entry( struct dir_data *dir_data, void *info_ptr, I
union file_directory_info *info;
struct stat st;
ULONG name_len, start, dir_size, attributes;
+ UNICODE_STRING name;
if (get_file_info( names->unix_name, &st, &attributes ) == -1)
{
@@ -2253,8 +2254,8 @@ static NTSTATUS get_dir_data_entry( struct dir_data *dir_data, void *info_ptr, I
{
if (st.st_dev != dir_data->id.dev) st.st_ino = 0; /* ignore inode if on a different device */
- if (!show_dot_files && names->long_name[0] == '.' && names->long_name[1] &&
- (names->long_name[1] != '.' || names->long_name[2]))
+ RtlInitUnicodeString( &name, names->long_name );
+ if (is_hidden_file( &name ))
attributes |= FILE_ATTRIBUTE_HIDDEN;
fill_file_info( &st, attributes, info, class );
--
2.40.0

View File

@@ -0,0 +1,91 @@
From 46d8829db7ced55d93da228e7777b9f7a6a02e7d Mon Sep 17 00:00:00 2001
From: Torge Matthies <tmatthies@codeweavers.com>
Date: Thu, 30 Mar 2023 05:46:39 +0200
Subject: [PATCH 3/6] ntdll: Handle hidden file names inside get_file_info
instead of after it.
Signed-off-by: Torge Matthies <tmatthies@codeweavers.com>
---
dlls/ntdll/unix/file.c | 25 +++++++++----------------
1 file changed, 9 insertions(+), 16 deletions(-)
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
index f48de4641b3..59e96a88279 100644
--- a/dlls/ntdll/unix/file.c
+++ b/dlls/ntdll/unix/file.c
@@ -1292,17 +1292,17 @@ static BOOLEAN get_dir_case_sensitivity( const char *dir )
/***********************************************************************
* is_hidden_file
*
- * Check if the specified file should be hidden based on its name and the show dot files option.
+ * Check if the specified file should be hidden based on its unix path and the show dot files option.
*/
-static BOOL is_hidden_file( const UNICODE_STRING *name )
+static BOOL is_hidden_file( const char *name )
{
- WCHAR *p, *end;
+ const char *p, *end;
if (show_dot_files) return FALSE;
- end = p = name->Buffer + name->Length/sizeof(WCHAR);
- while (p > name->Buffer && p[-1] == '\\') p--;
- while (p > name->Buffer && p[-1] != '\\') p--;
+ end = p = name + strlen( name );
+ while (p > name && p[-1] == '/') p--;
+ while (p > name && p[-1] != '/') p--;
return (p < end && p + 1 != end && p[0] == '.' && p[1] != '\\' && (p[1] != '.' || (p + 2 != end && p[2] != '\\')));
}
@@ -1677,6 +1677,9 @@ static int get_file_info( const char *path, struct stat *st, ULONG *attr )
}
*attr |= get_file_attributes( st );
+ if (is_hidden_file( path ))
+ *attr |= FILE_ATTRIBUTE_HIDDEN;
+
attr_len = xattr_get( path, SAMBA_XATTR_DOS_ATTRIB, attr_data, sizeof(attr_data)-1 );
if (attr_len != -1)
*attr |= parse_samba_dos_attrib_data( attr_data, attr_len );
@@ -2224,7 +2227,6 @@ static NTSTATUS get_dir_data_entry( struct dir_data *dir_data, void *info_ptr, I
union file_directory_info *info;
struct stat st;
ULONG name_len, start, dir_size, attributes;
- UNICODE_STRING name;
if (get_file_info( names->unix_name, &st, &attributes ) == -1)
{
@@ -2253,11 +2255,6 @@ static NTSTATUS get_dir_data_entry( struct dir_data *dir_data, void *info_ptr, I
if (class != FileNamesInformation)
{
if (st.st_dev != dir_data->id.dev) st.st_ino = 0; /* ignore inode if on a different device */
-
- RtlInitUnicodeString( &name, names->long_name );
- if (is_hidden_file( &name ))
- attributes |= FILE_ATTRIBUTE_HIDDEN;
-
fill_file_info( &st, attributes, info, class );
}
@@ -4219,7 +4216,6 @@ NTSTATUS WINAPI NtQueryFullAttributesFile( const OBJECT_ATTRIBUTES *attr,
info->AllocationSize = std.AllocationSize;
info->EndOfFile = std.EndOfFile;
info->FileAttributes = basic.FileAttributes;
- if (is_hidden_file( attr->ObjectName )) info->FileAttributes |= FILE_ATTRIBUTE_HIDDEN;
}
free( unix_name );
}
@@ -4250,10 +4246,7 @@ NTSTATUS WINAPI NtQueryAttributesFile( const OBJECT_ATTRIBUTES *attr, FILE_BASIC
else if (!S_ISREG(st.st_mode) && !S_ISDIR(st.st_mode))
status = STATUS_INVALID_INFO_CLASS;
else
- {
status = fill_file_info( &st, attributes, info, FileBasicInformation );
- if (is_hidden_file( attr->ObjectName )) info->FileAttributes |= FILE_ATTRIBUTE_HIDDEN;
- }
free( unix_name );
}
else WARN( "%s not found (%x)\n", debugstr_us(attr->ObjectName), status );
--
2.40.0

View File

@@ -0,0 +1,49 @@
From 0fa1566f7cab73de95f7d4b51b83766576a60727 Mon Sep 17 00:00:00 2001
From: Torge Matthies <tmatthies@codeweavers.com>
Date: Thu, 30 Mar 2023 05:46:39 +0200
Subject: [PATCH 4/6] ntdll: Only infer hidden attribute from file name if
xattr is not present.
Signed-off-by: Torge Matthies <tmatthies@codeweavers.com>
---
dlls/ntdll/tests/file.c | 2 +-
dlls/ntdll/unix/file.c | 5 ++---
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c
index beaa4734931..cdd924a7226 100644
--- a/dlls/ntdll/tests/file.c
+++ b/dlls/ntdll/tests/file.c
@@ -4107,7 +4107,7 @@ static void test_dotfile_file_attributes(void)
status = nt_get_file_attrs(filename, &attrs);
ok( status == STATUS_SUCCESS, "got %#lx\n", status );
ok( attrs & FILE_ATTRIBUTE_SYSTEM, "got attributes %#lx\n", attrs );
- todo_wine ok( !(attrs & FILE_ATTRIBUTE_HIDDEN), "got attributes %#lx\n", attrs );
+ ok( !(attrs & FILE_ATTRIBUTE_HIDDEN), "got attributes %#lx\n", attrs );
status = pNtQueryInformationFile( h, &io, &info, sizeof(info), FileBasicInformation );
ok( status == STATUS_SUCCESS, "got %#lx\n", status );
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
index 59e96a88279..d127e113230 100644
--- a/dlls/ntdll/unix/file.c
+++ b/dlls/ntdll/unix/file.c
@@ -1677,14 +1677,13 @@ static int get_file_info( const char *path, struct stat *st, ULONG *attr )
}
*attr |= get_file_attributes( st );
- if (is_hidden_file( path ))
- *attr |= FILE_ATTRIBUTE_HIDDEN;
-
attr_len = xattr_get( path, SAMBA_XATTR_DOS_ATTRIB, attr_data, sizeof(attr_data)-1 );
if (attr_len != -1)
*attr |= parse_samba_dos_attrib_data( attr_data, attr_len );
else
{
+ if (is_hidden_file( path ))
+ *attr |= FILE_ATTRIBUTE_HIDDEN;
if (errno == ENOTSUP) return ret;
#ifdef ENODATA
if (errno == ENODATA) return ret;
--
2.40.0

View File

@@ -0,0 +1,132 @@
From 2ad3cf7addcbf191db85365c0c52aa24935dcdf5 Mon Sep 17 00:00:00 2001
From: Torge Matthies <tmatthies@codeweavers.com>
Date: Thu, 30 Mar 2023 05:46:39 +0200
Subject: [PATCH 5/6] ntdll: Set xattr in NtCreateFile if inferred and
requested attributes don't match.
And make sure it doesn't get deleted.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53826
Signed-off-by: Torge Matthies <tmatthies@codeweavers.com>
---
dlls/ntdll/tests/file.c | 2 +-
dlls/ntdll/unix/file.c | 26 +++++++++++++++++++-------
2 files changed, 20 insertions(+), 8 deletions(-)
diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c
index cdd924a7226..b96b2e5b072 100644
--- a/dlls/ntdll/tests/file.c
+++ b/dlls/ntdll/tests/file.c
@@ -4094,7 +4094,7 @@ static void test_dotfile_file_attributes(void)
status = nt_get_file_attrs(filename, &attrs);
ok( status == STATUS_SUCCESS, "got %#lx\n", status );
- todo_wine ok( !(attrs & FILE_ATTRIBUTE_HIDDEN), "got attributes %#lx\n", attrs );
+ ok( !(attrs & FILE_ATTRIBUTE_HIDDEN), "got attributes %#lx\n", attrs );
status = pNtQueryInformationFile( h, &io, &info, sizeof(info), FileBasicInformation );
ok( status == STATUS_SUCCESS, "got %#lx\n", status );
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
index d127e113230..5f5aa9be87c 100644
--- a/dlls/ntdll/unix/file.c
+++ b/dlls/ntdll/unix/file.c
@@ -1600,11 +1600,11 @@ static int fd_get_file_info( int fd, unsigned int options, struct stat *st, ULON
}
-static int fd_set_dos_attrib( int fd, UINT attr )
+static int fd_set_dos_attrib( int fd, UINT attr, BOOL force_set )
{
/* we only store the HIDDEN and SYSTEM attributes */
attr &= XATTR_ATTRIBS_MASK;
- if (attr != 0)
+ if (force_set || attr != 0)
{
/* encode the attributes in Samba 3 ASCII format. Samba 4 has extended
* this format with more features, but retains compatibility with the
@@ -1618,7 +1618,7 @@ static int fd_set_dos_attrib( int fd, UINT attr )
/* set the stat info and file attributes for a file (by file descriptor) */
-static NTSTATUS fd_set_file_info( int fd, UINT attr )
+static NTSTATUS fd_set_file_info( int fd, UINT attr, BOOL force_set_xattr )
{
struct stat st;
@@ -1637,7 +1637,8 @@ static NTSTATUS fd_set_file_info( int fd, UINT attr )
}
if (fchmod( fd, st.st_mode ) == -1) return errno_to_status( errno );
- if (fd_set_dos_attrib( fd, attr ) == -1 && errno != ENOTSUP)
+ force_set_xattr = force_set_xattr || st.st_nlink > 1;
+ if (fd_set_dos_attrib( fd, attr, force_set_xattr ) == -1 && errno != ENOTSUP)
WARN( "Failed to set extended attribute " SAMBA_XATTR_DOS_ATTRIB ". errno %d (%s)\n",
errno, strerror( errno ) );
@@ -3963,6 +3964,7 @@ NTSTATUS WINAPI NtCreateFile( HANDLE *handle, ACCESS_MASK access, OBJECT_ATTRIBU
OBJECT_ATTRIBUTES new_attr;
UNICODE_STRING nt_name;
char *unix_name;
+ BOOL name_hidden = FALSE;
BOOL created = FALSE;
unsigned int status;
@@ -4005,6 +4007,7 @@ NTSTATUS WINAPI NtCreateFile( HANDLE *handle, ACCESS_MASK access, OBJECT_ATTRIBU
if (status == STATUS_SUCCESS)
{
+ name_hidden = is_hidden_file( unix_name );
status = open_unix_file( handle, unix_name, access, &new_attr, attributes,
sharing, disposition, options, ea_buffer, ea_length );
free( unix_name );
@@ -4032,14 +4035,15 @@ NTSTATUS WINAPI NtCreateFile( HANDLE *handle, ACCESS_MASK access, OBJECT_ATTRIBU
break;
}
- if (io->Information == FILE_CREATED && (attributes & XATTR_ATTRIBS_MASK))
+ if (io->Information == FILE_CREATED &&
+ ((attributes & XATTR_ATTRIBS_MASK) || name_hidden))
{
int fd, needs_close;
/* set any DOS extended attributes */
if (!server_get_unix_fd( *handle, 0, &fd, &needs_close, NULL, NULL ))
{
- if (fd_set_dos_attrib( fd, attributes ) == -1 && errno != ENOTSUP)
+ if (fd_set_dos_attrib( fd, attributes, TRUE ) == -1 && errno != ENOTSUP)
WARN( "Failed to set extended attribute " SAMBA_XATTR_DOS_ATTRIB ". errno %d (%s)",
errno, strerror( errno ) );
if (needs_close) close( fd );
@@ -4561,10 +4565,14 @@ NTSTATUS WINAPI NtSetInformationFile( HANDLE handle, IO_STATUS_BLOCK *io,
{
const FILE_BASIC_INFORMATION *info = ptr;
LARGE_INTEGER mtime, atime;
+ char *unix_name;
if ((status = server_get_unix_fd( handle, 0, &fd, &needs_close, NULL, NULL )))
return io->u.Status = status;
+ if ((status = server_get_unix_name( handle, &unix_name )))
+ unix_name = NULL;
+
mtime.QuadPart = info->LastWriteTime.QuadPart == -1 ? 0 : info->LastWriteTime.QuadPart;
atime.QuadPart = info->LastAccessTime.QuadPart == -1 ? 0 : info->LastAccessTime.QuadPart;
@@ -4572,9 +4580,13 @@ NTSTATUS WINAPI NtSetInformationFile( HANDLE handle, IO_STATUS_BLOCK *io,
status = set_file_times( fd, &mtime, &atime );
if (status == STATUS_SUCCESS && info->FileAttributes)
- status = fd_set_file_info( fd, info->FileAttributes );
+ {
+ BOOL force_xattr = unix_name && is_hidden_file( unix_name );
+ status = fd_set_file_info( fd, info->FileAttributes, force_xattr );
+ }
if (needs_close) close( fd );
+ free( unix_name );
}
else status = STATUS_INVALID_PARAMETER_3;
break;
--
2.40.0

View File

@@ -0,0 +1,43 @@
From 6fa8d2eea71223e52ab957247cb91011404ee381 Mon Sep 17 00:00:00 2001
From: Torge Matthies <tmatthies@codeweavers.com>
Date: Thu, 30 Mar 2023 05:46:39 +0200
Subject: [PATCH 6/6] ntdll/tests: Increase margins in timer merging tests.
This test failed in the GitLab test runner.
Signed-off-by: Torge Matthies <tmatthies@codeweavers.com>
---
dlls/ntdll/tests/threadpool.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/dlls/ntdll/tests/threadpool.c b/dlls/ntdll/tests/threadpool.c
index 168f00c2852..c23157d3207 100644
--- a/dlls/ntdll/tests/threadpool.c
+++ b/dlls/ntdll/tests/threadpool.c
@@ -1563,18 +1563,18 @@ static void test_tp_window_length(void)
info2.ticks = 0;
NtQuerySystemTime( &when );
- when.QuadPart += (ULONGLONG)250 * 10000;
+ when.QuadPart += (ULONGLONG)500 * 10000;
pTpSetTimer(timer2, &when, 0, 0);
- Sleep(50);
- when.QuadPart -= (ULONGLONG)150 * 10000;
- pTpSetTimer(timer1, &when, 0, 75);
+ Sleep(100);
+ when.QuadPart -= (ULONGLONG)300 * 10000;
+ pTpSetTimer(timer1, &when, 0, 150);
result = WaitForSingleObject(semaphore, 1000);
ok(result == WAIT_OBJECT_0, "WaitForSingleObject returned %lu\n", result);
result = WaitForSingleObject(semaphore, 1000);
ok(result == WAIT_OBJECT_0, "WaitForSingleObject returned %lu\n", result);
ok(info1.ticks != 0 && info2.ticks != 0, "expected that ticks are nonzero\n");
- ok(info2.ticks >= info1.ticks + 75 || broken(info2.ticks < info1.ticks + 75) /* Win 2008 */,
+ ok(info2.ticks >= info1.ticks + 150 || broken(info2.ticks < info1.ticks + 150) /* Win 2008 */,
"expected that timers are not merged\n");
/* timers will be merged */
--
2.40.0

View File

@@ -0,0 +1,2 @@
Fixes: [53826] Attempting to install / update battle.net fails with Qt error
MR: [1148] ntdll: Mark created files beginning with a dot as not hidden.

View File

@@ -1,18 +1,18 @@
From b08427ea0575faf213100269bf5bc931ec05930b Mon Sep 17 00:00:00 2001
From b1fa0df72c80753864dd001f45278f45c162bb2e Mon Sep 17 00:00:00 2001
From: Zebediah Figura <z.figura12@gmail.com>
Date: Fri, 21 May 2021 21:52:06 -0500
Subject: [PATCH] ntdll: Always start the initial process through start.exe.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
---
dlls/ntdll/unix/env.c | 19 +++----------------
1 file changed, 3 insertions(+), 16 deletions(-)
dlls/ntdll/unix/env.c | 26 +++-----------------------
1 file changed, 3 insertions(+), 23 deletions(-)
diff --git a/dlls/ntdll/unix/env.c b/dlls/ntdll/unix/env.c
index ae1afb2797b..02af2c5ca5a 100644
index 3c178350f2b..eb7a1d6c7e5 100644
--- a/dlls/ntdll/unix/env.c
+++ b/dlls/ntdll/unix/env.c
@@ -2116,6 +2116,7 @@ static void init_peb( RTL_USER_PROCESS_PARAMETERS *params, void *module )
@@ -1901,6 +1901,7 @@ static void init_peb( RTL_USER_PROCESS_PARAMETERS *params, void *module )
*/
static RTL_USER_PROCESS_PARAMETERS *build_initial_params( void **module )
{
@@ -20,15 +20,22 @@ index ae1afb2797b..02af2c5ca5a 100644
static const WCHAR valueW[] = {'1',0};
static const WCHAR pathW[] = {'P','A','T','H'};
RTL_USER_PROCESS_PARAMETERS *params = NULL;
@@ -2144,22 +2145,8 @@ static RTL_USER_PROCESS_PARAMETERS *build_initial_params( void **module )
@@ -1929,29 +1930,8 @@ static RTL_USER_PROCESS_PARAMETERS *build_initial_params( void **module )
add_registry_environment( &env, &env_pos, &env_size );
env[env_pos++] = 0;
- status = load_main_exe( NULL, main_argv[1], curdir, &image, module );
- if (!status)
- {
- char *loader;
-
- if (main_image_info.ImageCharacteristics & IMAGE_FILE_DLL) status = STATUS_INVALID_IMAGE_FORMAT;
- if (main_image_info.Machine != current_machine) status = STATUS_INVALID_IMAGE_FORMAT;
- /* if we have to use a different loader, fall back to start.exe */
- if ((loader = get_alternate_wineloader( main_image_info.Machine )))
- {
- free( loader );
- status = STATUS_INVALID_IMAGE_FORMAT;
- }
- }
-
- if (status) /* try launching it through start.exe */
@@ -46,5 +53,5 @@ index ae1afb2797b..02af2c5ca5a 100644
main_wargv = build_wargv( get_dos_path( image ));
cmdline = build_command_line( main_wargv );
--
2.32.0
2.40.0

View File

@@ -0,0 +1,125 @@
From d59b98f9fb10a3d634541d4e538ed7500a183c77 Mon Sep 17 00:00:00 2001
From: Paul Gofman <pgofman@codeweavers.com>
Date: Mon, 20 Mar 2023 11:59:14 -0600
Subject: [PATCH 1/3] win32u: Set DEVPKEY_Device_MatchingDeviceId for GPUs.
---
dlls/gdi32/tests/driver.c | 50 +++++++++++++++++++++++++++++++++++++++
dlls/win32u/sysparams.c | 19 +++++++++++++++
2 files changed, 69 insertions(+)
diff --git a/dlls/gdi32/tests/driver.c b/dlls/gdi32/tests/driver.c
index 94f93d61207..092bde0e5c1 100644
--- a/dlls/gdi32/tests/driver.c
+++ b/dlls/gdi32/tests/driver.c
@@ -32,6 +32,7 @@
#include "initguid.h"
#include "setupapi.h"
#include "ntddvdeo.h"
+#include "devpkey.h"
#include "wine/test.h"
@@ -996,6 +997,54 @@ static void test_D3DKMTQueryVideoMemoryInfo(void)
ok(status == STATUS_SUCCESS, "Got unexpected return code %#lx.\n", status);
}
+static void test_gpu_device_properties_guid(const GUID *devinterface_guid)
+{
+ BYTE iface_detail_buffer[sizeof(SP_DEVICE_INTERFACE_DETAIL_DATA_W) + 256 * sizeof(WCHAR)];
+ SP_DEVINFO_DATA device_data = {sizeof(device_data)};
+ SP_DEVICE_INTERFACE_DATA iface = {sizeof(iface)};
+ SP_DEVICE_INTERFACE_DETAIL_DATA_W *iface_data;
+ WCHAR device_id[256];
+ DEVPROPTYPE type;
+ unsigned int i;
+ HDEVINFO set;
+ BOOL ret;
+
+ /* Make sure display devices are initialized. */
+ SendMessageW(GetDesktopWindow(), WM_NULL, 0, 0);
+
+ set = SetupDiGetClassDevsW(devinterface_guid, NULL, NULL, DIGCF_DEVICEINTERFACE | DIGCF_PRESENT);
+ ok(set != INVALID_HANDLE_VALUE, "SetupDiGetClassDevs failed, error %lu.\n", GetLastError());
+
+ iface_data = (SP_DEVICE_INTERFACE_DETAIL_DATA_W *)iface_detail_buffer;
+ iface_data->cbSize = sizeof(*iface_data);
+
+ i = 0;
+ while (SetupDiEnumDeviceInterfaces(set, NULL, devinterface_guid, i, &iface))
+ {
+ ret = SetupDiGetDeviceInterfaceDetailW(set, &iface, iface_data,
+ sizeof(iface_detail_buffer), NULL, &device_data );
+ ok(ret, "Got unexpected ret %d, GetLastError() %lu.\n", ret, GetLastError());
+
+ ret = SetupDiGetDevicePropertyW(set, &device_data, &DEVPKEY_Device_MatchingDeviceId, &type,
+ (BYTE *)device_id, sizeof(device_id), NULL, 0);
+ ok(ret, "Got unexpected ret %d, GetLastError() %lu.\n", ret, GetLastError());
+ ok(type == DEVPROP_TYPE_STRING, "Got type %ld.\n", type);
+
+ ++i;
+ }
+ SetupDiDestroyDeviceInfoList(set);
+}
+
+static void test_gpu_device_properties(void)
+{
+ winetest_push_context("GUID_DEVINTERFACE_DISPLAY_ADAPTER");
+ test_gpu_device_properties_guid(&GUID_DEVINTERFACE_DISPLAY_ADAPTER);
+ winetest_pop_context();
+ winetest_push_context("GUID_DISPLAY_DEVICE_ARRIVAL");
+ test_gpu_device_properties_guid(&GUID_DISPLAY_DEVICE_ARRIVAL);
+ winetest_pop_context();
+}
+
START_TEST(driver)
{
HMODULE gdi32 = GetModuleHandleA("gdi32.dll");
@@ -1025,6 +1074,7 @@ START_TEST(driver)
test_D3DKMTCheckOcclusion();
test_D3DKMTOpenAdapterFromDeviceName();
test_D3DKMTQueryVideoMemoryInfo();
+ test_gpu_device_properties();
FreeLibrary(dwmapi);
}
diff --git a/dlls/win32u/sysparams.c b/dlls/win32u/sysparams.c
index 60b12321953..a02158a17a0 100644
--- a/dlls/win32u/sysparams.c
+++ b/dlls/win32u/sysparams.c
@@ -93,6 +93,14 @@ static const WCHAR devpropkey_gpu_luidW[] =
'\\','0','0','0','2'
};
+static const WCHAR devpkey_device_matching_device_id[] =
+{
+ 'P','r','o','p','e','r','t','i','e','s',
+ '\\','{','A','8','B','8','6','5','D','D','-','2','E','3','D','-','4','0','9','4',
+ '-','A','D','9','7','-','E','5','9','3','A','7','0','C','7','5','D','6','}',
+ '\\','0','0','0','8'
+};
+
static const WCHAR devpropkey_device_ispresentW[] =
{
'P','r','o','p','e','r','t','i','e','s',
@@ -1218,6 +1226,17 @@ static void add_gpu( const struct gdi_gpu *gpu, void *param )
bufferW[size / sizeof(WCHAR)] = 0; /* for REG_MULTI_SZ */
set_reg_value( hkey, hardware_idW, REG_MULTI_SZ, bufferW, size + sizeof(WCHAR) );
+ if ((subkey = reg_create_key( hkey, devpkey_device_matching_device_id,
+ sizeof(devpkey_device_matching_device_id), 0, NULL )))
+ {
+ if (gpu->vendor_id && gpu->device_id)
+ set_reg_value( subkey, NULL, 0xffff0000 | DEVPROP_TYPE_STRING, bufferW, size );
+ else
+ set_reg_value( subkey, NULL, 0xffff0000 | DEVPROP_TYPE_STRING, bufferW,
+ asciiz_to_unicode( bufferW, "ROOT\\BasicRender" ));
+ NtClose( subkey );
+ }
+
desc = gpu->name;
if (!desc[0]) desc = wine_adapterW;
set_reg_value( hkey, device_descW, REG_SZ, desc, (lstrlenW( desc ) + 1) * sizeof(WCHAR) );
--
2.40.0

View File

@@ -0,0 +1,80 @@
From 1846ff937ff4d4c4eb1b9a2311c385b52ac864cc Mon Sep 17 00:00:00 2001
From: Paul Gofman <pgofman@codeweavers.com>
Date: Mon, 20 Mar 2023 13:02:31 -0600
Subject: [PATCH 2/3] win32u: Set DEVPKEY_Device_BusNumber for GPUs.
---
dlls/gdi32/tests/driver.c | 12 ++++++++++++
dlls/win32u/sysparams.c | 19 +++++++++++++++++++
2 files changed, 31 insertions(+)
diff --git a/dlls/gdi32/tests/driver.c b/dlls/gdi32/tests/driver.c
index 092bde0e5c1..eabd3ed15b8 100644
--- a/dlls/gdi32/tests/driver.c
+++ b/dlls/gdi32/tests/driver.c
@@ -1006,6 +1006,7 @@ static void test_gpu_device_properties_guid(const GUID *devinterface_guid)
WCHAR device_id[256];
DEVPROPTYPE type;
unsigned int i;
+ UINT32 value;
HDEVINFO set;
BOOL ret;
@@ -1030,6 +1031,17 @@ static void test_gpu_device_properties_guid(const GUID *devinterface_guid)
ok(ret, "Got unexpected ret %d, GetLastError() %lu.\n", ret, GetLastError());
ok(type == DEVPROP_TYPE_STRING, "Got type %ld.\n", type);
+ ret = SetupDiGetDevicePropertyW(set, &device_data, &DEVPKEY_Device_BusNumber, &type,
+ (BYTE *)&value, sizeof(value), NULL, 0);
+ if (!wcsicmp(device_id, L"root\\basicrender") || !wcsicmp(device_id, L"root\\basicdisplay"))
+ {
+ ok(!ret, "Found Bus Id.\n");
+ }
+ else
+ {
+ ok(ret, "Got unexpected ret %d, GetLastError() %lu, %s.\n", ret, GetLastError(), debugstr_w(device_id));
+ ok(type == DEVPROP_TYPE_UINT32, "Got type %ld.\n", type);
+ }
++i;
}
SetupDiDestroyDeviceInfoList(set);
diff --git a/dlls/win32u/sysparams.c b/dlls/win32u/sysparams.c
index a02158a17a0..f4e8eff98e2 100644
--- a/dlls/win32u/sysparams.c
+++ b/dlls/win32u/sysparams.c
@@ -101,6 +101,14 @@ static const WCHAR devpkey_device_matching_device_id[] =
'\\','0','0','0','8'
};
+static const WCHAR devpkey_device_bus_number[] =
+{
+ 'P','r','o','p','e','r','t','i','e','s',
+ '\\','{','A','4','5','C','2','5','4','E','-','D','F','1','C','-','4','E','F','D',
+ '-','8','0','2','0','-','6','7','D','1','4','6','A','8','5','0','E','0','}',
+ '\\','0','0','1','7'
+};
+
static const WCHAR devpropkey_device_ispresentW[] =
{
'P','r','o','p','e','r','t','i','e','s',
@@ -1237,6 +1245,17 @@ static void add_gpu( const struct gdi_gpu *gpu, void *param )
NtClose( subkey );
}
+ if (gpu->vendor_id && gpu->device_id)
+ {
+ if ((subkey = reg_create_key( hkey, devpkey_device_bus_number,
+ sizeof(devpkey_device_bus_number), 0, NULL )))
+ {
+ set_reg_value( subkey, NULL, 0xffff0000 | DEVPROP_TYPE_UINT32,
+ &gpu_index, sizeof(gpu_index) );
+ NtClose( subkey );
+ }
+ }
+
desc = gpu->name;
if (!desc[0]) desc = wine_adapterW;
set_reg_value( hkey, device_descW, REG_SZ, desc, (lstrlenW( desc ) + 1) * sizeof(WCHAR) );
--
2.40.0

View File

@@ -0,0 +1,99 @@
From 5a493bfd785962d3b6043e6eac00712a73a81cc6 Mon Sep 17 00:00:00 2001
From: Paul Gofman <pgofman@codeweavers.com>
Date: Mon, 20 Mar 2023 13:18:26 -0600
Subject: [PATCH 3/3] win32u: Set DEVPKEY_Device_RemovalPolicy for GPUs.
---
dlls/gdi32/tests/driver.c | 8 ++++++++
dlls/win32u/sysparams.c | 19 +++++++++++++++++++
include/cfgmgr32.h | 4 ++++
3 files changed, 31 insertions(+)
diff --git a/dlls/gdi32/tests/driver.c b/dlls/gdi32/tests/driver.c
index eabd3ed15b8..a618b5e51a4 100644
--- a/dlls/gdi32/tests/driver.c
+++ b/dlls/gdi32/tests/driver.c
@@ -33,6 +33,7 @@
#include "setupapi.h"
#include "ntddvdeo.h"
#include "devpkey.h"
+#include "cfgmgr32.h"
#include "wine/test.h"
@@ -1042,6 +1043,13 @@ static void test_gpu_device_properties_guid(const GUID *devinterface_guid)
ok(ret, "Got unexpected ret %d, GetLastError() %lu, %s.\n", ret, GetLastError(), debugstr_w(device_id));
ok(type == DEVPROP_TYPE_UINT32, "Got type %ld.\n", type);
}
+
+ ret = SetupDiGetDevicePropertyW(set, &device_data, &DEVPKEY_Device_RemovalPolicy, &type,
+ (BYTE *)&value, sizeof(value), NULL, 0);
+ ok(ret, "Got unexpected ret %d, GetLastError() %lu, %s.\n", ret, GetLastError(), debugstr_w(device_id));
+ ok(value == CM_REMOVAL_POLICY_EXPECT_NO_REMOVAL || value == CM_REMOVAL_POLICY_EXPECT_ORDERLY_REMOVAL
+ || value == CM_REMOVAL_POLICY_EXPECT_SURPRISE_REMOVAL, "Got value %d.\n", value);
+ ok(type == DEVPROP_TYPE_UINT32, "Got type %ld.\n", type);
++i;
}
SetupDiDestroyDeviceInfoList(set);
diff --git a/dlls/win32u/sysparams.c b/dlls/win32u/sysparams.c
index f4e8eff98e2..76703d2da52 100644
--- a/dlls/win32u/sysparams.c
+++ b/dlls/win32u/sysparams.c
@@ -32,6 +32,7 @@
#include "ntgdi_private.h"
#include "ntuser_private.h"
#include "devpropdef.h"
+#include "cfgmgr32.h"
#include "wine/wingdi16.h"
#include "wine/server.h"
@@ -109,6 +110,14 @@ static const WCHAR devpkey_device_bus_number[] =
'\\','0','0','1','7'
};
+static const WCHAR devpkey_device_removal_policy[] =
+{
+ 'P','r','o','p','e','r','t','i','e','s',
+ '\\','{','A','4','5','C','2','5','4','E','-','D','F','1','C','-','4','E','F','D',
+ '-','8','0','2','0','-','6','7','D','1','4','6','A','8','5','0','E','0','}',
+ '\\','0','0','2','1'
+};
+
static const WCHAR devpropkey_device_ispresentW[] =
{
'P','r','o','p','e','r','t','i','e','s',
@@ -1256,6 +1265,16 @@ static void add_gpu( const struct gdi_gpu *gpu, void *param )
}
}
+ if ((subkey = reg_create_key( hkey, devpkey_device_removal_policy,
+ sizeof(devpkey_device_removal_policy), 0, NULL )))
+ {
+ unsigned int removal_policy = CM_REMOVAL_POLICY_EXPECT_NO_REMOVAL;
+
+ set_reg_value( subkey, NULL, 0xffff0000 | DEVPROP_TYPE_UINT32,
+ &removal_policy, sizeof(removal_policy) );
+ NtClose( subkey );
+ }
+
desc = gpu->name;
if (!desc[0]) desc = wine_adapterW;
set_reg_value( hkey, device_descW, REG_SZ, desc, (lstrlenW( desc ) + 1) * sizeof(WCHAR) );
diff --git a/include/cfgmgr32.h b/include/cfgmgr32.h
index b78f118622e..04f1f80b174 100644
--- a/include/cfgmgr32.h
+++ b/include/cfgmgr32.h
@@ -180,6 +180,10 @@ typedef DWORD CONFIGRET;
#define CM_REGISTRY_USER 0x0100
#define CM_REGISTRY_CONFIG 0x0200
+#define CM_REMOVAL_POLICY_EXPECT_NO_REMOVAL 1
+#define CM_REMOVAL_POLICY_EXPECT_ORDERLY_REMOVAL 2
+#define CM_REMOVAL_POLICY_EXPECT_SURPRISE_REMOVAL 3
+
typedef DWORD DEVINST, *PDEVINST;
typedef DWORD DEVNODE, *PDEVNODE;
typedef HANDLE HMACHINE, *PHMACHINE;
--
2.40.0

View File

@@ -0,0 +1 @@
MR 2449: Allow Diable IV to run without reporting errors.

View File

@@ -1,4 +1,4 @@
From 5416d2737c78ddef1406e09b79903f93b0065104 Mon Sep 17 00:00:00 2001
From 722f6a749e5ca1784bd493fdf10ee1fa4c26b4f7 Mon Sep 17 00:00:00 2001
From: Paul Gofman <gofmanp@gmail.com>
Date: Mon, 25 Feb 2019 13:17:01 +0300
Subject: [PATCH] wined3d: Use UBO for vertex shader float constants if
@@ -16,20 +16,20 @@ Subject: [PATCH] wined3d: Use UBO for vertex shader float constants if
8 files changed, 148 insertions(+), 14 deletions(-)
diff --git a/dlls/d3d8/directx.c b/dlls/d3d8/directx.c
index 973c7fea779..3c2f270015e 100644
index b35abc6b699..fc6c394569d 100644
--- a/dlls/d3d8/directx.c
+++ b/dlls/d3d8/directx.c
@@ -476,7 +476,7 @@ BOOL d3d8_init(struct d3d8 *d3d8)
DWORD flags = WINED3D_LEGACY_DEPTH_BIAS | WINED3D_VIDMEM_ACCOUNTING
| WINED3D_HANDLE_RESTORE | WINED3D_PIXEL_CENTER_INTEGER
| WINED3D_LEGACY_UNBOUND_RESOURCE_COLOR | WINED3D_NO_PRIMITIVE_RESTART
- | WINED3D_LEGACY_CUBEMAP_FILTERING | WINED3D_NO_DRAW_INDIRECT;
+ | WINED3D_LEGACY_CUBEMAP_FILTERING | WINED3D_NO_DRAW_INDIRECT | WINED3D_LEGACY_SHADER_CONSTANTS;
DWORD flags = WINED3D_LEGACY_DEPTH_BIAS | WINED3D_HANDLE_RESTORE
| WINED3D_PIXEL_CENTER_INTEGER | WINED3D_LEGACY_UNBOUND_RESOURCE_COLOR
| WINED3D_NO_PRIMITIVE_RESTART | WINED3D_LEGACY_CUBEMAP_FILTERING
- | WINED3D_NO_DRAW_INDIRECT;
+ | WINED3D_NO_DRAW_INDIRECT | WINED3D_LEGACY_SHADER_CONSTANTS;
unsigned int adapter_idx, output_idx, adapter_count, output_count = 0;
struct wined3d_adapter *wined3d_adapter;
diff --git a/dlls/d3d9/directx.c b/dlls/d3d9/directx.c
index 64291c586bb..cd76dfdcf74 100644
index 3dc7ff6da53..2a7a0ff3368 100644
--- a/dlls/d3d9/directx.c
+++ b/dlls/d3d9/directx.c
@@ -685,7 +685,7 @@ BOOL d3d9_init(struct d3d9 *d3d9, BOOL extended)
@@ -42,10 +42,10 @@ index 64291c586bb..cd76dfdcf74 100644
struct wined3d_adapter *wined3d_adapter;
diff --git a/dlls/wined3d/adapter_gl.c b/dlls/wined3d/adapter_gl.c
index 15fb5218610..11a1665c8e8 100644
index d4163b88d26..9017199c5a8 100644
--- a/dlls/wined3d/adapter_gl.c
+++ b/dlls/wined3d/adapter_gl.c
@@ -3107,6 +3107,9 @@ static void wined3d_adapter_init_limits(struct wined3d_gl_info *gl_info)
@@ -3108,6 +3108,9 @@ static void wined3d_adapter_init_limits(struct wined3d_gl_info *gl_info)
gl_info->limits.uniform_blocks[WINED3D_SHADER_TYPE_VERTEX] = min(gl_max, WINED3D_MAX_CBS);
TRACE("Max vertex uniform blocks: %u (%d).\n",
gl_info->limits.uniform_blocks[WINED3D_SHADER_TYPE_VERTEX], gl_max);
@@ -56,7 +56,7 @@ index 15fb5218610..11a1665c8e8 100644
}
if (gl_info->supported[ARB_TESSELLATION_SHADER])
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
index 594fdf73f46..36246a5cd60 100644
index 7dc0de1b596..db0e01515a7 100644
--- a/dlls/wined3d/glsl_shader.c
+++ b/dlls/wined3d/glsl_shader.c
@@ -132,6 +132,10 @@ struct shader_glsl_priv
@@ -86,7 +86,7 @@ index 594fdf73f46..36246a5cd60 100644
};
struct glsl_ps_compiled_shader
@@ -1179,12 +1185,54 @@ static void walk_constant_heap_clamped(const struct wined3d_gl_info *gl_info,
@@ -1177,12 +1183,54 @@ static void walk_constant_heap_clamped(const struct wined3d_gl_info *gl_info,
checkGLcall("walk_constant_heap_clamped()");
}
@@ -142,7 +142,7 @@ index 594fdf73f46..36246a5cd60 100644
/* 1.X pshaders have the constants clamped to [-1;1] implicitly. */
if (shader->reg_maps.shader_version.major == 1
@@ -1517,7 +1565,7 @@ static void shader_glsl_load_constants(void *shader_priv, struct wined3d_context
@@ -1515,7 +1563,7 @@ static void shader_glsl_load_constants(void *shader_priv, struct wined3d_context
{
const struct wined3d_shader *vshader = state->shader[WINED3D_SHADER_TYPE_VERTEX];
const struct wined3d_shader *pshader = state->shader[WINED3D_SHADER_TYPE_PIXEL];
@@ -151,7 +151,7 @@ index 594fdf73f46..36246a5cd60 100644
struct wined3d_context_gl *context_gl = wined3d_context_gl(context);
struct glsl_shader_prog_link *prog = ctx_data->glsl_program;
const struct wined3d_gl_info *gl_info = context_gl->gl_info;
@@ -1534,9 +1582,32 @@ static void shader_glsl_load_constants(void *shader_priv, struct wined3d_context
@@ -1532,9 +1580,32 @@ static void shader_glsl_load_constants(void *shader_priv, struct wined3d_context
constant_version = prog->constant_version;
update_mask = context->constant_update_mask & prog->constant_update_mask;
@@ -185,7 +185,7 @@ index 594fdf73f46..36246a5cd60 100644
if (update_mask & WINED3D_SHADER_CONST_VS_I)
shader_glsl_load_constants_i(vshader, gl_info, state->vs_consts_i,
@@ -1689,7 +1760,7 @@ static void shader_glsl_load_constants(void *shader_priv, struct wined3d_context
@@ -1687,7 +1758,7 @@ static void shader_glsl_load_constants(void *shader_priv, struct wined3d_context
if (update_mask & WINED3D_SHADER_CONST_PS_F)
shader_glsl_load_constants_f(pshader, gl_info, state->ps_consts_f,
@@ -194,7 +194,7 @@ index 594fdf73f46..36246a5cd60 100644
if (update_mask & WINED3D_SHADER_CONST_PS_I)
shader_glsl_load_constants_i(pshader, gl_info, state->ps_consts_i,
@@ -1828,6 +1899,12 @@ static void shader_glsl_update_float_vertex_constants(struct wined3d_device *dev
@@ -1826,6 +1897,12 @@ static void shader_glsl_update_float_vertex_constants(struct wined3d_device *dev
struct constant_heap *heap = &priv->vconst_heap;
UINT i;
@@ -207,7 +207,7 @@ index 594fdf73f46..36246a5cd60 100644
for (i = start; i < count + start; ++i)
{
update_heap_entry(heap, i, priv->next_constant_version);
@@ -1840,6 +1917,9 @@ static void shader_glsl_update_float_pixel_constants(struct wined3d_device *devi
@@ -1838,6 +1915,9 @@ static void shader_glsl_update_float_pixel_constants(struct wined3d_device *devi
struct constant_heap *heap = &priv->pconst_heap;
UINT i;
@@ -217,7 +217,7 @@ index 594fdf73f46..36246a5cd60 100644
for (i = start; i < count + start; ++i)
{
update_heap_entry(heap, i, priv->next_constant_version);
@@ -2157,6 +2237,7 @@ static void shader_generate_glsl_declarations(const struct wined3d_context_gl *c
@@ -2155,6 +2235,7 @@ static void shader_generate_glsl_declarations(const struct wined3d_context_gl *c
const struct wined3d_shader_reg_maps *reg_maps, const struct shader_glsl_ctx_priv *ctx_priv)
{
const struct wined3d_shader_version *version = &reg_maps->shader_version;
@@ -225,7 +225,7 @@ index 594fdf73f46..36246a5cd60 100644
const struct vs_compile_args *vs_args = ctx_priv->cur_vs_args;
const struct ps_compile_args *ps_args = ctx_priv->cur_ps_args;
const struct wined3d_gl_info *gl_info = context_gl->gl_info;
@@ -2190,7 +2271,15 @@ static void shader_generate_glsl_declarations(const struct wined3d_context_gl *c
@@ -2188,7 +2269,15 @@ static void shader_generate_glsl_declarations(const struct wined3d_context_gl *c
}
/* Declare the constants (aka uniforms) */
@@ -242,7 +242,7 @@ index 594fdf73f46..36246a5cd60 100644
{
unsigned max_constantsF;
@@ -2255,11 +2344,12 @@ static void shader_generate_glsl_declarations(const struct wined3d_context_gl *c
@@ -2253,11 +2342,12 @@ static void shader_generate_glsl_declarations(const struct wined3d_context_gl *c
}
else
{
@@ -257,7 +257,7 @@ index 594fdf73f46..36246a5cd60 100644
}
/* Always declare the full set of constants, the compiler can remove the
@@ -9943,17 +10033,36 @@ static struct glsl_ffp_fragment_shader *shader_glsl_find_ffp_fragment_shader(str
@@ -9941,17 +10031,36 @@ static struct glsl_ffp_fragment_shader *shader_glsl_find_ffp_fragment_shader(str
static void shader_glsl_init_vs_uniform_locations(const struct wined3d_gl_info *gl_info,
@@ -299,7 +299,7 @@ index 594fdf73f46..36246a5cd60 100644
for (i = 0; i < WINED3D_MAX_CONSTS_I; ++i)
{
@@ -11025,6 +11134,7 @@ static HRESULT shader_glsl_alloc(struct wined3d_device *device, const struct win
@@ -11023,6 +11132,7 @@ static HRESULT shader_glsl_alloc(struct wined3d_device *device, const struct win
const struct wined3d_fragment_pipe_ops *fragment_pipe)
{
SIZE_T stack_size = wined3d_log2i(max(WINED3D_MAX_VS_CONSTS_F, WINED3D_MAX_PS_CONSTS_F)) + 1;
@@ -307,7 +307,7 @@ index 594fdf73f46..36246a5cd60 100644
struct fragment_caps fragment_caps;
void *vertex_priv, *fragment_priv;
struct shader_glsl_priv *priv;
@@ -11032,6 +11142,8 @@ static HRESULT shader_glsl_alloc(struct wined3d_device *device, const struct win
@@ -11030,6 +11140,8 @@ static HRESULT shader_glsl_alloc(struct wined3d_device *device, const struct win
if (!(priv = heap_alloc_zero(sizeof(*priv))))
return E_OUTOFMEMORY;
@@ -316,7 +316,7 @@ index 594fdf73f46..36246a5cd60 100644
string_buffer_list_init(&priv->string_buffers);
if (!(vertex_priv = vertex_pipe->vp_alloc(&glsl_shader_backend, priv)))
@@ -11086,6 +11198,8 @@ static HRESULT shader_glsl_alloc(struct wined3d_device *device, const struct win
@@ -11084,6 +11196,8 @@ static HRESULT shader_glsl_alloc(struct wined3d_device *device, const struct win
device->fragment_priv = fragment_priv;
device->shader_priv = priv;
@@ -325,7 +325,7 @@ index 594fdf73f46..36246a5cd60 100644
return WINED3D_OK;
fail:
@@ -11113,6 +11227,13 @@ static void shader_glsl_free(struct wined3d_device *device, struct wined3d_conte
@@ -11111,6 +11225,13 @@ static void shader_glsl_free(struct wined3d_device *device, struct wined3d_conte
priv->fragment_pipe->free_private(device, context);
priv->vertex_pipe->vp_free(device, context);
@@ -340,10 +340,10 @@ index 594fdf73f46..36246a5cd60 100644
device->shader_priv = NULL;
}
diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c
index a156d27e7ac..982e8dd3748 100644
index 9924a2d806e..2a9d76622f6 100644
--- a/dlls/wined3d/shader.c
+++ b/dlls/wined3d/shader.c
@@ -765,6 +765,8 @@ static BOOL shader_record_register_usage(struct wined3d_shader *shader, struct w
@@ -715,6 +715,8 @@ static BOOL shader_record_register_usage(struct wined3d_shader *shader, struct w
}
else
{
@@ -353,10 +353,10 @@ index a156d27e7ac..982e8dd3748 100644
}
}
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
index eb25f01130e..c4605dc3f08 100644
index 6262df2090d..d0f65301eec 100644
--- a/dlls/wined3d/state.c
+++ b/dlls/wined3d/state.c
@@ -4594,6 +4594,11 @@ static void state_cb(struct wined3d_context *context, const struct wined3d_state
@@ -4367,6 +4367,11 @@ static void state_cb(struct wined3d_context *context, const struct wined3d_state
struct wined3d_bo_gl *bo_gl;
TRACE("context %p, state %p, state_id %#lx.\n", context, state, state_id);
@@ -369,10 +369,10 @@ index eb25f01130e..c4605dc3f08 100644
if (STATE_IS_GRAPHICS_CONSTANT_BUFFER(state_id))
shader_type = state_id - STATE_GRAPHICS_CONSTANT_BUFFER(0);
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 7abf77bb445..eb6ff00e9a9 100644
index 2d420a60369..f6077fe724b 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -1217,6 +1217,7 @@ struct wined3d_shader_reg_maps
@@ -1239,6 +1239,7 @@ struct wined3d_shader_reg_maps
struct wined3d_shader_tgsm *tgsm;
SIZE_T tgsm_capacity;
unsigned int tgsm_count;
@@ -380,7 +380,7 @@ index 7abf77bb445..eb6ff00e9a9 100644
};
/* Keeps track of details for TEX_M#x# instructions which need to maintain
@@ -3355,6 +3356,7 @@ struct wined3d_gl_limits
@@ -3380,6 +3381,7 @@ struct wined3d_gl_limits
UINT glsl_varyings;
UINT glsl_vs_float_constants;
UINT glsl_ps_float_constants;
@@ -389,7 +389,7 @@ index 7abf77bb445..eb6ff00e9a9 100644
UINT arb_vs_float_constants;
UINT arb_vs_native_constants;
diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h
index f4ec2470bba..14392de1291 100644
index 9dd6352f599..fcf7ea697f2 100644
--- a/include/wine/wined3d.h
+++ b/include/wine/wined3d.h
@@ -1324,6 +1324,7 @@ enum wined3d_memory_segment_group
@@ -401,5 +401,5 @@ index f4ec2470bba..14392de1291 100644
#define WINED3D_RESZ_CODE 0x7fa05000
--
2.38.1
2.40.0

View File

@@ -1 +1 @@
Wine Staging 8.4
Wine Staging 8.5

View File

@@ -1 +1 @@
15aec461174ae2f2568d63fa83f32576ede05a9c
02876a4b1320a1ee03b04c264fe31ccf6ec06d1c