Convert all consecutive calls to d7_DrawPrimitive(TRIANGLE_FAN) into
a single call to d7_DrawPrimitive(TRIANGLE_LIST) with all the vertices.
Note, it *increase* the number of vertices, but bandwith is much less costly
than multiple calls.
Note, only a very precise subset of the calls get buffered in order to
ensure that the disruption is minimal.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=33814
--
v20: ddraw: Increasing the vertex batch size on demand
https://gitlab.winehq.org/wine/wine/-/merge_requests/2105
On my Steam Deck, this reduces the time it takes to initialize the wg_parser radically (by around 1 second). This helps in the game WILD HEARTS, which doesn't present while loading help videos during gameplay, causing large stutters.
Because GStreamer can randomly access the file with no known pattern on our side, I opted to implement this by buffering 4 chunks so that interleaved reads to different areas of the file don't cause us to discard and reload cached data more than we need to.
--
v2: winegstreamer: Cache wg_parser input data.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2390
test_loadpaths_execute() was sometimes getting ERROR_ALREADY_EXISTS when
creating its temporary directoryi. That was probably because
GetTempFileNameW() only uses the low 16-bits of the 'random' LUID which
goes over a wider range, potentially leading to collisions in the lower
16-bits.
Avoid AllocateLocallyUniqueId() entirely and add a helper function to
create a guaranteed new directory.
Also try to use the current directory first as it is assumed to have
been configured to ward off anti-virus programs (specifically
Microsoft Defender) which is especially important when writing
executables to that location. Only switch to the system's temporary
directory if the current directory is not a writable location.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54560
---
There are a few other tests where I suspect occasional anti-virus
interference. It may make sense to reuse this function in those.
That said create_new_dir() uses entirely predictable sequenitial
numbers which would be bad if attempting to create a secure directory.
But the new directory does not even have special permissions and this
type of attack shouldn't be an issue for the tests. Still, don't reuse
this code in contexts where security matters.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2446
Today, RtlCreateActivationContext (CreateActCtxW) opens the source
manifest file via NtOpenFile without the FILE_SHARE_DELETE sharing mode.
This causes CreateActCtxW to fail if the source manifest file was
created with the FILE_DELETE_ON_CLOSE flag. FILE_DELETE_ON_CLOSE is
often used for temporary files that should be automatically deleted
after use, even if the creator process crashes.
Fix this by specifying FILE_SHARE_DELETE for sharing mode when opening
the source manifest or module file. This allows the source manifest or
module file to be marked as deleted while it is open.
Note that concurrent deletion is not an issue for the following reasons:
- The ability to read from an open file handle is unaffected by deletion
of the corresponding file's name.
- RtlCreateActivationContext does not open the source manifest or module
file by the given filename (lpSource) more than once.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2433
Hans Leidekker (@hans) commented about loader/wine.inf.in:
> 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
> 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
> 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
> +HKLM,%CurrentVersionNT%,"EditionId",2,"Core"
> HKLM,%CurrentVersionNT%,"ProductName",2,"Windows 10 Pro"
Why "Core"? It seems to me that "Professional" would make more sense given that ProductName is "Windows 10 Pro".
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2438#note_27258
After today's rebase, I found a workaround for creating new documents. You can open an existing document, then click on the home tab, and create a new document in one of the tabs. There seems to a bit of UB left, but it's better than nothing.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2377#note_27257