@zfigura @iamahuman This is my first wine patch, I am not familiar with wine review process, and I am not sure who should review this (bot didn't assign anybody), but I would appreciate a review.
Code should be obvious, but question for the last commit: should I open with `O_CLOEXEC` ? I do not think so, but would be good to confirm.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/852#note_8713
On Fri Sep 16 15:29:32 2022 +0000, Gabriel Ivăncescu wrote:
> It worked properly earlier likely because there were no conflicts. Use
> git locally as normal instead of the web interface to do it.
yes I know that, but when I clicked the rebase button the pipeline started failing for no reason, now I have to rebase locally which I understand
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/778#note_8706
--
v2: ntdll: Fill the IOSB in sock_transmit() only inside the "if (alerted)" block.
ntdll: Fill the IOSB in sock_send() only inside the "if (alerted)" block.
ntdll: Fill the IOSB in sock_recv() only inside the "if (alerted)" block.
ntdll: The async handle passed to set_async_direct_result() cannot be NULL.
ws2_32/tests: Add more tests for iosb contents while a recv is pending.
https://gitlab.winehq.org/wine/wine/-/merge_requests/871
Alternatively, since this is early in startup and we don't expect this malloc()
to fail, we could simply remove the check from get_initial_environment() itself.
--
v2: ntdll: Do not check for malloc() failure in get_initial_environment.
https://gitlab.winehq.org/wine/wine/-/merge_requests/867
--
v2: winegstreamer: Check for already opened stream in wm_reader_open*.
winegstreamer: Use a dedicated CS to serialize async reader commands.
winegstreamer: Introduce a new async_reader_deliver_sample helper.
winegstreamer: Wake thread when async reader user clock is modified.
https://gitlab.winehq.org/wine/wine/-/merge_requests/843
On Fri Sep 16 15:03:29 2022 +0000, Etaash Mathamsetty wrote:
> lol now another issue popped up, the rebase worked properly earlier
> this gitlab is really weird, litterally nothing has worked correctly for me
It worked properly earlier likely because there were no conflicts. Use git locally as normal instead of the web interface to do it.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/778#note_8699
On Fri Sep 16 15:28:23 2022 +0000, Huw Davies wrote:
> My Windows SDK has `REG_APP_HIVE` defined to 0x10. It also has
> `REG_PROCESS_PRIVATE` as 0x20, which is presumably what
> `REG_PROCESS_APPKEY` gets mapped to.
> If the tests aren't going to work on Win 7, then skip them as soon as
> the first call returns `STATUS_INVALID_PARAMETER_6`.
> Since you've found that the key return is only available for an app key,
> then I don't think it makes sense to split this MR up as I'd previously
> suggested. That means we need the filename logic back in.
> A couple of notes on that: When passing strings to the server, we
> typically don't nul-terminate them and pass the length instead. Also,
> there is logic there already that copes with loading and saving branches
> i.e. the `save_branch_info` stuff. Have you looked into adapting that?
Oh interesting, where do you find those headers in the windwos sdk? I've tried to find something like that but I'm always afraid of breaking the clean room guidelines.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/820#note_8698
On Thu Sep 15 22:27:44 2022 +0000, Bernhard Kölbl wrote:
> > Rebase failed: Rebase locally, resolve all conflicts, then push the
> branch. Try again.
lol now another issue popped up, the rebase worked properly earlier
this gitlab is really weird, litterally nothing has worked correctly for me
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/778#note_8695
My Windows SDK has `REG_APP_HIVE` defined to 0x10. It also has `REG_PROCESS_PRIVATE` as 0x20, which is presumably what `REG_PROCESS_APPKEY` gets mapped to.
If the tests aren't going to work on Win 7, then skip them as soon as the first call returns `STATUS_INVALID_PARAMETER_6`.
Since you've found that the key return is only available for an app key, then I don't think it makes sense to split this MR up as I'd previously suggested. That means we need the filename logic back in.
A couple of notes on that: When passing strings to the server, we typically don't nul-terminate them and pass the length instead. Also, there is logic there already that copes with loading and saving branches i.e. the `save_branch_info` stuff. Have you looked into adapting that?
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/820#note_8694
Windows when using cached credentials will use them on the first challenge,
if then a second 403 (ACCESS_DENIED) is received, the user is prompted again
but this time with the password and save checkbox cleared.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com>
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/837
On Fri Sep 16 01:12:18 2022 +0000, **** wrote:
> Marvin replied on the mailing list:
> ```
> Hi,
> It looks like your patch introduced the new failures shown below.
> Please investigate and fix them before resubmitting your patch.
> If they are not new, fixing them anyway would help a lot. Otherwise
> please ask for the known failures list to be updated.
> The full results can be found at:
> https://testbot.winehq.org/JobDetails.pl?Key=123494
> Your paranoid android.
> === debian11 (32 bit report) ===
> ntdll:
> reg.c:2348: Test succeeded inside todo block: got 0xc00000f5
> === debian11 (32 bit zh:CN report) ===
> ntdll:
> reg.c:2348: Test succeeded inside todo block: got 0xc00000f5
> === debian11 (32 bit WoW report) ===
> ntdll:
> reg.c:2348: Test succeeded inside todo block: got 0xc00000f5
> === debian11 (64 bit WoW report) ===
> ntdll:
> reg.c:2348: Test succeeded inside todo block: got 0xc00000f5
> ```
This test report is from the other force push, now I fixed it with the last push.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/820#note_8684
--
v7: winecoreaudio: Switch to mmdevapi's unixlib.h.
winecoreaudio: Adapt "get_capture_buffer_params" struct to mmdevapi's.
winecoreaudio: Adapt "release_render_buffer_params" struct to mmdevapi's.
winecoreaudio: Adapt "release_stream_params" struct to mmdevapi's.
winecoreaudio: Adapt "create_stream_params" struct to mmdevapi's.
winecoreaudio: Drop "unix_" prefix in unixlib enum, apply it to the functions instead.
mmdevapi: Integrate winecoreaudio's additions in unixlib.h.
winecoreaudio: Switch to string as device identifier, to match other drivers.
winecoreaudio: Fix RegEnumKeyExW() call passing wrong unit for the buffer size.
https://gitlab.winehq.org/wine/wine/-/merge_requests/813
--
v6: winecoreaudio: Switch to mmdevapi's unixlib.h.
winecoreaudio: Adapt "get_capture_buffer_params" struct to mmdevapi's.
winecoreaudio: Adapt "release_render_buffer_params" struct to mmdevapi's.
winecoreaudio: Adapt "release_stream_params" struct to mmdevapi's.
winecoreaudio: Adapt "create_stream_params" struct to mmdevapi's.
winecoreaudio: Drop "unix_" prefix in unixlib enum, apply it to the functions instead.
mmdevapi: Integrate winecoreaudio's additions in unixlib.h.
winecoreaudio: Switch to string as device identifier, to match other drivers.
https://gitlab.winehq.org/wine/wine/-/merge_requests/813
It's not exactly clear to me why gcc warns about this (and it's hard to find
reference for this specific flavor of -Waddress), but my understanding is that
arithmetic on well-defined pointers will never yield NULL. Of course, we are not
dealing with well-defined pointers here, but fortunately gcc does not complain
if we cast to intptr_t first.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/868
--
v5: winecoreaudio: Switch to mmdevapi's unixlib.h.
winecoreaudio: Adapt "get_capture_buffer_params" struct to mmdevapi's.
winecoreaudio: Adapt "release_render_buffer_params" struct to mmdevapi's.
winecoreaudio: Adapt "release_stream_params" struct to mmdevapi's.
winecoreaudio: Adapt "create_stream_params" struct to mmdevapi's.
winecoreaudio: Drop "unix_" prefix in unixlib enum, apply it to the functions instead.
mmdevapi: Integrate winecoreaudio's additions in unixlib.h.
winecoreaudio: Switch to string as device identifier, to match other drivers.
https://gitlab.winehq.org/wine/wine/-/merge_requests/813
On Fri Sep 16 02:11:42 2022 +0000, Huw Davies wrote:
> Looks like the app calls `WinUsb_Free(NULL)` on startup.
Thank you so much for the review! Yeah, it's quite strange that it calls it with a NULL parameter. What is the purpose of it?
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/827#note_8654
This greatly increases performance in "Discovery Tour by Assassin's Creed:
Ancient Egypt".
The application frequently performs small (< 1 kiB) uploads to a large (128 MiB)
buffer. Without this patch, we will always create and destroy a new Vulkan
memory allocation, and the Vulkan driver will waste time zeroing the entire
allocation.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/765
This is a resend of merge request 864 with a few minor changes:
* shorten functions to clear_rtv, and explicitly specify that the d3d10core
version is clearing the backbuffer
* remove unnecessary inline
* fix spacing around asterisks
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/865
This fixes an issue exposed (but not caused) by commit
e553be7e776282fea77b8b60304298d9de90bd8b. Calling vkFreeCommandBuffers()
after the corresponding command pool was destroyed causes invalid memory
accesses. Thanks to Jacek for pointing this out.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/858
d3d11: Implement d3d11_input_layout_to_wined3d_declaration() on top of vkd3d_shader_parse_input_signature().
This was originally prompted by the fact that
wined3d_extract_shader_input_signature_from_dxbc() allocates elements with
HeapAlloc(), but d3d11_input_layout_to_wined3d_declaration() attempts to free
them with free(). That's a regression introduced by commit
b951c37b8791ceb052c9e159ad7927f75a72d667. Since we're touching the code
though, we may as well use vkd3d_shader_parse_input_signature(), and get rid
of wined3d_extract_shader_input_signature_from_dxbc().
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/860
There's no point in querying this multiple times, it's not going to change.
Perhaps more importantly, calling is_warp_device() inside a todo_wine block
will cause "Test succeeded inside todo block: ..." messages from
get_device_adapter_desc(). These appear to have been introduced by commit
fcc276ecb1508d5217ec977ca530ee7d30d355b9. Arguably get_device_adapter_desc()
shouldn't use ok() in the first place.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/861
Apex Legends game periodically (every 30 seconds) calls this function
with up to 22k virtual addresses. All but 1 of them is valid. Due to
amount of queries addresses, and cost of seek+read, this causes this
function to take up to about 50ms. So framerate drops from ~150 FPS to
20FPS for about a second.
As far as I can see, returning 0 entries from this function, still makes
Apex Legend work.
But keep code correct, and optimise it by:
1. Opening pagemap file once, and never closing it. This eliminates
repeated fopen/fseek/fread/fclose sequences, which helps even in queries
with small amount of virtual addresses.
2. Using pread, instead of seek+read.
3. Only performing pagemap read when the address is valid.
Future work might recognize continues pages in the query, and perform a
batch read of multiple pagemap entries, instead one page at a time, but
for now it is not necassary.
This change get_working_set_ex peek wall clock runtime from 57ms to
0.29ms.
Tested on Linux, but similar change done for the BSD part.
`Signed-off-by: Witold Baryluk <witold.baryluk(a)gmail.com>`
--
v6: ntdll: Keep pagemap file open after first use of NtQueryVirtualMemory(MemoryWorkingSetExInformation)
ntdll: Use pread in NtQueryVirtualMemory(MemoryWorkingSetExInformation)
https://gitlab.winehq.org/wine/wine/-/merge_requests/852
Apex Legends game periodically (every 30 seconds) calls this function
with up to 22k virtual addresses. All but 1 of them is valid. Due to
amount of queries addresses, and cost of seek+read, this causes this
function to take up to about 50ms. So framerate drops from ~150 FPS to
20FPS for about a second.
As far as I can see, returning 0 entries from this function, still makes
Apex Legend work.
But keep code correct, and optimise it by:
1. Opening pagemap file once, and never closing it. This eliminates
repeated fopen/fseek/fread/fclose sequences, which helps even in queries
with small amount of virtual addresses.
2. Using pread, instead of seek+read.
3. Only performing pagemap read when the address is valid.
Future work might recognize continues pages in the query, and perform a
batch read of multiple pagemap entries, instead one page at a time, but
for now it is not necassary.
This change get_working_set_ex peek wall clock runtime from 57ms to
0.29ms.
Tested on Linux, but similar change done for the BSD part.
`Signed-off-by: Witold Baryluk <witold.baryluk(a)gmail.com>`
--
v5: ntdll: Keep pagemap file open after first use of NtQueryVirtualMemory(MemoryWorkingSetExInformation)
https://gitlab.winehq.org/wine/wine/-/merge_requests/852
Apex Legends game periodically (every 30 seconds) calls this function
with up to 22k virtual addresses. All but 1 of them is valid. Due to
amount of queries addresses, and cost of seek+read, this causes this
function to take up to about 50ms. So framerate drops from ~150 FPS to
20FPS for about a second.
As far as I can see, returning 0 entries from this function, still makes
Apex Legend work.
But keep code correct, and optimise it by:
1. Opening pagemap file once, and never closing it. This eliminates
repeated fopen/fseek/fread/fclose sequences, which helps even in queries
with small amount of virtual addresses.
2. Using pread, instead of seek+read.
3. Only performing pagemap read when the address is valid.
Future work might recognize continues pages in the query, and perform a
batch read of multiple pagemap entries, instead one page at a time, but
for now it is not necassary.
This change get_working_set_ex peek wall clock runtime from 57ms to
0.29ms.
Tested on Linux, but similar change done for the BSD part.
`Signed-off-by: Witold Baryluk <witold.baryluk(a)gmail.com>`
--
v4: ntdll: Keep pagemap file open after first use of NtQueryVirtualMemory(MemoryWorkingSetExInformation)
ntdll: Use pread in NtQueryVirtualMemory(MemoryWorkingSetExInformation)
ntdll: Do not use hardcoded page shift in NtQueryVirtualMemory(MemoryWorkingSetExInformation)
ntdll: Speed up NtQueryVirtualMemory(MemoryWorkingSetExInformation) by conditional page check
https://gitlab.winehq.org/wine/wine/-/merge_requests/852
Apex Legends game periodically (every 30 seconds) calls this function
with up to 22k virtual addresses. All but 1 of them is valid. Due to
amount of queries addresses, and cost of seek+read, this causes this
function to take up to about 50ms. So framerate drops from ~150 FPS to
20FPS for about a second.
As far as I can see, returning 0 entries from this function, still makes
Apex Legend work.
But keep code correct, and optimise it by:
1. Opening pagemap file once, and never closing it. This eliminates
repeated fopen/fseek/fread/fclose sequences, which helps even in queries
with small amount of virtual addresses.
2. Using pread, instead of seek+read.
3. Only performing pagemap read when the address is valid.
Future work might recognize continues pages in the query, and perform a
batch read of multiple pagemap entries, instead one page at a time, but
for now it is not necassary.
This change get_working_set_ex peek wall clock runtime from 57ms to
0.29ms.
Tested on Linux, but similar change done for the BSD part.
Signed-off-by: Witold Baryluk's avatarWitold Baryluk <witold.baryluk(a)gmail.com>
--
v3: ntdll: Speed up NtQueryVirtualMemory(MemoryWorkingSetExInformation) by conditional pread.
https://gitlab.winehq.org/wine/wine/-/merge_requests/852
Changes since prior MR:
- Check if HWND is valid after sending `WM_GETOBJECT` and getting a 0 return value.
- Block on thread calling `UiaNodeFromHandle()` rather than the marshaling thread.
- Squash `IWineUiaNode::get_prop_val` commit into commit where it is actually used.
--
v2: uiautomationcore: Add tests for UiaNodeFromHandle.
uiautomationcore: Create UI Automation client thread.
uiautomationcore: Implement UiaNodeFromHandle.
uiautomationcore: Shutdown provider thread when all returned nodes are released.
uiautomationcore: Increment module reference count when starting provider thread.
uiautomationcore: Implement UiaReturnRawElementProvider.
https://gitlab.winehq.org/wine/wine/-/merge_requests/846
Changes since prior MR:
- Check if HWND is valid after sending `WM_GETOBJECT` and getting a 0 return value.
- Block on thread calling `UiaNodeFromHandle()` rather than the marshaling thread.
- Squash `IWineUiaNode::get_prop_val` commit into commit where it is actually used.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/846
--
v3: kernelbase: Implement RegLoadAppKey.
ntdll: Implement REG_LOAD_APP_KEY flag
ntdll: Pass filename to server in NtLoadKeyEx.
ntdll: Implement roothandle parameter for NtLoadKeyEx
https://gitlab.winehq.org/wine/wine/-/merge_requests/820
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
--
v2: xmllite/writer: Implement WriteNodeShallow().
xmllite/writer: Handle empty local name in WriteAttributeString().
xmllite/tests: Add a test for IsEmptyElement() on attributes.
xmllite/tests: Add some more tests for WriteStartElement().
xmllite/writer: Add initial implementation of WriteNode().
xmllite/writer: Implement WriteAttributes().
xmllite/writer: Close open tag on WriteProcessingInstruction().
xmllite/writer: Close open tag on WriteRaw().
xmllite/writer: Handle empty prefix and uri correctly in WriteStartElement().
xmllite/writer: Implement WriteWhitespace().
xmllite/reader: Improve xml declaration node parsing.
https://gitlab.winehq.org/wine/wine/-/merge_requests/849
--
v4: winecoreaudio: Switch to mmdevapi's unixlib.h.
winecoreaudio: Adapt "get_capture_buffer_params" struct to mmdevapi's.
winecoreaudio: Adapt "release_render_buffer_params" struct to mmdevapi's.
winecoreaudio: Adapt "release_stream_params" struct to mmdevapi's.
winecoreaudio: Adapt "create_stream_params" struct to mmdevapi's.
winecoreaudio: Drop "unix_" prefix in unixlib enum, apply it to the functions instead.
mmdevapi: Integrate winecoreaudio's additions in unixlib.h.
winecoreaudio: Switch to string as device identifier, to match other drivers.
https://gitlab.winehq.org/wine/wine/-/merge_requests/813
- On macOS, add error reporting when getting/setting debug registers.
- Also, as in ptrace.c, use context->machine to determine which context struct to read/write.
- And when setting, ensure that the correct debug state flavor is used (needed for Wow64)
The debug register tests should now pass on Mojave and Monterey, for 32- and 64-bit.
Note that Rosetta 2 on Apple Silicon mostly doesn't emulate debug registers, and the tests fail there.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/850
This implements sending StorageEvents to the same window/doc from where the storage change happened, which seems to be a thing on native IE. For some reason I was unable to have them actually sent to other windows, so that's not implemented since I've no idea how that even gets triggered to test it, and if it does it will probably be in a follow up MR, even though that's *supposed* to be the use of these events�
localStorage sends for `onstoragecommit` on the doc that did the change, while sessionStorage sends for `onstorage` on the window and doc that did the change, depending on compat mode. Although the event sent to the document's `onstorage` seems to be a legacy/old-style event (as tests show).
Tests are on the last patch since events have to be sent properly (else it hangs).
--
v6: mshtml: Send StorageEvents to iframe windows properly.
mshtml: Don't expose document.onstorage for IE9+ modes.
mshtml/tests: Add tests for StorageEvents with parallel documents.
mshtml: Send StorageEvents when removing an existing item.
mshtml: Send StorageEvents when setting an item.
mshtml: Implement StorageEvent and send it when clearing the storage.
mshtml: Move the MessageEvent construction to a helper.
include/mshtml: Add IDOMStorageEvent and DispDOMStorageEvent interfaces.
https://gitlab.winehq.org/wine/wine/-/merge_requests/795
This series has been split up more than the prior two, keeping the non-tests diffs below 200. Hopefully it's easier to review now. If not, please let me know and I can _try_ to split it further, but I'm not sure it can get much more split up than this.
--
v2: uiautomationcore: Add tests for UiaNodeFromHandle.
uiautomationcore: Create UI Automation client thread.
uiautomationcore: Implement UiaNodeFromHandle.
uiautomationcore: Shutdown provider thread when all returned nodes are released.
uiautomationcore: Increment module reference count when starting provider thread.
uiautomationcore: Implement UiaReturnRawElementProvider.
https://gitlab.winehq.org/wine/wine/-/merge_requests/832