Support manually packing constant buffer elements through the `packoffset(·)` syntax.
Support not included yet for simultaneously having semantics, `register(·)`, and `packoffset(·)`, for abnormalities such as:
```hlsl
Texture2D tex;
cbuffer buff
{
float4 a : packoffset(c0);
sampler sam : packoffset(c0) : register(s1) : SEMANTIC;
}
float4 main() : sv_target
{
return tex.Sample(sam, float2(0, 0)) + a;
}
```
but this motivated the addition of the `hlsl_ir_var.offset_reservation` field instead of reusing `hlsl_ir_var.reg_reservation`.
--
v4: vkd3d-shader/hlsl: Consider register() as manual packing for resource fields.
tests: Test packoffset() with resources inside cbuffers.
vkd3d-shader/hlsl: Ignore packoffset() contents for SM1.
vkd3d-shader/hlsl: Don't allow manual and automatic cbuffer offset packing.
vkd3d-shader/hlsl: Detect overlaps in cbuffer offsets.
vkd3d-shader/hlsl: Support packoffset().
vkd3d-shader/hlsl: Parse packoffset().
vkd3d-shader/hlsl: Rename struct hlsl_reg_reservation fields.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/106
--
v3: win32u: Call NtUserActivateKeyboardLayout on focus change.
winex11: Remove now unnecessary user locale change checks.
win32u: Prevent user locale change in NtUserActivateKeyboardLayout.
win32u: Keep the current user locale when loading layout.
win32u: Keep the current user locale when enumerating layouts.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2355
--
v2: win32u: Call NtUserActivateKeyboardLayout on focus change.
winex11: Remove now unnecessary user locale change checks.
win32u: Prevent user locale change in NtUserActivateKeyboardLayout.
win32u: Keep the current user locale when loading layout.
win32u: Keep the current user locale when enumerating layouts.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2355
This is in preparation of implementing all logic from the server in kernelbase, which is needed because Nt*Key ignores KEY_WOW64_32KEY. Unfortunately this requires a lot of server calls.
The full branch can be found here
https://gitlab.winehq.org/sbaars/wine/-/tree/shared-classes-new
The old approach that doesn't duplicate code to kernelbase can be found here
https://gitlab.winehq.org/sbaars/wine/-/tree/shared-classes-old
I ran make_requests by the way, not sure if we should still leave that out with the gitlab workflow.
--
v15: kernelbase: Restructure the create_key() loop.
kernelbase: Add a fast path to create_key().
kernelbase: Move create_key() below open_key().
kernelbase: Factor opening a subkey out of open_key().
kernelbase: Always try to open the Wow6432Node in open_key().
kernelbase: Restructure the open_key() loop.
kernelbase: Pass the key name to create_key().
kernelbase: Pass the root key to create_key().
kernelbase: Pass the key name to open_key().
kernelbase: Pass the root key to open_key().
https://gitlab.winehq.org/wine/wine/-/merge_requests/1445
There are times when it is useful to test changes on the Windows XP and 2003 VMs, but the direct use of functions not on those platforms makes this impossible.
--
v2: kernel32/tests: Call CompareStringEx via function address (locale.c)
kernel32/tests: Call LCIDToLocaleName via function address (locale.c)
kernel32/tests: Call LCMapStringEx via function address (locale.c)
https://gitlab.winehq.org/wine/wine/-/merge_requests/1897
This is in preparation of implementing all logic from the server in kernelbase, which is needed because Nt*Key ignores KEY_WOW64_32KEY. Unfortunately this requires a lot of server calls.
The full branch can be found here
https://gitlab.winehq.org/sbaars/wine/-/tree/shared-classes-new
The old approach that doesn't duplicate code to kernelbase can be found here
https://gitlab.winehq.org/sbaars/wine/-/tree/shared-classes-old
I ran make_requests by the way, not sure if we should still leave that out with the gitlab workflow.
--
v14: kernelbase: Restructure the create_key() loop.
kernelbase: Add a fast path to create_key().
kernelbase: Move create_key() below open_key().
kernelbase: Factor opening a subkey out of open_key().
kernelbase: Always try to open the Wow6432Node in open_key().
kernelbase: Restructure the open_key() loop.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1445
FFXIV depends on this. It calls SetFullscreenState when it receives WM_WINDOWPOSCHANGED. Through luck the recursion aborts after two calls. The user-visible bug is that after leaving fullscreen, the game's window is still TOPMOST because we overwrite the stored pre-fullscreen window flags.
--
v3: dxgi/tests: Test nested SetFullscreenState from the same thread.
dxgi/tests: Test nested fullscreen application from different thread.
dxgi: Catch nested SetFullscreenState invocations.
dxgi: Unlock the wined3d mutex after storing the new target.
dxgi/tests: Run test_swapchain_window_messages on d3d12.
dxgi/tests: Run test_resize_target_wndproc on d3d12 too.
dxgi/tests: Fix UnregisterClass call in test_resize_target_wndproc.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1964
And begin cleanup of several functions in preparation for their implementation. This only reverse the control flow to use early return (and cleanup variable names and traces as it's touching entire functions anyway), so that later changes wrt IME loading / freeing would be simpler.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2354
--
v6: winegstreamer: Implement ProcessInput and ProcessOutput for WMV decoder DMO.
winegstreamer: Create wg_transform for WMV decoder.
winegstreamer: Make sure fps_d is not zero.
winegstreamer: Add format field to wmv wg_format.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2258
--
v5: dxgi: Reset the back buffer index to zero on ResizeBuffers().
dxgi/tests: Test that ResizeBuffers() resets the back buffer index to zero.
dxgi: Always assume that a D3D12 swapchain always uses user images.
dxgi: Immediately error out when creating a D3D12 swapchain on a non-immediate queue.
d3d12/tests: Test that D3D12 swapchains can only be created on direct command queues.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2296
This should fix some rare crashes in e.g. FFXIV Launcher (requires Proton patches to have it working though).
--
v3: mshtml: Use already available window local variable in refresh task.
mshtml: Grab refs to windows upfront before sending pagehide events.
mshtml: Hold ref to the frame element during readyState notifications.
mshtml: Check if browser was detached during notifications while navigating.
mshtml: Hold ref to outer window when navigating.
mshtml: Hold ref to inner window when calling external code.
mshtml: Hold ref to HTMLDocumentObj when calling external code.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2336
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51848
SPORE creates a swapchain on a window, then destroys it, then creates a
different swapchain on the same window and uses it for the rest of its lifetime.
The swapchains have different GLX visuals (the details are unimportant).
The effect is that the second swapchain sees the pixel format set by the first
swapchain, through GetPixelFormat(), and therefore needs to set and then
restore the new pixel format on every present. This results in recreating the
GLX drawable twice per frame, which is extremely expensive.
This patch series changes WGL_WINE_pixel_format_passthrough to only set an
"internal" pixel format. The real pixel format will still be set as it is now,
but GetPixelFormat() will always return 0, signalling to wined3d that the
application has not set the pixel format, and therefore there is no need to
restore it.
As the tests show, this change also matches Windows, which does not report that
a pixel format has been set after presenting a Direct3D swapchain.
This is a large series by patch count, but I fear that splitting it into two
parts would make it difficult to grasp the entire picture, and purpose of the
earlier patches. It also contains six patches which are simply repetitions
across the three user drivers, which should ease the burden of review somewhat.
--
v4: wineandroid: Separately store the internal pixel format set by WGL_WINE_pixel_format_passthrough.
winemac: Separately store the internal pixel format set by WGL_WINE_pixel_format_passthrough.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2217
When len is zero (to obtain the length needed), nothing is written to `output`, even though the rewrite (correctly) uses WideCharToMultiByte on the output to determine the returned length. But this leads to reading garbage uninitialized values instead of the proper value.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2351
Silences a very common warning.
--
v3: vkd3d-shader/dxbc: Validate and skip the signature section header size.
vkd3d-shader/dxbc: Emit a shader error for an invalid signature data size.
vkd3d-shader/dxbc: Pass a message context to for_each_dxbc_section().
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/113
--
v7: vkd3d: Do not keep the CS queue locked while processing it.
vkd3d: Always enqueue wait operations, even when they can be executed right away.
vkd3d: Always enqueue signal operations, even when they can be executed right away.
vkd3d: Always enqueue execute operations, even when they can be executed right away.
vkd3d: Hold the queue mutex when adding the queue to a blocked list.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/94
A couple of tests (ntdll, psapi, dbghelp) were failing when running
on Windows 11 platform.
These tests were creating a new process out of
c:\windows\syswow64\notepad.exe and expecting a wow64 32bit child
process.
Under Windows 11, notepad has been migrated into the UWP framework
and the operation above creates a 64bit process.
This series replace all the cases above with msinfo32.exe which
still have the properties we expected for such an application.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2252
This should fix some rare crashes in e.g. FFXIV Launcher (requires Proton patches to have it working though).
--
v2: mshtml: Use already available window local variable in refresh task.
mshtml: Grab refs to windows upfront before sending pagehide events.
mshtml: Hold ref to the frame element during readyState notifications.
mshtml: Check if browser was detached during notifications while navigating.
mshtml: Hold ref to outer window when navigating.
mshtml: Hold ref to inner window when calling external code.
mshtml: Hold ref to HTMLDocumentObj when calling external code.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2336
This series fixes a couple of issues related to dbghelp lookup in ELF
modules:
- get the correct wine loader in 64bit multi-arch setup
- don't fail in 32bit multi-arch setup when trying to access 64bit ELF
modules above 4G
- handle libwine.so removal and let vdso lookup work again
- adding a couple of tests
--
v2: dbghelp: Fix vdso.so lookup.
dbghelp: Don't set ELF loader when wine's loader isn't accessible.
dbghelp/tests: Add tests for SymRefreshModuleList() on non-live target.
dbghelp: Use 'wine' as loader on multi-arch configuration.
dbghelp/tests: Preserve last error in process_get_kind().
dbghelp/tests: Better use global variables.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2347
Redirecting its calls to the test executable for easier testing and to wokaround
some Windows IME caching mechanism that prevent the IME module from reloading.
--
v6: imm32/tests: Test ImmGetIMEFileName with the installed IME.
imm32/tests: Test ImmGetDescription with the installed IME.
imm32/tests: Redirect IME function to the main module.
imm32/tests: Test ImmInstallIMEW with an actual IME.
makedep: Support resource files for embedded TESTDLL.
makedep: Rename TESTDLL generated .res to avoid conflicts.
imm32/tests: Add broken test results for w10v22H2.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2221
Redirecting its calls to the test executable for easier testing and to wokaround
some Windows IME caching mechanism that prevent the IME module from reloading.
--
v5: imm32/tests: Test ImmGetIMEFileName with the installed IME.
imm32/tests: Test ImmGetDescription with the installed IME.
imm32/tests: Redirect IME function to the main module.
imm32/tests: Test ImmInstallIMEW with an actual IME.
makedep: Support resource files for embedded TESTDLL.
makedep: Rename TESTDLL generated .res to avoid conflicts.
imm32/tests: Add broken test results for w10v22H2.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2221
This series fixes a couple of issues related to dbghelp lookup in ELF
modules:
- get the correct wine loader in 64bit multi-arch setup
- don't fail in 32bit multi-arch setup when trying to access 64bit ELF
modules above 4G
- handle libwine.so removal and let vdso lookup work again
- adding a couple of tests
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2347
Redirecting its calls to the test executable for easier testing and to wokaround
some Windows IME caching mechanism that prevent the IME module from reloading.
--
v4: imm32/tests: Test ImmGetIMEFileName with the installed IME.
imm32/tests: Test ImmGetDescription with the installed IME.
imm32/tests: Redirect IME function to the main module.
imm32/tests: Test ImmInstallIMEW with an actual IME.
makedep: Support resource files for embedded TESTDLL.
imm32/tests: Add broken test results for w10v22H2.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2221
The idea I have is to use this module to declare class stubs until there is a good reason to split them to dedicated modules. WinRT modules aren't usually loaded directly, and instead the registry is queried to figure which module to load for which class.
This would help avoiding unnecessary proliferation of stub WinRT modules, while at the same time allowing to factor WinRT foundation code (such as vector / async, etc...) between the modules that seem to deserve to be implemented separately.
The relevant classes could then be split out to dedicated modules on a as-needed basis, when they get fleshed out.
--
v2: winewinrt: Move Vector<HSTRING> from windows.media.speech.
windows.media.speech: Use Vector<IInspectable> from winewinrt.
winewinrt: Rename Vector<IInspectable> structs and methods.
winewinrt: Move Vector<IInspectable> from windows.gaming.input.
winewinrt: Introduce new WinRT common module.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2298
On Tue Mar 7 07:47:49 2023 +0000, Rémi Bernon wrote:
> There's the IDL side and the C implementation side. The `requires`
> keyword is only checked and enforced on the IDL side, although I'm not
> sure it's even very strict, and it means that if a class declares the
> `ISpatialSurfaceObserverStatics2` interface, it needs to declare the
> `ISpatialSurfaceObserverStatics` interface too.
> On the C side, nothing is enforced, and although you are supposed to
> implement the interfaces that were declared in the IDL, it will only be
> a problem to not have them when something queries it. Some interfaces
> like `IAgileObject` are completely trivial to add, so we usually add
> them right away (although I think incorrectly putting them with the
> default interface), but otherwise you don't have to implement interfaces
> that are never used.
> Then, even on the IDL side, declaring an interface doesn't necessarily
> mean you need to have its definition either, and a forward declaration
> is sometimes enough. You only need the definition for the default
> runtimeclass interfaces, as the interface UUID is then required for some
> things (I'm not sure anymore about the details).
I see, that makes sense, thanks for the thorough explanation.
> Then, even on the IDL side, declaring an interface doesn't necessarily mean you need to have its definition either, and a forward declaration is sometimes enough. You only need the definition for the default runtimeclass interfaces, as the interface UUID is then required for some things (I'm not sure anymore about the details).
I thought it would be incorrect to add just forward declarations, I wish I knew this earlier.
I'm also working on adding the `IHolographicSpace` interface and I'm already done with the headers. I only added the default runtimeclass interfaces, but there were so many dependencies even with just that. I've already added the definitions for them, but now I'm wondering if it was even necessary. It took a significant amount of time too.
I'll submit it when I'm done with the implementations.
Speaking of which, I'm not sure which functions to implement. It's not clear which one is supposed to be called first by the apps. There are 3, IsConfigured, IsSupported, and IsAvailable. According to Microsoft Learn, IsSupported is always true on 64-bit Windows, but false on 32-bit.
> On Desktop PCs running 64-bit Windows, this is always true. If IsAvailable is false because the > user has not yet set up their Mixed Reality headset, calling CreateForCoreWindow anyway will guide them through the setup flow.
>
> On HoloLens, this is always true.
>
> On any other system, including Desktop PCs running 32-bit Windows, this is false, as Mixed Reality headsets are not supported on those systems.
IsConfigured is also similar:
>On Desktop PCs running 64-bit Windows, this is initially false. Once the user has set up Mixed Reality through the Mixed Reality Portal, this becomes true. If this is false, but IsSupported is true, calling CreateForCoreWindow anyway will guide the user through the setup flow.
I'm thinking it would be a good idea to implement all 3. What do you think?
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2292#note_26370
--
v5: winegstreamer: Implement ProcessInput and ProcessOutput for WMV decoder DMO.
winegstreamer: Create wg_transform for WMV decoder.
winegstreamer: Better handle framerate.
winegstreamer: Add format field to wmv wg_format.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2258
On WOW64, Nt calls expect a 64-bit IO_STATUS_BLOCK with .Pointer pointing to the 32-bit IOSB. When Nt calls are made from the unix side we need to initialize the pointer to NULL to, at least, discard the IOSB results and avoid invalid writes.
There's the same problem in wineandroid.drv `android_ioctl`, but it is more complicated. The IOSB result is actually read, so instead of a NULL pointer it will need to point to a 32-bit IOSB, and to check whether the process is WOW64 or not when reading the result.
It's more complicated and I preferred to not make the change. Note that anything that needs the IOSB result from the unix side will face the same problem, and it would maybe be nice to have a general solution.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2333
Revert "server: Don't invalidate the newly exposed child region on the parent if it doesn't clip children."
This reverts commit 33617af8145b6fadfe41d48968a728ff57b3064b.
Apparently, the aforementioned commit might cause the expose region to
be incorrectly computed when a window transitions from invisible state
to visible state.
The commit also had caused regression in the following apps:
- Wine regedit.exe (bug 54268)
- Dn-FamiTracker (bug 52903)
- Unity Assets Bundle Extractor (same cause behind bug 52903)
It appears that the commit catalyzes discovery of hidden bugs in Wine's
window repaint logic. It's also possible that the algorithm for
computing the expose region is incomplete.
For these reasons, revert this commit for now.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54268
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52903
--
v2: Revert "server: Don't invalidate the newly exposed child region on the parent if it doesn't clip children."
https://gitlab.winehq.org/wine/wine/-/merge_requests/2342
This fixes various problems I've run into while trying to use Fusion 360 in wine.
- stacking issues in unmanaged mode
- I also attempted to apply the same fix for managed mode, but it looks difficult to do this in a way that plays well with window managers; I think it's best left up to them to keep override_redirect windows at the top of the stack)
- when the window manager sets our state to withdrawn, tell the window that it's been minimized, since the semantics are very similar
- the last one is a hack because I don't really know what to do about it, when clicking on the floating popups, they gain focus, which causes wine to incorrectly make them managed and that breaks everything
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2343
Today, test_TxGetNaturalSize() creates a pop-up window with a fixed size
(extent) of 100 x 100. The test function then proceeds to compute the
natural size of rich edit control that fits the sample text
"TestSomeText" and compare it to the RECT calculated by DrawText.
It appears that this test fails if the text width exceeds the width of
the test window's client area. In this case, DrawText() with
DT_WORDBREAK breaks the text into the two lines due to text wrapping;
however, Rich Edit's ITextServices::TxGetNaturalSize implementation does
not seem to perform text wrapping on overflow. This results in extent
mismatch.
In conclusion, the test may fail if the rendered width of the sample
text "TestSomeText" is larger than what the test expects. This depends
on the current font used for DEFAULT_GUI_FONT.
Fix this by omitting the DT_WORDBREAK flag for the DrawText() call in
_check_txgetnaturalsize().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54637
--
v2: riched20/tests: Don't specify DT_WORDBREAK in _check_txgetnaturalsize().
https://gitlab.winehq.org/wine/wine/-/merge_requests/2335
Today, test_TxGetNaturalSize() creates a pop-up window with a fixed size
(extent) of 100 x 100. The test function then proceeds to compute the
natural size of rich edit control that fits the sample text
"TestSomeText" and compare it to the RECT calculated by DrawText.
It appears that this test fails if the text width exceeds the width of
the test window's client area. In this case, DrawText() with
DT_WORDBREAK breaks the text into the two lines due to text wrapping;
however, Rich Edit's ITextServices::TxGetNaturalSize implementation does
not seem to perform text wrapping on overflow. This results in extent
mismatch.
In conclusion, the test may fail if the rendered width of the sample
text "TestSomeText" is larger than what the test expects. This depends
on the current font used for DEFAULT_GUI_FONT.
Fix this by omitting the DT_WORDBREAK flag for the DrawText() call in
_check_txgetnaturalsize().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54637
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2335
Needed by the VR games Forewarned and Überlaüfer.
I had to put the parameters of the header functions on newlines because they're too long. Did the same for the other headers for consistency. windows.security.cryptography.idl uses a similar style.
--
v2: windows.perception.stub: Implement ISpatialSurfaceObserverStatics2::IsSupported().
windows.perception.stub/tests: Add ISpatialSurfaceObserverStatics2::IsSupported() tests.
windows.perception.stub: Add ISpatialSurfaceObserverStatics2 stub interface.
windows.perception.stub: Add ISpatialSurfaceObserverStatics stub interface.
windows.perception.stub: Add DLL.
include: Add windows.perception.spatial.surfaces.idl file.
include: Add windows.graphics.directx.idl file.
include: Add windows.perception.spatial.idl file.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2292
This was either added by accident, or in an attempt to stop checking the message
list once we hit a winevent hook todo [and accidentally given too wide of a
scope]. However, the same commit also uses a global counter to ensure that only
one winevent todo is printed, so we don't need to break here anyway.
Fixes: a72bffe768c9fe462010d7e40e20226322fb82c7
--
v2: user32/tests: Do not stop checking the message list when skipping an optional or unsupported message.
user32/tests: Do not dump the message sequence when a todo succeeds on Windows.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2314
Signed-off-by: Bernhard Kölbl <besentv(a)gmail.com>
--
v23: windows.media.speech: Implement Vosk create and release functions in the unixlib.
windows.media.speech/tests: Allow the SpeechRecognizer creation to fail in Wine.
windows.media.speech/tests: Get rid of duplicated hresult.
windows.media.speech: Add unixlib stub.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2091