v2: Use strlen() instead of lstrlenA() and adjust the formats accordingly.
--
v2: wininet/tests: Consistently use strlen() instead of lstrlenA().
wininet/tests: Consistently use strlen() in the InternetGetConnectedStateExA() tests.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2648
lparam != 0 does not imply lparam_size is big enough for a MSG, so we
can end up manipulating memory past the end of the buffer.
Co-authored-by: Jacek Caban <jacek(a)codeweavers.com>
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2763
--
v3: d2d1/tests: Test IsSupported() for bitmap render targets.
d2d1: Implement d2d_bitmap_render_target_IsSupported().
d2d1/tests: Test IsSupported() for DC render targets.
d2d1: Implement d2d_dc_render_target_IsSupported().
d2d1/tests: Test IsSupported() for hwnd render targets.
d2d1: Implement d2d_hwnd_render_target_IsSupported().
https://gitlab.winehq.org/wine/wine/-/merge_requests/811
On Thu May 25 04:06:18 2023 +0000, Huw Davies wrote:
> The relative velocity thing is strange - I guess they got confused with light...
Maybe this is to avoid numerical issues when both the source and the listener are moving in the same direction at speeds close to the speed of sound.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2891#note_33787
Indexing with non-constants offsets requires relative addressing in SM4. In assembly, this is written like in the following example:
```
x1[r1.x + 3]
```
The first part of this patch series only includes support for indexing vectors with non-constant indexes.
Following patches in https://gitlab.winehq.org/fcasas/vkd3d/-/commits/nonconst-offsets-3.
---
Non-constant indexing of vectors cannot be implemented with relative addressing in SM4 because this
indexation cannot be performed at the level of register-components, only whole registers.
Mathematical operations must be used instead.
For floats, the native compiler seems to index an identity matrix, to
get the i-th column, and then proceedes to compute the dot product
between that column and the vector. For ints, bit operations seem to be
performed.
While probably less efficient, this implementation complies with the
type-checking at the IR level and when writing bytecode.
--
v2: vkd3d-shader/hlsl: Support non-constant vector indexing.
vkd3d-shader/hlsl: Lower dot for integral types.
vkd3d-shader/hlsl: Introduce transform_derefs().
tests: Test indexing temps.
tests: Test non-constant vector indexing.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/207
We are not doing that on purpose, freeing the TEB before the thread is finished causes hard to debug crashes.
There should only ever be one extra allocated TEB so that should be acceptable. What problem are you seeing exactly?
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2814#note_33746
From what I can tell, the recent work on SampleBias/SampleLevel did all of the work for us, we just need to take the same framework and include the case for the `sample_l` instruction.
Tested with some shaders from the native Linux version of Little Racers STREET.
--
v14: vkd3d-shader/tpf: Add support for emitting sample_l instructions
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/188
Fix Cafe Stella (SteamID: 1829980) Flowchart crashes once there are 2 things on it.
--
v5: gdiplus: Support playing back pen custom end line cap.
gdiplus: Support playing back pen custom start line cap.
gdiplus: Support recording pen custom end line cap.
gdiplus: Support recording pen custom start line cap.
gdiplus/tests: Add pen custom line cap record and play back tests.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2870
```c
dlls/wined3d/context_vk.c:2377:42: warning: ‘null_binding’ may be used uninitialized in this function [-Wmaybe-uninitialized]
2377 | *null_buffer_binding = b->binding = null_binding;
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
```
--
v2: wined3d: Fix uninitialized variable warning.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2892
Unfortunately VPN interfaces I am observing here don't expose any definite type in ifr_hwaddr.sa_data (having ARPHRD_NONE). But the flags from SIOCGIFFLAGS have IFF_POINTOPOINT for such interfaces, so it is probably nothing wrong in guessing the iface type as PPP if the flag is set.
Fixes Creativerse hanging on creating local game when there is a VPN interface.
--
v2: nsiproxy.sys: Detect PPP interface type from flags on Linux.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2890
--
v2: ntdll/tests: Add more tests for placeholders.
ntdll: Support MEM_PRESERVE_PLACEHOLDER in NtFreeVirtualMemory().
ntdll: Support MEM_REPLACE_PLACEHOLDER in NtAllocateVirtualMemoryEx().
ntdll: Support MEM_REPLACE_PLACEHOLDER in map_view().
ntdll: Support MEM_RESERVE_PLACEHOLDER in NtAllocateVirtualMemoryEx().
ntdll: Pass allocation type to map_view().
ntdll: Handle NULL process handle in MapViewOfFile3().
https://gitlab.winehq.org/wine/wine/-/merge_requests/2856
From Microsoft documentation, [Using Side-by-Side Assemblies as a Resource][sxs-rsrc] outlines the significance of each reserved manifest resource ID.
Further investigation reveals the following:
1. `CREATEPROCESS_MANIFEST_RESOURCE_ID` (value: `1`): This is used for process-wide initial (`NULL`) activation context.
- **Usage documentation**: [Enabling an Assembly in an Application Without Extensions](https://learn.microsoft.com/en-us/windows/win32/sbscs/enabling-…
- **Intended container module type**: EXE only.
- **Lifetime of the associated activation context**: Alive until the process is terminated. Owned by system (NTDLL).
- **Isolation-aware**: No.
2. `ISOLATIONAWARE_MANIFEST_RESOURCE_ID` (value: `2`): This is used to specify the assembly manifest that the loader (Ldr) uses to resolve static imports. Also, this is used by isolation-aware wrappers defined in `*.inl` files included in the Windows SDK (`include\um`) when the `ISOLATION_AWARE_ENABLED` macro is defined as a nonzero value.
- **Usage documentation**: [Enabling an Assembly in an Application Hosting a DLL, Extension, or Control Panel](https://learn.microsoft.com/en-us/windows/win32/sbscs/enabling-an-as…
- **Intended container module type**: EXE and DLL.
- **Lifetime of the associated activation context**: Alive until the module is unloaded (e.g., via `FreeLibrary`). Owned by system (NTDLL).
- **Isolation-aware**: Yes.
3. `ISOLATIONAWARE_NOSTATICIMPORT_MANIFEST_RESOURCE_ID` (value: `3`): Ignored by the loader when resolving static imports. This is used by isolation-aware API wrappers defined in `*.inl` files included in the Windows SDK (`include\um`) when the `ISOLATION_AWARE_ENABLED` macro is defined as a nonzero value.
- **Usage documentation**: [IsolationAwareCleanup function][IsolationAwareCleanup]
- **Intended container module type**: EXE and DLL.
- **Lifetime of the associated activation context**: Alive until the application calls [`IsolationAwareCleanup`][IsolationAwareCleanup][^ia-cleanup-note]. Owned by the isolation-aware API wrapper library (part of the Windows SDK, rather than being a system DLL).
- **Isolation-aware**: Yes.
The `ISOLATION_AWARE_ENABLED` macro is documented in [Isolating Components][sxs-ic] as well as [Specifying a Default Activation Context][sxs-def-actctx]. When `ISOLATION_AWARE_ENABLED` macro is defined as a nonzero value, then the isolation-aware API wrapper library is enabled. The isolation-aware API wrapper library is responsible for:
- Creating (lazily) and destroying activation context (in `IsolationAwareCleanup`), if the manifest resource ID is `ISOLATIONAWARE_NOSTATICIMPORT_MANIFEST_RESOURCE_ID`.[^actctx-lifetime-remark]
- Note: the isolation-aware API wrapper library does not manage the activation context's lifetime and delegates the responsibility to the system loader if the manifest resource ID is `ISOLATIONAWARE_MANIFEST_RESOURCE_ID`.
- Intercepting Win32 API calls for automatic activation context activation. Each API wrapper activates the "isolation-aware" activation context (obtaining one if it did not exist) before calling the original procedure, and deactivates it before returning.
The isolation-aware wrappers may be either be defined inline, or compiled into static libraries that are linked into the final application executable.
From the information above as well as the tests included in this merge request, we can infer the following:
1. Although side-by-side awareness is a cross-cutting concern, the *activation* of activation contexts itself is *not* usually performed automatically by the system for the application (with the sole exception of process-wide activation context associated with `CREATEPROCESS_MANIFEST_RESOURCE_ID`, and static import resolution).
2. `ISOLATIONAWARE_NOSTATICIMPORT_MANIFEST_RESOURCE_ID` is treated like any other resource ID (from `0x0004` to `0xffff`) as far as the loader is concerned.
3. The resource ID of the manifest only concerns how the module containing the manifest intends to use the manifest. In fact, for DLLs that do not *statically* import symbols from side-by-side assemblies, the three resource IDs above are basically equivalent. A DLL can elect not to use manifest resources at all, and manage activation context and library loading by itself.
This is why I believe that this merge request is sufficient in completing the isolation-aware component support in Wine; the heavy lifting is done in the application side, not the system.
**EDIT**: Fix a few typos and unclear wording.
---
[^ia-cleanup-note]: According to the documentation, the application is presumably responsible for calling `IsolationAwareCleanup` from `DllMain` on `fdwReason = DLL_PROCESS_DETACH`.
[^actctx-lifetime-remark]: [IsolationAwareCleanup § Remarks](https://learn.microsoft.com/en-us/previous-versions/windows/deskto…, from Microsoft documentation.
[sxs-rsrc]: https://learn.microsoft.com/en-us/windows/win32/sbscs/using-side-by-side-as…
[IsolationAwareCleanup]: https://learn.microsoft.com/en-us/previous-versions/windows/desktop/legacy/…
[sxs-ic]: https://learn.microsoft.com/en-us/windows/win32/sbscs/isolating-components
[sxs-def-actctx]: https://learn.microsoft.com/en-us/windows/win32/sbscs/specifying-a-default-…
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=18889
--
v9: ntdll: Don't hard-code DLL manifest resource ID when looking up dependency assembly.
kernel32/tests: Test loading assembly manifest resource inside dependencies.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2555
From Microsoft documentation, [Using Side-by-Side Assemblies as a Resource][sxs-rsrc] outlines the significance of each reserved manifest resource ID.
Further investigation reveals the following:
1. `CREATEPROCESS_MANIFEST_RESOURCE_ID` (value: `1`): This is used for process-wide initial (`NULL`) activation context.
- **Usage documentation**: [Enabling an Assembly in an Application Without Extensions](https://learn.microsoft.com/en-us/windows/win32/sbscs/enabling-…
- **Intended container module type**: EXE only.
- **Lifetime of the associated activation context**: Alive until the process is terminated. Owned by system (NTDLL).
- **Isolation-aware**: No.
2. `ISOLATIONAWARE_MANIFEST_RESOURCE_ID` (value: `2`): This is used to specify the assembly manifest that the loader (Ldr) uses to resolve static imports. Also, this is used by isolation-aware wrappers defined in `*.inl` files included in the Windows SDK (`include\um`) when the `ISOLATION_AWARE_ENABLED` macro is defined as a nonzero value.
- **Usage documentation**: [Enabling an Assembly in an Application Hosting a DLL, Extension, or Control Panel](https://learn.microsoft.com/en-us/windows/win32/sbscs/enabling-an-as…
- **Intended container module type**: EXE and DLL.
- **Lifetime of the associated activation context**: Alive until the module is unloaded (e.g., via `FreeLibrary`). Owned by system (NTDLL).
- **Isolation-aware**: Yes.
3. `ISOLATIONAWARE_NOSTATICIMPORT_MANIFEST_RESOURCE_ID` (value: `3`): Ignored by the loader when resolving static imports. This is used by isolation-aware API wrappers defined in `*.inl` files included in the Windows SDK (`include\um`) when the `ISOLATION_AWARE_ENABLED` macro is defined as a nonzero value.
- **Usage documentation**: [IsolationAwareCleanup function][IsolationAwareCleanup]
- **Intended container module type**: EXE and DLL.
- **Lifetime of the associated activation context**: Alive until the application calls [`IsolationAwareCleanup`][IsolationAwareCleanup][^ia-cleanup-note]. Owned by the isolation-aware API wrapper library (part of the Windows SDK, rather than being a system DLL).
- **Isolation-aware**: Yes.
The `ISOLATION_AWARE_ENABLED` macro is documented in [Isolating Components][sxs-ic] as well as [Specifying a Default Activation Context][sxs-def-actctx]. When `ISOLATION_AWARE_ENABLED` macro is defined as a nonzero value, then the isolation-aware API wrapper library is enabled. The isolation-aware API wrapper library is responsible for:
- Creating (lazily) and destroying activation context (in `IsolationAwareCleanup`), if the manifest resource ID is `ISOLATIONAWARE_NOSTATICIMPORT_MANIFEST_RESOURCE_ID`.[^actctx-lifetime-remark]
- Note: the isolation-aware API wrapper library does not manage the activation context's lifetime and delegates the responsibility to the system loader if the manifest resource ID is `ISOLATIONAWARE_MANIFEST_RESOURCE_ID`.
- Intercepting Win32 API calls for automatic activation context activation. Each API wrapper activates the "isolation-aware" activation context (obtaining one if it did not exist) before calling the original procedure, and deactivates it before returning.
The isolation-aware wrappers may be either be defined inline, or compiled into static libraries that are linked into the final application executable.
From the information above as well as the tests included in this merge request, we can infer the following:
1. Although side-by-side awareness is a cross-cutting concern, the *activation* of activation contexts itself is *not* usually performed automatically by the system for the application (with the sole exception of process-wide activation context associated with `CREATEPROCESS_MANIFEST_RESOURCE_ID`, and static import resolution).
2. `ISOLATIONAWARE_NOSTATICIMPORT_MANIFEST_RESOURCE_ID` is treated like any other resource ID (from `0x0004` to `0xffff`) as far as the loader is concerned.
3. The resource ID of the manifest only concerns how the module containing the manifest intends to use the manifest. In fact, for DLLs that do not *statically* import symbols from side-by-side assemblies, the three resource IDs above are basically equivalent. A DLL can elect not to use manifest resources at all, and manage activation context and library loading by itself.
This is why I believe that this merge request is sufficient in completing the isolation-aware component support in Wine; the heavy lifting is done in the application side, not the system.
**EDIT**: Fix a few typos and unclear wording.
---
[^ia-cleanup-note]: According to the documentation, the application is presumably responsible for calling `IsolationAwareCleanup` from `DllMain` on `fdwReason = DLL_PROCESS_DETACH`.
[^actctx-lifetime-remark]: [IsolationAwareCleanup § Remarks](https://learn.microsoft.com/en-us/previous-versions/windows/deskto…, from Microsoft documentation.
[sxs-rsrc]: https://learn.microsoft.com/en-us/windows/win32/sbscs/using-side-by-side-as…
[IsolationAwareCleanup]: https://learn.microsoft.com/en-us/previous-versions/windows/desktop/legacy/…
[sxs-ic]: https://learn.microsoft.com/en-us/windows/win32/sbscs/isolating-components
[sxs-def-actctx]: https://learn.microsoft.com/en-us/windows/win32/sbscs/specifying-a-default-…
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=18889
--
v8: ntdll: Don't hard-code DLL manifest resource ID when looking up dependency assembly.
kernel32/tests: Test loading assembly manifest resource inside dependencies.
ntdll: Move ACTCTX lpResourceName validation to RtlCreateActivationContext.
kernel32/tests: Test setting lpResourceName to NULL for CreateActCtxW.
kernel32/tests: Remove test for ACTCTX_FLAG_HMODULE_VALID with hModule = NULL case.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2555
--
v4: vkd3d-shader/tpf: Write out comparison mode sampler declarations and corresponding sampling instruction.
vkd3d-shader/hlsl: Parse SampleCmp() method.
vkd3d-shader/hlsl: Parse SamplerComparisonState objects.
vkd3d-shader/hlsl: Use a function table for object methods handlers.
vkd3d-shader/hlsl: Move object type checks to methods handlers.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/206
Otherwise, it is possible that the register used by the temp is
overridden by a subsequent instruction within the same loop.
--
v3: vkd3d-shader/hlsl: Extend the liveness of nodes produced outside loops.
tests: Add minimal tests for temp lifetimes within a loop.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/208
Unfortunately VPN interfaces I am observing here don't expose any definite type in ifr_hwaddr.sa_data (having ARPHRD_NONE). But the flags from SIOCGIFFLAGS have IFF_POINTOPOINT for such interfaces, so it is probably nothing wrong in guessing the iface type as PPP if the flag is set.
Fixes Creativerse hanging on creating local game when there is a VPN interface.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2890
Indexing with non-constants offsets requires relative addressing in SM4. In assembly, this is written like in the following example:
```
x1[r1.x + 3]
```
The first part of this patch series only includes support for indexing vectors with non-constant indexes.
Following patches in https://gitlab.winehq.org/fcasas/vkd3d/-/commits/nonconst-offsets-3.
---
Non-constant indexing of vectors cannot be implemented with relative addressing in SM4 because this
indexation cannot be performed at the level of register-components, only whole registers.
Mathematical operations must be used instead.
For floats, the native compiler seems to index an identity matrix, to
get the i-th column, and then proceedes to compute the dot product
between that column and the vector. For ints, bit operations seem to be
performed.
While probably less efficient, this implementation complies with the
type-checking at the IR level and when writing bytecode.
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/207
--
v13: vkd3d-shader/ir: Normalise signatures and input/output registers to the Shader Model 6 pattern.
vkd3d-shader/ir: Eliminate struct vkd3d_shader_normaliser.
vkd3d-shader/spirv: Support emitting multi-dimensional array variables.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/181
This fixes some upside-down videos in Secret of Mana. The game plays a NV12 video using MF session and EVR, then calls GetCurrentImage to get the frame RGB data and display it itself.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2883
Block records are not processed; only the bitcode is validated.
--
v13: vkd3d-shader/dxil: Read and validate global abbreviated operands.
vkd3d-shader/dxil: Read and validate local abbreviated operands.
vkd3d-compiler: Introduce dxbc-dxil and dxbc-auto source types.
vkd3d-shader/dxbc: Introduce an option to autodetect the DXBC source type.
vkd3d-shader/dxil: Read and validate DXIL bitcode unabbreviated blocks.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/44
--
v3: shell32: Update view mode flags while creating IShellView for IExplorerBrowser.
shell32: Reimplement IExplorerBrowser_SetFolderSettings() with support of setting flags.
shell32/tests: Move tests of IExplorerBrowser_SetFolderSettings() to a separated function and more tests.
shell32: Reimplement IFolderView2_SetCurrentViewMode() with modern behaviours.
shell32: Implement IFolderView2_{Get, Set}CurrentFolderFlags().
shell32/tests: Add tests for IFolderView2_{Get, Set}CurrentFolderFlags().
https://gitlab.winehq.org/wine/wine/-/merge_requests/2628
Block records are not processed; only the bitcode is validated.
--
v12: vkd3d-shader/dxil: Read and validate global abbreviated operands.
vkd3d-shader/dxil: Read and validate local abbreviated operands.
vkd3d-compiler: Introduce dxbc-dxil and dxbc-auto source types.
vkd3d-shader/dxbc: Introduce an option to autodetect the DXBC source type.
vkd3d-shader/dxil: Read and validate DXIL bitcode unabbreviated blocks.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/44
Block records are not processed; only the bitcode is validated.
--
v11: vkd3d-shader/dxil: Read and validate global abbreviated operands.
vkd3d-shader/dxil: Read and validate local abbreviated operands.
vkd3d-compiler: Introduce dxbc-dxil and dxbc-auto source types.
vkd3d-shader/dxbc: Introduce an option to autodetect the DXBC source type.
vkd3d-shader/dxil: Read and validate DXIL bitcode unabbreviated blocks.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/44
```c
dlls/wined3d/context_vk.c:2377:42: warning: ‘null_binding’ may be used uninitialized in this function [-Wmaybe-uninitialized]
2377 | *null_buffer_binding = b->binding = null_binding;
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
```
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2892
> > This isn't consistent with the actual ProcessInput() implementation, which refuses to accept more than one buffer.
>
> I made some tests before, the tests show that for WMV decoder DMO, calling multiple ProcessInput() is OK. The input status keeps `DMO_INPUT_STATUSF_ACCEPT_DATA` after delivering a buffer by ProcessInput(). Should I added these tests to Wine?
Probably. As far as I understand we currently reject multiple calls to ProcessInput(). I am concerned about the potential effects of having a GetInputStatus() implementation that isn't consistent with ProcessInput(). It may be fine, though...
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2881#note_33615
> This isn't consistent with the actual ProcessInput() implementation, which refuses to accept more than one buffer.
I made some tests before, the tests show that for WMV decoder DMO, calling multiple ProcessInput is OK. Should I added these tests to Wine?
> (Also, not sure why I was removed as reviewer?)
Sorry, I thought the front end stuff should reviewd by Rémi only. I will not removed you as reviewer anymore for anything related to winegstreamer.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2881#note_33614
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53947
Improve performance of GdipDrawImagePointsRect by:
1. avoiding multiplication and use addition where it is possible.
2. avoid calculating `GdipInvertMatrix` if it is not used.
3. avoid not needed TransformMatrixPoints
I divided MR to several commits, to better undestand what is going on.
Application for testing (it needs logo.jpg file):
[gdiplusdrawimagepoints.exe](/uploads/545ff7d8ab1d60386366f64999346825/gdiplusdrawimagepoints.exe)
--
v11: gdiplus: Improve performance of DrawImagePointsRect by avoid TransformMatrixPoints
gdiplus: use float increment instead of calculation to impove perf
gdiplus: use iterator instead calculate pointer position every time
https://gitlab.winehq.org/wine/wine/-/merge_requests/2864
This fixes a performance regression introduced during state redesign shortly after Wine 5.0.
Some games create a great amount of lights (around 1000 and growing) and touch them quite often. That results in each light being relayed to CS thread before each draw which is taking a great amount of time (performance drop in Nosferatu: The Wrath of Malachi from ~150 fps to ~10-15 at start location; that's with another unrelated regression related to streaming buffer management sorted out).
It is also possible to use bitmasks like for other states, but then with these lights amount even iterating over the full set of lights during stateblock apply leads to noticable performance drop.
With this patchset Nosferatu reaches ~180 fps on the same place (~115 on Windows on the same machine, with the difference being probably due to SWVP).
--
v4: wined3d: Use RB tree for storing lights.
wined3d: Track per light state changes in stateblock.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2833
Toolbar buttons won't adjust its size to fit the DPI setting. This two patches set a DPI-considered size to those buttons to make them look better in HiDPI.
Here are some comparisons on Wine with 192 DPI:

vs


vs

--
v2: comdlg32: Set a size for toolbar buttons of the file access dialog.
comdlg32: Calculate button height of toolbar with DPI for item dialog.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2849
Pass struct hlsl_constant_value to folding functions, in preparation for
creating the destination constant instruction from that value.
--
v2: vkd3d-shader/hlsl: Pass hlsl_constant_value and hlsl_type pointers to fold_nequal().
vkd3d-shader/hlsl: Pass hlsl_constant_value and hlsl_type pointers to fold_mul().
vkd3d-shader/hlsl: Pass hlsl_constant_value and hlsl_type pointers to fold_add().
vkd3d-shader/hlsl: Pass hlsl_constant_value and hlsl_type pointers to fold_neg().
vkd3d-shader/hlsl: Pass hlsl_constant_value and hlsl_type pointers to fold_cast().
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/205
Fix Cafe Stella (SteamID: 1829980) Flowchart crashes once there are 2 things on it.
--
v4: gdiplus: Support playing back pen custom end line cap.
gdiplus: Support playing back pen custom start line cap.
gdiplus: Support recording pen custom end line cap.
gdiplus: Support recording pen custom start line cap.
gdiplus/tests: Add pen custom line cap record and play back tests.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2870
We test once above that the source does not use the existing allocator, but then
implicitly release the allocator we are testing against (when the source assigns
a new allocator to the sink). As a result, these ok() statements were testing
that newly allocated allocators had a different address than the original
allocator, which of course sometimes fails.
Since we don't need to perform this test more than once anyway, just get rid of
the offending ok() statements.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2885
This MR introduces the driver mechanisms to handle dynamic events from the Wayland compositor, using wl_output events as the guiding use case (i.e., we want to update the win32u display settings when the host settings change).
In this design we create a dedicated thread to read and dispatch Wayland events received from the compositor. If a Wayland event handler wants some code to be run in the context of a particular HWND's thread, it can add an internal event to a custom queue we have for each (GUI enabled) thread. The ProcessEvents driver callback processes internal events from that queue. In order to wake up waiting threads we use a pipe to notify about new internal events, with the read end acting as the thread's host queue fd. This is similar to how winemac.drv works.
We use the aforementioned mechanisms to queue win32u display device updates to the desktop window thread. Since there are many pieces that need to fall into place, this MR gradually reaches the final design:
1. We first introduce the dedicated read/dispatch thread and handle events (and also display device updates if in the desktop process) in that thread.
2. We ensure access to Wayland output information is thread-safe and consistent (since in step 3 we will need to access it from a different thread).
3. We finally introduce per-thread internal event queues and, if we are in the desktop process, queue the display device update to the desktop window thread internal event queue. Note that the main portion of the wl_output event code is still handled in the dedicated read/dispatch thread.
--
v5: winewayland.drv: Update desktop window size on display changes.
winewayland.drv: Update display devices from the desktop window thread.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2712
From Microsoft documentation, [Using Side-by-Side Assemblies as a Resource][sxs-rsrc] outlines the significance of each reserved manifest resource ID.
Further investigation reveals the following:
1. `CREATEPROCESS_MANIFEST_RESOURCE_ID` (value: `1`): This is used for process-wide initial (`NULL`) activation context.
- **Usage documentation**: [Enabling an Assembly in an Application Without Extensions](https://learn.microsoft.com/en-us/windows/win32/sbscs/enabling-…
- **Intended container module type**: EXE only.
- **Lifetime of the associated activation context**: Alive until the process is terminated. Owned by system (NTDLL).
- **Isolation-aware**: No.
2. `ISOLATIONAWARE_MANIFEST_RESOURCE_ID` (value: `2`): This is used to specify the assembly manifest that the loader (Ldr) uses to resolve static imports. Also, this is used by isolation-aware wrappers defined in `*.inl` files included in the Windows SDK (`include\um`) when the `ISOLATION_AWARE_ENABLED` macro is defined as a nonzero value.
- **Usage documentation**: [Enabling an Assembly in an Application Hosting a DLL, Extension, or Control Panel](https://learn.microsoft.com/en-us/windows/win32/sbscs/enabling-an-as…
- **Intended container module type**: EXE and DLL.
- **Lifetime of the associated activation context**: Alive until the module is unloaded (e.g., via `FreeLibrary`). Owned by system (NTDLL).
- **Isolation-aware**: Yes.
3. `ISOLATIONAWARE_NOSTATICIMPORT_MANIFEST_RESOURCE_ID` (value: `3`): Ignored by the loader when resolving static imports. This is used by isolation-aware API wrappers defined in `*.inl` files included in the Windows SDK (`include\um`) when the `ISOLATION_AWARE_ENABLED` macro is defined as a nonzero value.
- **Usage documentation**: [IsolationAwareCleanup function][IsolationAwareCleanup]
- **Intended container module type**: EXE and DLL.
- **Lifetime of the associated activation context**: Alive until the application calls [`IsolationAwareCleanup`][IsolationAwareCleanup][^ia-cleanup-note]. Owned by the isolation-aware API wrapper library (part of the Windows SDK, rather than being a system DLL).
- **Isolation-aware**: Yes.
The `ISOLATION_AWARE_ENABLED` macro is documented in [Isolating Components][sxs-ic] as well as [Specifying a Default Activation Context][sxs-def-actctx]. When `ISOLATION_AWARE_ENABLED` macro is defined as a nonzero value, then the isolation-aware API wrapper library is enabled. The isolation-aware API wrapper library is responsible for:
- Creating (lazily) and destroying activation context (in `IsolationAwareCleanup`), if the manifest resource ID is `ISOLATIONAWARE_NOSTATICIMPORT_MANIFEST_RESOURCE_ID`.[^actctx-lifetime-remark]
- Note: the isolation-aware API wrapper library does not manage the activation context's lifetime and delegates the responsibility to the system loader if the manifest resource ID is `ISOLATIONAWARE_MANIFEST_RESOURCE_ID`.
- Intercepting Win32 API calls for automatic activation context activation. Each API wrapper activates the "isolation-aware" activation context (obtaining one if it did not exist) before calling the original procedure, and deactivates it before returning.
The isolation-aware wrappers may be either be defined inline, or compiled into static libraries that are linked into the final application executable.
From the information above as well as the tests included in this merge request, we can infer the following:
1. Although side-by-side awareness is a cross-cutting concern, the *activation* of activation contexts itself is *not* usually performed automatically by the system for the application (with the sole exception of process-wide activation context associated with `CREATEPROCESS_MANIFEST_RESOURCE_ID`, and static import resolution).
2. `ISOLATIONAWARE_NOSTATICIMPORT_MANIFEST_RESOURCE_ID` is treated like any other resource ID (from `0x0004` to `0xffff`) as far as the loader is concerned.
3. The resource ID of the manifest only concerns how the module containing the manifest intends to use the manifest. In fact, for DLLs that do not *statically* import symbols from side-by-side assemblies, the three resource IDs above are basically equivalent. A DLL can elect not to use manifest resources at all, and manage activation context and library loading by itself.
This is why I believe that this merge request is sufficient in completing the isolation-aware component support in Wine; the heavy lifting is done in the application side, not the system.
**EDIT**: Fix a few typos and unclear wording.
---
[^ia-cleanup-note]: According to the documentation, the application is presumably responsible for calling `IsolationAwareCleanup` from `DllMain` on `fdwReason = DLL_PROCESS_DETACH`.
[^actctx-lifetime-remark]: [IsolationAwareCleanup § Remarks](https://learn.microsoft.com/en-us/previous-versions/windows/deskto…, from Microsoft documentation.
[sxs-rsrc]: https://learn.microsoft.com/en-us/windows/win32/sbscs/using-side-by-side-as…
[IsolationAwareCleanup]: https://learn.microsoft.com/en-us/previous-versions/windows/desktop/legacy/…
[sxs-ic]: https://learn.microsoft.com/en-us/windows/win32/sbscs/isolating-components
[sxs-def-actctx]: https://learn.microsoft.com/en-us/windows/win32/sbscs/specifying-a-default-…
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=18889
--
v7: ntdll: Don't hard-code DLL manifest resource ID when looking up dependency assembly.
kernel32/tests: Test loading assembly manifest resource inside dependencies.
ntdll: Move ACTCTX lpResourceName validation to RtlCreateActivationContext.
kernel32/tests: Test setting lpResourceName to NULL for CreateActCtxW.
kernel32/tests: Remove test for ACTCTX_FLAG_HMODULE_VALID with hModule = NULL case.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2555
Block records are not processed; only the bitcode is validated.
--
v10: vkd3d-shader/dxil: Read and validate global abbreviated operands.
vkd3d-shader/dxil: Read and validate local abbreviated operands.
vkd3d-compiler: Introduce dxbc-dxil and dxbc-auto source types.
vkd3d-shader/dxbc: Introduce an option to autodetect the DXBC source type.
vkd3d-shader/dxil: Read and validate DXIL bitcode unabbreviated blocks.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/44
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53947
Improve performance of GdipDrawImagePointsRect by:
1. avoiding multiplication and use addition where it is possible.
2. avoid calculating `GdipInvertMatrix` if it is not used.
3. avoid not needed TransformMatrixPoints
I divided MR to several commits, to better undestand what is going on.
Application for testing (it needs logo.jpg file):
[gdiplusdrawimagepoints.exe](/uploads/545ff7d8ab1d60386366f64999346825/gdiplusdrawimagepoints.exe)
--
v10: test: try to fix failing test on 32 bit
https://gitlab.winehq.org/wine/wine/-/merge_requests/2864
~~This one's marked as a draft, as there seems to be a blocker with the method parameters.~~
~~The first commit totally works, _if_ the ddx/ddy parameters are literals - they do _not_ work when passing a variable of any kind. The test comes from tests/d3d12.c, so I'm mostly just trying to migrate that to the HLSL test suite, but it currently hits an assert before we get to the resource load (which does eventually work) and I'm not sure what's causing it:~~
```
vkd3d-compiler: libs/vkd3d-shader/tpf.c:3190: sm4_register_from_node: Assertion `instr->reg.allocated' failed.
```
~~Seems like it's surprised when we try to load from the constant buffer maybe?~~ Fixed!
--
v12: vkd3d-shader/hlsl: Add support for SampleGrad() method
tests: Add a test for SampleGrad() method
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/184
This MR introduces the driver mechanisms to handle dynamic events from the Wayland compositor, using wl_output events as the guiding use case (i.e., we want to update the win32u display settings when the host settings change).
In this design we create a dedicated thread to read and dispatch Wayland events received from the compositor. If a Wayland event handler wants some code to be run in the context of a particular HWND's thread, it can add an internal event to a custom queue we have for each (GUI enabled) thread. The ProcessEvents driver callback processes internal events from that queue. In order to wake up waiting threads we use a pipe to notify about new internal events, with the read end acting as the thread's host queue fd. This is similar to how winemac.drv works.
We use the aforementioned mechanisms to queue win32u display device updates to the desktop window thread. Since there are many pieces that need to fall into place, this MR gradually reaches the final design:
1. We first introduce the dedicated read/dispatch thread and handle events (and also display device updates if in the desktop process) in that thread.
2. We ensure access to Wayland output information is thread-safe and consistent (since in step 3 we will need to access it from a different thread).
3. We finally introduce per-thread internal event queues and, if we are in the desktop process, queue the display device update to the desktop window thread internal event queue. Note that the main portion of the wl_output event code is still handled in the dedicated read/dispatch thread.
--
v4: winewayland.drv: Update desktop window size on display changes.
winewayland.drv: Update display devices from the desktop window thread.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2712
--
v3: dsound: Avoid division by zero when calculating Doppler shift.
dsound: Change the speed of sound to 360.
dsound: Enable Doppler shift.
dsound/tests: Add tests for Doppler shift.
dsound: Store the frequency of 3D buffers separately.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2722
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53947
Improve performance of GdipDrawImagePointsRect by:
1. avoiding multiplication and use addition where it is possible.
2. avoid calculating `GdipInvertMatrix` if it is not used
It gives noticible speed improvement.
I divided MR to several commits, to better undestand what is going on.
Application for testing (it needs logo.jpg file):
[gdiplusdrawimagepoints.exe](/uploads/545ff7d8ab1d60386366f64999346825/gdiplusdrawimagepoints.exe)
--
v9: gdiplus: Improve performance of DrawImagePointsRect by avoid TransformMatrixPoints
gdiplus: use float increment instead of calculation to impove perf
gdiplus: use iterator instead calculate pointer position every time
https://gitlab.winehq.org/wine/wine/-/merge_requests/2864
--
v2: dsound: Avoid division by zero when calculating Doppler shift.
dsound/tests: Test Doppler shift with zero distance.
dsound: Change the speed of sound to 360.
dsound: Enable Doppler shift.
dsound/tests: Add tests for Doppler shift.
dsound: Store the frequency of 3D buffers separately.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2722
This enables horizontal scrolling gestures/wheels (tested on macOS) in applications like IrfanView which handle WM_MOUSEHWHEEL.
Support will need to be added to common controls for horizontal scrolling to work in programs like Wine's explorer or regedit.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2880
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53947
Improve performance of GdipDrawImagePointsRect by:
1. avoiding multiplication and use addition where it is possible.
2. avoid calculating `GdipInvertMatrix` if it is not used
It gives noticible speed improvement.
I divided MR to several commits, to better undestand what is going on.
Application for testing (it needs logo.jpg file):
[gdiplusdrawimagepoints.exe](/uploads/545ff7d8ab1d60386366f64999346825/gdiplusdrawimagepoints.exe)
--
v8: gdiplus: Improve performance of DrawImagePointsRect by avoid TransformMatrixPoints
gdiplus: Improve performance of GdipDrawImagePointsRect
gdiplus: use iterator instead calculate pointer position every time
gdiplus: limit calculating transformation points to resampling
https://gitlab.winehq.org/wine/wine/-/merge_requests/2864
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53947
Improve performance of GdipDrawImagePointsRect by:
1. avoiding multiplication and use addition where it is possible.
2. avoid calculating `GdipInvertMatrix` if it is not used
It gives noticible speed improvement.
I divided MR to several commits, to better undestand what is going on.
Application for testing (it needs logo.jpg file):
[gdiplusdrawimagepoints.exe](/uploads/545ff7d8ab1d60386366f64999346825/gdiplusdrawimagepoints.exe)
--
v7: gdiplus: Improve performance of DrawImagePointsRect by avoid TransformMatrixPoints
https://gitlab.winehq.org/wine/wine/-/merge_requests/2864
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53947
Improve performance of GdipDrawImagePointsRect by:
1. avoiding multiplication and use addition where it is possible.
2. avoid calculating `GdipInvertMatrix` if it is not used
It gives noticible speed improvement.
I divided MR to several commits, to better undestand what is going on.
Application for testing (it needs logo.jpg file):
[gdiplusdrawimagepoints.exe](/uploads/545ff7d8ab1d60386366f64999346825/gdiplusdrawimagepoints.exe)
--
v6: gdiplus: Improve performance of ZZGdipDrawImagePointsRect by avoid TransformMatrixPoints
https://gitlab.winehq.org/wine/wine/-/merge_requests/2864
--
v3: vkd3d-shader/tpf: Write out comparison mode sampler declarations and corresponding sampling instruction.
vkd3d-shader/hlsl: Parse SampleCmp() method.
vkd3d-shader/hlsl: Parse SamplerComparisonState objects.
vkd3d-shader/hlsl: Use a function table for object methods handlers.
vkd3d-shader/hlsl: Move object type checks to methods handlers.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/206