This draft is for tracking Wine Gecko 2.47.4. I tagged rc1 release and uploaded builds and this MR makes use of it.
What's new in this release:
- Gitlab CI integration. Official binaries are build by Gitlab now.
- Improved window messages handling for FFXIV.
- New DOM API and CSS extensions for better IE compatibility mode support.
- Compatibility fixes.
--
v2: mshtml: Wine Gecko 2.47.4 release.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2569
There's too much going on in this commit / MR. The changes to the drivers seem to be addressing a bug rather than implementing the Endpoint Volume API.
Also, note that the values passed to the non-`Scalar` API are in decibels, the `Scalar` API appears to be somewhere between linear and logrithmic, and the `ISimpleAudioVolume` values are linear.
Does your app call the `Scalar` versions of the API? If so, a good start would be to write some tests to figure out the mapping between `Scalar` and non-`Scalar` by e.g. setting using one and retreiving that value using the other.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2565#note_29455
Currently, the free list consists of a "small list" for sizes below 256,
which are linearly spaced, and a "large list" which is manually split
into a few chunks.
This patch replaces it with a single log-linear policy, while expanding
the range the large list covers.
The old implementation had issues when a lot of large allocations
happened. In this case, all the allocations went in the last catch-all
bucket in the "large list", and what happens is:
1. The linked list grew in size over time, causing searching cost to
skyrocket.
2. With the first-fit allocation policy, fragmentation was also making
the problem worse.
The new bucketing covers the entire range up until we start allocating
large blocks, which will not enter the free list. It also makes the
allocation policy closer to best-fit (although not exactly), reducing
fragmentation.
The increase in number of free lists does incur some cost when it needs
to be skipped over, but the improvement in allocation performance
outweighs it.
For future work, these ideas (mostly from glibc) might or might not
benefit performance:
- Use an exact best-fit allocation policy.
- Add a bitmap for freelist, allowing empty lists to be skipped with a
single bit scan.
Signed-off-by: Tatsuyuki Ishi <ishitatsuyuki(a)gmail.com>
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2622
--
v4: winecoreaudio: Implement and call timer_loop in unixlib.
winecoreaudio: Implement and call set_event_handle in unixlib.
winecoreaudio: Store flags in unixlib.
winecoreaudio: Retain precision when storing period in unixlib.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2603
The deleted test is a bad test: The behavior is different on different
drivers, for example, the test fails on the Windows 10 and 11 testbot
machines that have AMD video cards. Furthermore, MSDN does not say that
the destination context "must not" have any display lists yet but rather
that it "should not" have any.[1] The Khronos OpenGL Wiki similarly
advises against calling wglShareLists after the source or destination
context has at least one object, but if you do, it only says that "there
is a chance that wglShareLists will fail", not that it will necessarily
fail.[2] Since there's no clear "right" behavior here, we can adopt the
more permissive behavior that some programs expect, as long as it
doesn't corrupt the context.
[1] https://learn.microsoft.com/en-us/windows/win32/api/wingdi/nf-wingdi-wglsha…
[2] https://www.khronos.org/opengl/wiki/Platform_specifics:_Windows#wglShareLis…
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=11436
--
v3: winex11: Allow replacing either context in wglShareLists.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2032
Needed for mingw Firefox build.
The WIDL error points to the wrong function, specifically the one after it.
include/windows.ui.composition.interop.idl:35:63: error: parameter 'swapchain' of function 'CreateCompositionSurfaceForHandle' cannot derive from void *
HRESULT CreateCompositionSurfaceForSwapChain([in] IUnknown *swapchain, [out, retval] ICompositionSurface **result);
^
make[1]: *** [Makefile:163749: include/windows.ui.composition.interop.h] Error 1
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2620
On Sat Apr 8 12:22:23 2023 +0000, Nikolay Sivov wrote:
> As I recall, for original fix to accept a range of resource IDs the
> question was how are those different from each other, meaning if there
> are multiple resources, when one should be used but not another.
From Micrsoft 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 `0x0002` 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-…
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2555#note_29411
On Sat Apr 8 12:22:23 2023 +0000, Nikolay Sivov wrote:
> As I recall, for original fix to accept a range of resource IDs the
> question was how are those different from each other, meaning if there
> are multiple resources, when one should be used but not another.
From Micrsoft documentation, [Using Side-by-Side Assemblies as a Resource][sxs-rsrc] outlines the significance of each reserved manifest resource ID.
Further investigation shows 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**: 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**: 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**: Alive until the application calls [`IsolationAwareCleanup`][IsolationAwareCleanup][^ia-cleanup-note]. Owned by the isolation-aware API wrapper library.
- **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 loader 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 to the final application executable.
From the information above, 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 (with the sole exception of process-wide activation context associated with `CREATEPROCESS_MANIFEST_RESOURCE_ID`).
2. `ISOLATIONAWARE_NOSTATICIMPORT_MANIFEST_RESOURCE_ID` is treated like any other resource ID 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 by the application side, not the system.
---
[^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-…
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2555#note_29410
Today, the test scenario "ACTCTX_FLAG_HMODULE_VALID but hModule if not
set" is broken and unreliable. This problem is not evident in WineHQ
batch test runs; rather, the test failure seems to only be triggered
when the kernel32:actctx test is run in isolation.
When the flag ACTCTX_FLAG_HMODULE_VALID is specified in ACTCTX but
hModule is set to NULL, CreateActCtxW() may encounter different failure
modes depending on the environment and/or the test executable file.
Error codes observed so far include ERROR_SXS_CANT_GEN_ACTCTX and
ERROR_SXS_MANIFEST_TOO_BIG.
It appears that the inconsistent failure was caused by Windows trying to
interpret the main executable file of the current process as an XML
manifest file. This fails for the following reasons:
- A valid PE executable that starts with the "MZ" signature is not a
valid XML file.
- The test executable's size exceeds the limit imposed by the manifest
parser. This is much more likely for binaries with debugging symbols.
Meanwhile, winetest bundles a stripped version of the test executable
(kernel32_test-stripped.exe), which may end up masking the problem.
Fix this by changing the FullDllName of the main executable module's
LDR_DATA_TABLE_ENTRY to the pathname of a temporary manifest file (valid
or invalid) before testing. The testing is performed in a child
process, since it deliberately "corrupts" the process state.
--
v3: kernel32/tests: Fix test for ACTCTX_FLAG_HMODULE_VALID with hModule = NULL case.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2617
Today, the test scenario "ACTCTX_FLAG_HMODULE_VALID but hModule if not
set" is broken and unreliable. This problem is not evident in WineHQ
batch test runs; rather, the test failure seems to only be triggered
when the kernel32:actctx test is run in isolation.
When the flag ACTCTX_FLAG_HMODULE_VALID is specified in ACTCTX but
hModule is set to NULL, CreateActCtxW() may encounter different failure
modes depending on the environment and/or the test executable file.
Error codes observed so far include ERROR_SXS_CANT_GEN_ACTCTX and
ERROR_SXS_MANIFEST_TOO_BIG.
It appears that the inconsistent failure was caused by Windows trying to
interpret the main executable file of the current process as an XML
manifest file. Note that a valid PE executable that starts with the
"MZ" signature is not a valid XML file; furthermore, the test executable
may simply be too large for a single manifest file.
Fix this by changing the FullDllName of the main executable module's
LDR_DATA_TABLE_ENTRY to the pathname of a temporary manifest file (valid
or invalid) before testing. The testing is performed in a child
process, since it deliberately "corrupts" the process state.
--
Notes:
- Deleting the temporary file should be done by the `create_temp_manifest_file`
--
v2: kernel32/tests: Fix test for ACTCTX_FLAG_HMODULE_VALID with hModule = NULL case.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2617
Today, the test scenario "ACTCTX_FLAG_HMODULE_VALID but hModule if not
set" is broken and unreliable. This problem is not evident in WineHQ
batch test runs; rather, the test failure seems to only be triggered
when the kernel32:actctx test is run in isolation.
When the flag ACTCTX_FLAG_HMODULE_VALID is specified in ACTCTX but
hModule is set to NULL, CreateActCtxW() may encounter different failure
modes depending on the environment and/or the test executable file.
Error codes observed so far include ERROR_SXS_CANT_GEN_ACTCTX and
ERROR_SXS_MANIFEST_TOO_BIG.
It appears that the inconsistent failure was caused by Windows trying to
interpret the main executable file of the current process as an XML
manifest file. Note that a valid PE executable that starts with the
"MZ" signature is not a valid XML file; furthermore, the test executable
may simply be too large for a single manifest file.
Fix this by changing the FullDllName of the main executable module's
LDR_DATA_TABLE_ENTRY to the pathname of a temporary manifest file (valid
or invalid) before testing. The testing is performed in a child
process, since it deliberately "corrupts" the process state.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2617
The last patch is a huge optimization to what is done in patch 2. Without that the sample is first copied from GPU to CPU each time wg_transform_read_mf() locks the buffer (allocating extra linear buffer on the way) and then copies the data back to GPU. That happens even if there is no sample available from wg_transform. With the last patch there is just one memory copy to the (write-only) locked DXGI surface buffer. And CPU to GPU texture transfer (which would be there anyway in most cases on software path as most of the apps are going to get the image to GPU anyway). In principle we could also skip the explicit staging texture and use _UpdateSubresource instead directly from h264 decoder, but this is currently not supported in wined3d for chroma formats and the overall difference between _UpdateSubresource and explicit mapped staging texture is not that great probably.
--
v6: winegstreamer: Pass temporary sample to wg_transform_read_mf() in h264 decoder.
winegstreamer: Provide samples if DXGI device manager is set in h264 decoder.
winegstreamer: Process MFT_MESSAGE_SET_D3D_MANAGER in h264 decoder.
mf/tests: Test h264 decoder with dxgi device manager.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2587
The last patch is a huge optimization to what is done in patch 2. Without that the sample is first copied from GPU to CPU each time wg_transform_read_mf() locks the buffer (allocating extra linear buffer on the way) and then copies the data back to GPU. That happens even if there is no sample available from wg_transform. With the last patch there is just one memory copy to the (write-only) locked DXGI surface buffer. And CPU to GPU texture transfer (which would be there anyway in most cases on software path as most of the apps are going to get the image to GPU anyway). In principle we could also skip the explicit staging texture and use _UpdateSubresource instead directly from h264 decoder, but this is currently not supported in wined3d for chroma formats and the overall difference between _UpdateSubresource and explicit mapped staging texture is not that great probably.
--
v5: winegstreamer: Pass temporary sample to wg_transform_read_mf() in h264 decoder.
winegstreamer: Provide samples if DXGI device manager is set in h264 decoder.
winegstreamer: Process MFT_MESSAGE_SET_D3D_MANAGER in h264 decoder.
mf/tests: Test h264 decoder with dxgi device manager.
mf/tests: Increase h264data.bin video length.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2587
This fixes a bug when the session topology contains an invalid
source, which makes the session thread to hang and stop executing
commands.
--
v4: mf: Handle error when IMFMediaSource_Start fails.
mf: Handle errors when subscribing to events.
mf/tests: Test media session error handling.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2496
This fixes a bug when the session topology contains an invalid
source, which makes the session thread to hang and stop executing
commands.
--
v3: mf: Handle errors when subscribing to events.
mf/tests: Test media session error handling.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2496
Check the content of the output buffer in addition to checking the
return value.
Also show that multibyte characters are not truncated when the output
buffer is too small.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2613
On Fri Apr 7 14:53:00 2023 +0000, Rémi Bernon wrote:
> > I'm not sure what you mean by very integrated with win32u. Exposing
> builtin IMEs as "normal" IMEs is not affected by changes that I suggest.
> For driver interface, it would just replace one driver entry by another.
> I think I was confused by the idea of adding win32u specific interface
> for the callbacks. I'll consider doing this, as I think it also make
> sense to pass NtUserNotifyIMEStatus calls.
> I'm curious then, is there any advantage of using `NtUserMessageCall` vs
> `NtUserCallOneParam` or one of the other flavor? `NtUserMessageCall`
> takes a hwnd as first parameter, it feels a bit wrong to use an HIMC there.
I'd expect that `NtUserMessageCall` would be a bit nicer for wow64, because it may just pass through arguments like `NtUserSpyGetMsgName`, but yeah, handle type mismatch is not that nice.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2598#note_29322
This adds a new `wine/ime.h` header, to share the `IMEPRIVATE` structure between `imm32`, `winex11` and `winemac`. This structure will be internal to `imm32` ultimately, but I intend to keep the header to define a new internal interface for driver to call back into `imm32` (through the UI window), and for a new interface to call from `imm32` into host IME implemented by the drivers.
--
v3: imm32: Remove unnecessary HIMC check in IME UI window proc.
imm32: Call DefWindowProcW from IME UI for unhandled messages.
imm32: Cleanup default IME UI window proc traces.
winemac: Use the default IME UI window proc implementation.
winex11: Move IME UI proc to default IME implementation.
winex11: Cleanup spaces in IME UI window proc.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2598
--
v2: imm32/tests: Add more ImmSetCompositionString tests.
imm32/tests: Add more ImmGetCompositionString(W|A) tests.
imm32/tests: Test WM_IME_NOTIFY messages target window.
imm32/tests: Test setting the same HIMC statuses twice.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2607
This adds a new `wine/ime.h` header, to share the `IMEPRIVATE` structure between `imm32`, `winex11` and `winemac`. This structure will be internal to `imm32` ultimately, but I intend to keep the header to define a new internal interface for driver to call back into `imm32` (through the UI window), and for a new interface to call from `imm32` into host IME implemented by the drivers.
--
v2: imm32: Remove unnecessary HIMC check in IME UI window proc.
imm32: Call DefWindowProcW from IME UI for unhandled messages.
imm32: Cleanup default IME UI window proc traces.
winemac: Use the default IME UI window proc implementation.
winex11: Move IME UI proc to default IME implementation.
winex11: Cleanup spaces in IME UI window proc.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2598
This adds a new `wine/ime.h` header, to share the `IMEPRIVATE` structure between `imm32`, `winex11` and `winemac`. This structure will be internal to `imm32` ultimately, but I intend to keep the header to define a new internal interface for driver to call back into `imm32` (through the UI window), and for a new interface to call from `imm32` into host IME implemented by the drivers.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2598
This series aims to improve GPU-side performance by avoiding VK_IMAGE_LAYOUT_GENERAL for textures that are used as render target and shader resource view. To do so, we have to transition them between VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL and VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL depending on use (and likewise for depth stencils).
It improves performance of Rocket League from 80 fps to 100 fps in a GPU limited configuration on my Radeon Polaris GPU.
This MR is marked as draft for now because I am not convinced by patch 3 yet. For actual submission I think I'll create separate MRs for patches 1-3 and 4-8.
Patch 2 introduces a validation layer error in the d3d11 tests that gets fixed in patch 3. No new test failures are introduced, although none of the existing ones are fixed either.
--
v2: wined3d: Fall back to general layout if necessary.
wined3d: Avoid VK_IMAGE_LAYOUT_GENERAL.
wined3d: Sync depth stencils to both early and late depth test.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2455
These parts only contain simple images that can be achieved with border fill backgrounds as well.
So visually, this change is a no-op. The reason for using image file backgrounds is that I tend
to use the same background type as the theme files for Windows. However, drawing border fill
background is much more efficient.
Pro Evolution Soccer 2008 demo is buggy and generates ~570,000 WM_PAINT messages for the progress
control. On Windows, it's ~1,140,000 WM_PAINT messages. DrawThemeBackground() on Wine is 10x more
expensive than that of Windows and I found little room for optimization. 60% of the time in
DrawThemeBackground() is spend for CreateCompatibleDC() and other 30% for actually drawing. So I
decided to change light.msstyles instead.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54728
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2604
Stop changing their attributes in place. This is complex, somewhat brittle, and
currently broken for the Vulkan backend.
Restrict wined3d_texture_update_desc() to changing user memory and pitch.
--
v2: wined3d: Remove no longer used arguments from wined3d_texture_update_desc().
https://gitlab.winehq.org/wine/wine/-/merge_requests/2535
The motivation for this is twofold.
Firstly, this makes code a little nicer to read, by virtue of removing a
ubiquitous &(...)->node.
Secondly, and more importantly, this allows for the possibility of constructors
returning a different instruction type than intended. The ultimate goal here is
to return a preallocated "error" instruction when allocation fails, instead of
returning NULL and propagating out-of-memory handling to the caller.
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/153
The main advantage is that this way we're getting valid DXBC checksums for DXBC blobs generated by d3dcompiler. See also https://bugs.winehq.org/show_bug.cgi?id=54464.
--
v3: d3dcompiler: Use vkd3d_shader_parse_dxbc() in d3dcompiler_shader_reflection_init().
d3dcompiler: Use vkd3d_shader_parse_dxbc() in d3dcompiler_strip_shader().
d3dcompiler: Use vkd3d_shader_parse_dxbc() in d3dcompiler_get_blob_part().
d3dcompiler: Use vkd3d_shader_serialize_dxbc() in d3dcompiler_strip_shader().
d3dcompiler: Use vkd3d_shader_serialize_dxbc() in d3dcompiler_get_blob_part().
d3dcompiler: Store DXBC sections as vkd3d_shader_dxbc_section_desc structures.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2577
As I recall, for original fix to accept a range of resource IDs the question was how are those different from each other, meaning if there are multiple resources, when one should be used but not another.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2555#note_29222
The last patch is a huge optimization to what is done in patch 2. Without that the sample is first copied from GPU to CPU each time wg_transform_read_mf() locks the buffer (allocating extra linear buffer on the way) and then copies the data back to GPU. That happens even if there is no sample available from wg_transform. With the last patch there is just one memory copy to the (write-only) locked DXGI surface buffer. And CPU to GPU texture transfer (which would be there anyway in most cases on software path as most of the apps are going to get the image to GPU anyway). In principle we could also skip the explicit staging texture and use _UpdateSubresource instead directly from h264 decoder, but this is currently not supported in wined3d for chroma formats and the overall difference between _UpdateSubresource and explicit mapped staging texture is not that great probably.
--
v4: winegstreamer: Pass temporary sample to wg_transform_read_mf() in h264 decoder.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2587
The last patch is a huge optimization to what is done in patch 2. Without that the sample is first copied from GPU to CPU each time wg_transform_read_mf() locks the buffer (allocating extra linear buffer on the way) and then copies the data back to GPU. That happens even if there is no sample available from wg_transform. With the last patch there is just one memory copy to the (write-only) locked DXGI surface buffer. And CPU to GPU texture transfer (which would be there anyway in most cases on software path as most of the apps are going to get the image to GPU anyway). In principle we could also skip the explicit staging texture and use _UpdateSubresource instead directly from h264 decoder, but this is currently not supported in wined3d for chroma formats and the overall difference between _UpdateSubresource and explicit mapped staging texture is not that great probably.
--
v3: winegstreamer: Pass temporary sample to wg_transform_read_mf() in h264 decoder.
winegstreamer: Provide samples if DXGI device manager is set in h264 decoder.
winegstreamer: Process MFT_MESSAGE_SET_D3D_MANAGER in h264 decoder.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2587
--
v3: winegstreamer: Output BGRx video from the media source.
winegstreamer: Move flipping based on RGB to the frontends.
winegstreamer: Translate the MF_MT_DEFAULT_STRIDE attribute to flipped video in mf_media_type_to_wg_format().
winegstreamer: Set the MF_MT_DEFAULT_STRIDE attribute in mf_media_type_from_wg_format().
winegstreamer: Initialize media source video types from a wg_video_format array.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2159