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`.
--
v3: 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().
tests: Test packoffset().
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/106
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.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2292
> Thinking of doing this x11 specific, I think that maybe we don't even need a special boolean flag if your MR !2217 gets in? Once we have a separate tracking of internal pixel format in WGL_WINE_pixel_format_passthrough we could just always fail setting internal pixel format once external is set. The extension itself will still work as if an app wants to use GL together with d3d it will be able to set GL pixel format (which will result in wined3d creating a backup context).
I think that'd work, yeah.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2299#note_26227
I looked a bit into winemac driver and some GL on Mac docs and I suppose that such an issue should not be happening on Mac. If I read that right pixel format is only bound to GL context and the pixel format set by Wine only influences the contexts created with the window. I don't have any Mac setup however to check that for sure. If anyone could check if that referenced games (Richman: Classic in opengl mode or Secondhand Lands or SPORE from Bug 51848 work now on Mac without issues that would be a good confirmation that set pixel format works fine there and doesn't impose issues like on winex11.
Thinking of doing this x11 specific, I think that maybe we don't even need a special boolean flag if your MR !2217 gets in? Once we have a separate tracking of internal pixel format in WGL_WINE_pixel_format_passthrough we could just always fail setting internal pixel format once external is set. The extension itself will still work as if an app wants to use GL together with d3d it will be able to set GL pixel format (which will result in wined3d creating a backup context).
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2299#note_26224
On Wed Mar 1 12:24:02 2023 +0000, Alexandros Frantzis wrote:
> > The last patch looks worrying in terms of forward-compatibility.
> Looking at your wayland branch, you use a few unstable files. What
> happens if/when they get promoted to stable? Will those files be moved
> in wayland-protocols causing your branch to fail to build?
> TL;DR: Not a problem.
> When a protocol is moved to stable, a new copy is placed in that
> directory (details are different depending on whether this copy is done
> from 'staging' or the legacy 'unstable'), while the old xml file(s)
> remain in place for backward compatibility. If the new copy requires a
> protocol name change (e.g., from unstable->stable, but not
> staging->stable) compositors tend to have a long deprecation period
> during which both old and new names are supported. As an example, it
> took compositors several years to drop support for unstable/xdg-shell
> after the introduction of stable/xdg-shell.
> FWIW, the Wayland community is *very* conservative concerning promotions
> to stable, so a lot of functionality is still in unstable/staging.
> Compare: 3 stable protocols vs 27 staging/unstable, some of them having
> been there for many years.
> More information about these topics can be found at https://gitlab.freedesktop.org/wayland/wayland-protocols/
> > Also, it would be better to have commit adding build system support
> for protocol files together with at least a simple use of it in the same MR.
> Ack. Moved to the next MR.
Thanks for explanation, staging backward compatibility guarantees should do the trick.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2275#note_26223
Signed-off-by: Bernhard Kölbl <besentv(a)gmail.com>
--
v22: 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.
windows.media.speech: Add Vosk checks to autoconf.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2091
Signed-off-by: Bernhard Kölbl <besentv(a)gmail.com>
--
v20: 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.
TEMP: Reconf.
windows.media.speech: Add Vosk checks to autoconf.
makedep: Better differentiate between compiling and linking commands.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2091
Signed-off-by: Bernhard Kölbl <besentv(a)gmail.com>
--
v19: 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.
windows.media.speech: Add Vosk checks to autoconf.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2091
Jacek Caban (@jacek) commented about dlls/winewayland.drv/wayland.c:
> +
> +/**********************************************************************
> + * wayland_init
> + *
> + * Initialise a wayland instance.
> + */
> +BOOL wayland_init(struct wayland *wayland)
> +{
> + struct wl_display *wl_display_wrapper;
> +
> + TRACE("wayland=%p wl_display=%p\n", wayland, process_wl_display);
> +
> + wl_list_init(&wayland->thread_link);
> +
> + wayland->process_id = GetCurrentProcessId();
> + wayland->thread_id = GetCurrentThreadId();
Those are redundant for this commit. It's trivial to add when needed and introducing it later would make things much easier to review, because reviewer would need to jump between MR and your branch much less. I would suggest to leave thread_link, thread_id, process_id and initialized out of this MR. (Also, if process_id is always equal to `GetCurrentProcessId()`, I don't think there is much point in storing it).
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2275#note_26191
Jacek Caban (@jacek) commented about dlls/winewayland.drv/wayland.c:
> +{
> + struct wl_display *wl_display_wrapper;
> +
> + TRACE("wayland=%p wl_display=%p\n", wayland, process_wl_display);
> +
> + wl_list_init(&wayland->thread_link);
> +
> + wayland->process_id = GetCurrentProcessId();
> + wayland->thread_id = GetCurrentThreadId();
> + wayland->wl_display = process_wl_display;
> +
> + if (!wayland->wl_display)
> + {
> + ERR("Failed to connect to wayland compositor\n");
> + return FALSE;
> + }
I think that this error condition can never happen, we fail to load the driver if process_wl_display is NULL. Also, if wl_display is always equal to process_wl_display, why do we need to store it in wayland struct?
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2275#note_26192
Jacek Caban (@jacek) commented about configure.ac:
> [enable_winex11_drv])
> fi
>
> +WINE_NOTICE_WITH(wayland, [false],
> + [Wayland ${notice_platform}development files not found, the Wayland driver won't be supported.],
> + [enable_winewayland_drv])
> +
This chunk makes little sense on its own, it could just be added in a commit that introduces wayland-client checks. This commit doesn't really need to modify configure more than what tools/make_makefiles does.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2275#note_26190
The goal is to eventually move all interfaces from each driver's `mmdevdrv.c` into `mmdevapi`.
--
v5: wine{alsa,coreaudio,oss,pulse}: Move test_connect handling into mmdevapi.
mmdevapi: Use UTF-16 for client name in "test_connect_params" and "create_stream_params" structs.
winepulse: Move process_attach and process_detach handling into mmdevapi.
mmdevapi: Query MemoryWineUnixFuncs virtual memory and store the resulting handle.
wine{alsa,coreaudio,oss,pulse}: Return STATUS_SUCCESS for unused unixlib functions.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1543
--
v2: riched20: Implement ITextDocument::Freeze and ITextDocument::Unfreeze.
riched20: Don't assume that TxDraw preserves the device context's brush selection.
riched20/tests: Test for ITextDocument::Freeze and ITextDocument::Unfreeze.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2331
> Do you see any other way out of this? I mean specifically the case when an app sets GL pixel format itself on a window. I was thinking about whether it is possible to make setpixelformat quicker in winex11 instead and I don't see how. If keeping direct presentation it will require some X window reconfigure which is not going to be anywhere quick. Otherwise, it can be technically made to work like for GL child window redering (keeping composite redirected drawables for different pixel formats) but that requires essentially the same blitting on each present as done with wined3d backup context.
>
> The other different (but a bit complicated) way would be to:
>
> * count statistics of GL pixel format switches;
> * introduce switching back from backup context and switch between resetting pixel format or switching to backup context or back based on that.
Assuming that recreating the GLX drawable is always worse than a GDI blit, I think this patch is the right direction. I just don't want to regress performance in backends other than x11.
So maybe the right approach here is to add some boolean flag saying "return an error if changing the pixel format would be expensive". Or maybe things are already broken on winemac and the right approach is just to punt.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2299#note_26147
`mincore()` is not a reliable way to determine whether a region is empty. This could result in an already-in-use region being mapped with `MAP_FIXED`, and Wine conflicting with its original owner (i.e. dyld).
With the `mincore()` check removed, a special case was added to allow zero-fill sections to be mapped.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2329
This change only implements case-sensitivity of technique keywords and related checks when corresponding profile is used. My immediate plan is to add some synthetic type for technique variables, for example as {object, void}, then add named techniques as variables. This is useful because these names are participating in global scope, and should not collide with normal variables. After that "pass_list" will be split, at least in two variants because of how much d3d9 syntax differs. Some trivial changes will be need later to have some top level fx compilation helper that considers only fx objects and calls ps/vs/gs compiler to create inner shader blobs on same original source.
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/111
On Windows RegEnumValueA() is buggy such that when the value name
buffer is too small, it may way overestimate the required data buffer
size, sometimes returning more than the sufficiently large buffer it was
provided, in which case that buffer is untouched and thus not
NUL-terminated.
So modify the tests to accept this broken result and avoid checking
out-of-bounds data.
Wine-Bug: https://bugs.winehq.org//show_bug.cgi?id=53172
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2324
Return directly in case of success so exiting the loop only happens in
case of error.
Better identify which statements prepare the next attempt / set things
up in case the table allocation failed.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2312
These were docmented in [1] (with the user-facing name of the opcode
adjusted later in [2]).
Since MSVC 2022, the precompiled runtimes (both runtimes such as
vcruntime140*.dll and the statically linked code from e.g. libcmt.lib)
are built with pointer authentication enabled.
To correctly handle unwinding through such functions, even on HW that
don't support the pointer authentication mechanism itself, wine needs
to at least be aware of it (for handling the cases with packed unwind
info with CR==2 simiarly to CR==3).
This patch has been tested on Linux on HW supporting pointer
authentication too, with binaries built with MSVC.
[1] https://github.com/MicrosoftDocs/cpp-docs/commit/f510c83085d9764b3c7b522219…
[2] https://github.com/MicrosoftDocs/cpp-docs/commit/cac237d3f370a06b71f6c314a6…
--
v2: ntdll: Handle aarch64 pointer authentication in unwind info
https://gitlab.winehq.org/wine/wine/-/merge_requests/2320
These were docmented in [1] (with the user-facing name of the opcode
adjusted later in [2]).
Since MSVC 2022, the precompiled runtimes (both runtimes such as
vcruntime140*.dll and the statically linked code from e.g. libcmt.lib)
are built with pointer authentication enabled.
To correctly handle unwinding through such functions, even on HW that
don't support the pointer authentication mechanism itself, wine needs
to at least be aware of it (for handling the cases with packed unwind
info with CR==2 simiarly to CR==3).
This patch has been tested on Linux on HW supporting pointer
authentication too, with binaries built with MSVC.
[1] https://github.com/MicrosoftDocs/cpp-docs/commit/f510c83085d9764b3c7b522219…
[2] https://github.com/MicrosoftDocs/cpp-docs/commit/cac237d3f370a06b71f6c314a6…
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2320
Allowing the job to fail to avoid failing the pipeline. Some new tests
are failing with it, and some are succeeding todo_wine.
--
v4: gitlab: Run user32 32-bit tests with nulldrv driver.
user32/tests: Update todos specific to the X11 display driver.
user32/tests: Check graphics driver and add todos for nulldrv.
win32u: Check GUID_NULL display device if desktop atom is missing.
explorer: Use GUID_NULL display device GUID for nulldrv.
win32u: Return the current display mode depth with nulldrv.
win32u: Map VK_MENU / KBDALT in kbdus_tables pCharModifiers.
user32/tests: Test VK_MENU effect on ToUnicode.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1259
The goal is to eventually move all interfaces from each driver's `mmdevdrv.c` into `mmdevapi`.
--
v4: wine{alsa,coreaudio,oss,pulse}: Move test_connect handling into mmdevapi.
mmdevapi: Use UTF-16 for client name in "test_connect_params" and "create_stream_params" structs.
winepulse: Move process_attach and process_detach handling into mmdevapi.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1543
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
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2314
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`.
--
v2: 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().
tests: Test packoffset().
tests: Test cbuffer element offsets.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/106
nVidia's GLSL compiler spits out a warning if a value is potentially
used without being initialized. This affects many of wined3d's GLSL
shaders, as either some element of the (e.g.) vs_out array are not
initialized, or individual vector components remain unwritten to.
As a quick way of working around this, initialize all vs_out, gs_out,
and temporary Rn registers to vec4(0,0,0,0). This gets rid of all of the
warnings in the cases I tried.
(A more complete solution would probably track if we're initialising
these, and only add what is required. Or would just disable the warning
somehow.)
Some example warnings (from a shader in the 'Pharaoh: A New Era' demo):
```
0264:fixme:d3d_shader:print_glsl_info_log Info log received from GLSL shader #3:
0264:fixme:d3d_shader:print_glsl_info_log Vertex info
0264:fixme:d3d_shader:print_glsl_info_log -----------
0264:fixme:d3d_shader:print_glsl_info_log 0(28) : warning C7050: "vs_out[2].zw" might be used before being initialized
0264:fixme:d3d_shader:print_glsl_info_log 0(28) : warning C7050: "vs_out[5].w" might be used before being initialized
0264:fixme:d3d_shader:print_glsl_info_log 0(28) : warning C7050: "vs_out[7]" might be used before being initialized
0264:fixme:d3d_shader:print_glsl_info_log 0(28) : warning C7050: "vs_out[8]" might be used before being initialized
0264:fixme:d3d_shader:print_glsl_info_log 0(28) : warning C7050: "vs_out[9]" might be used before being initialized
0264:fixme:d3d_shader:print_glsl_info_log 0(28) : warning C7050: "vs_out[10]" might be used before being initialized
0264:fixme:d3d_shader:print_glsl_info_log 0(28) : warning C7050: "vs_out[11]" might be used before being initialized
0264:fixme:d3d_shader:print_glsl_info_log 0(28) : warning C7050: "vs_out[12]" might be used before being initialized
0264:fixme:d3d_shader:print_glsl_info_log 0(28) : warning C7050: "vs_out[13]" might be used before being initialized
0264:fixme:d3d_shader:print_glsl_info_log 0(28) : warning C7050: "vs_out[14]" might be used before being initialized
0264:fixme:d3d_shader:print_glsl_info_log 0(28) : warning C7050: "vs_out[15]" might be used before being initialized
```
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2260
> Otherwise, it can be technically made to work like for GL child window redering (keeping composite redirected drawables for different pixel formats) but that requires essentially the same blitting on each present as done with wined3d backup context.
It wouldn't need to go through CPU memory though.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2299#note_26016
On Thu Mar 2 13:50:13 2023 +0000, **** wrote:
> Marvin replied on the mailing list:
> ```
> Hi,
> It looks like your patch introduced the new failures shown below.
> Please investigate and fix them before resubmitting your patch.
> If they are not new, fixing them anyway would help a lot. Otherwise
> please ask for the known failures list to be updated.
> The tests also ran into some preexisting test failures. If you know how
> to fix them that would be helpful. See the TestBot job for the details:
> The full results can be found at:
> https://testbot.winehq.org/JobDetails.pl?Key=130177
> Your paranoid android.
> === debian11 (32 bit report) ===
> dinput:
> device8.c:496: Test failed: WaitForSingleObject returned 0x102
> device8.c:500: Test failed: WaitForSingleObject returned 0x102
> device8.c:520: Test failed: got data size 0, expected 1
> device8.c:521: Test failed: got action uAppData 0046BAAF, expected FFFFFFFF
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:551: Test failed: GetDeviceData returned 0
> device8.c:555: Test failed: got data_size 0, expected 1
> device8.c:496: Test failed: WaitForSingleObject returned 0x102
> device8.c:500: Test failed: WaitForSingleObject returned 0x102
> device8.c:520: Test failed: got data size 0, expected 1
> device8.c:521: Test failed: got action uAppData 0046BAAF, expected 00000002
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:551: Test failed: GetDeviceData returned 0
> device8.c:555: Test failed: got data_size 0, expected 1
> device8.c:496: Test failed: WaitForSingleObject returned 0x102
> device8.c:500: Test failed: WaitForSingleObject returned 0x102
> device8.c:520: Test failed: got data size 0, expected 1
> device8.c:521: Test failed: got action uAppData 0046BAAF, expected 0000000A
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:551: Test failed: GetDeviceData returned 0
> device8.c:555: Test failed: got data_size 0, expected 1
> device8.c:496: Test failed: WaitForSingleObject returned 0x102
> device8.c:500: Test failed: WaitForSingleObject returned 0x102
> device8.c:520: Test failed: got data size 0, expected 1
> device8.c:521: Test failed: got action uAppData 0046BAAF, expected FFFFFFFF
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:551: Test failed: GetDeviceData returned 0
> device8.c:555: Test failed: got data_size 0, expected 1
> device8.c:496: Test failed: WaitForSingleObject returned 0x102
> device8.c:500: Test failed: WaitForSingleObject returned 0x102
> device8.c:520: Test failed: got data size 0, expected 1
> device8.c:521: Test failed: got action uAppData 0046BAAF, expected 0000000B
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:551: Test failed: GetDeviceData returned 0
> device8.c:555: Test failed: got data_size 0, expected 1
> device8.c:496: Test failed: WaitForSingleObject returned 0x102
> device8.c:500: Test failed: WaitForSingleObject returned 0x102
> device8.c:520: Test failed: got data size 0, expected 1
> device8.c:521: Test failed: got action uAppData 0046BAAF, expected 00000002
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:531: Test failed: WaitForSingleObject returned 0x102
> device8.c:535: Test failed: WaitForSingleObject returned 0x102
> device8.c:551: Test failed: GetDeviceData returned 0
> device8.c:555: Test failed: got data_size 0, expected 1
> ```
These seem unrelated to the changes in this MR, rebasing on latest master and trying again...
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2275#note_26010
In particular, February dates contain an e-acute in French, the
representation of which depends on the code page being used, which in
SHFormatDateTimeA() is CP_ACP.
Also there are only three months that triggered this bug in French: February, August and December. So also make sure to test this issue year round.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54149
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2313
Introduction
------------
This is the first of (many) parts in the upstreaming of the Wayland driver for Wine. Since the amount of code and commits is large, my approach is to upstream the driver in multiple parts in a serial fashion, with each part being a cohesive (to the degree possible) set of not too many commits. When each part is reviewed and merged, I will move on to proposing the next part. My main goal with this approach is to make reviewing easier and more focused. If you have other ideas about how to improve this process for the reviewers, please let me know.
A lot of pieces need to fall into place before the driver becomes even remotely functional, so, some MRs (especially the initial ones) will be a bit more preparatory in nature. To aid in the understanding of and justification for some of the code introduced in such MRs, all the remaining driver commits are always going to be available at https://gitlab.winehq.org/afrantzis/wine/-/tree/wayland.
Part 1
-------
This MR introduces the Wayland driver PE and unixlib components with some basic code, and prepares the makedep tool to be able to handle Wayland protocol files. Please see the individual commit message for more details.
Some questions I would appreciate some feedback on in the context of this MR:
1. Should the Wayland driver build be enabled by default at this point? (currently it's explicitly opt-in with --with-wayland)
2. How should the Wayland driver build be integrated with CI? (currently piggybacking on gitlab/build-linux by adding --with-wayland)
Note that building the Wayland driver should not affect running/testing on X11/Xwayland etc, since it's placed lower in the driver priority list.
Part 2 preview: We will handle basic Wayland wl_output (i.e., display) events and populate the Wine monitor information.
--
v3: winewayland.drv: Introduce wayland_mutex.
winewayland.drv: Initialize basic per-thread Wayland instance.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2275
The goal is to eventually move all interfaces from each driver's `mmdevdrv.c` into `mmdevapi`.
--
v2: wine{alsa,coreaudio,oss,pulse}: Move test_connect handling into mmdevapi.
winepulse: Move process_attach and process_detach handling into mmdevapi.
mmdevapi: Query MemoryWineUnixFuncs virtual memory and store the resulting handle.
wine{alsa,coreaudio,oss,pulse}: Return STATUS_NOT_IMPLEMENTED for unused unixlib functions.
include: Add missing "winternl.h" include to unixlib.h.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1543
Introduction
------------
This is the first of (many) parts in the upstreaming of the Wayland driver for Wine. Since the amount of code and commits is large, my approach is to upstream the driver in multiple parts in a serial fashion, with each part being a cohesive (to the degree possible) set of not too many commits. When each part is reviewed and merged, I will move on to proposing the next part. My main goal with this approach is to make reviewing easier and more focused. If you have other ideas about how to improve this process for the reviewers, please let me know.
A lot of pieces need to fall into place before the driver becomes even remotely functional, so, some MRs (especially the initial ones) will be a bit more preparatory in nature. To aid in the understanding of and justification for some of the code introduced in such MRs, all the remaining driver commits are always going to be available at https://gitlab.winehq.org/afrantzis/wine/-/tree/wayland.
Part 1
-------
This MR introduces the Wayland driver PE and unixlib components with some basic code, and prepares the makedep tool to be able to handle Wayland protocol files. Please see the individual commit message for more details.
Some questions I would appreciate some feedback on in the context of this MR:
1. Should the Wayland driver build be enabled by default at this point? (currently it's explicitly opt-in with --with-wayland)
2. How should the Wayland driver build be integrated with CI? (currently piggybacking on gitlab/build-linux by adding --with-wayland)
Note that building the Wayland driver should not affect running/testing on X11/Xwayland etc, since it's placed lower in the driver priority list.
Part 2 preview: We will handle basic Wayland wl_output (i.e., display) events and populate the Wine monitor information.
--
v2: winewayland.drv: Introduce wayland_mutex.
winewayland.drv: Initialize basic per-thread Wayland instance.
winewayland.drv: Add stub for per-thread data.
winewayland.drv: Perform basic per-process Wayland initialization.
winewayland.drv: Add initial unixlib stub.
winewayland.drv: Add initial driver stub.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2275
On Wed Mar 1 08:06:29 2023 +0000, Huw Davies wrote:
> @rbernon, note that you should explicitly approve this as it contains
> commits from another author.
I see, yeah, I tried to add the correct strings to the types, but couldn't find anything on array. The others were pretty straightforward.
Also, the build error was misleading and I think it'd be helpful to add the equivalent of `TRACE` in widl. The existing debug parameters were not helpful.
Thanks for the link, good info.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2304#note_25975
ZusiDisplay sometimes loads the same font file into two different
PrivateFontCollections using two threads, so there is a race condition
when the file is opened without the FILE_SHARE_READ sharing mode. The
second call to GdipPrivateAddFontFile() might fail if the first one
hasn't closed the file handle yet.
--
v2: gdiplus: Use FILE_SHARE_READ in GdipPrivateAddFontFile().
gdiplus/tests: Test for GdipPrivateAddFontFile() sharing violation.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2302
--
v2: ntdll: Add return address information in __wine_debug_context.
ntdll: Add file and line information in __wine_debug_context.
ntdll: Introduce struct __wine_debug_context for extensible debug info.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2274
Do you see any other way out of this? I mean specifically the case when an app sets GL pixel format itself on a window. I was thinking about whether it is possible to make setpixelformat quicker in winex11 instead and I don't see how. If keeping direct presentation it will require some X window reconfigure which is not going to be anywhere quick. Otherwise, it can be technically made to work like for GL child window redering (keeping composite redirected drawables for different pixel formats) but that requires essentially the same blitting on each present as done with wined3d backup context.
The other different (but a bit complicated) way would be to:
- count statistics of GL pixel format switches;
- introduce switching back from backup context and switch between resetting pixel format or switching to backup context or back based on that.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2299#note_25906
> It's probably worth pointing out that this has quite some potential for causing regressions in performance. swapchain_blit_gdi() is not fast, and ideally we'd work on reducing the number of cases where it's needed.
The fundamental idea here is that setting and restoring the pixel format is even worse, since we always need to recreate the GLX drawable when we do that. And as far as I can tell, this patch doesn't force GDI blitting in any other circumstance.
That said, what about Mac? I don't really know what's going on here; set_pixel_format() seems to be cheap, but I can't easily tell if that's because it really is cheap, or because setting the pixel format just doesn't work. Either way this patch is questionable as-is.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2299#note_25904
This patch addresses an issue in Second Life and potentially other
multi-threaded applications which process WM_KEYDOWN in one thread
and then verify that the key is "still down" with GetAsyncKeyState
from another thread. Wine uses a per-thread key cache, resulting
in inconsistent views of key status. Caches are now invalidated
when an input event is injected by the driver or via SendInput.
--
v8: win32u: Invalidate all cached keys after input.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2153
wine-gecko does actually support synchronous XMLHttpRequests, even if they are deprecated, but unfortunately it is very broken compared to IE or all the other major browsers (more details [here](https://bugzilla.mozilla.org/show_bug.cgi?id=697151)). Thankfully, it still provides us with the event message loop, which is enough to fix it on mshtml side and act like IE.
For sync XHRs, send() is supposed to block all script code, except for notifications sent to the sync XHR. This is because when send() blocks, no other piece of code in the script should execute other than the sync XHR handlers. Unfortunately, that's not the case in Gecko's broken implementation, which can execute handlers as if they were APCs while it's "blocked" in send().
Note that it doesn't actually block, though, because we still process the message loop (non-event related tasks such as navigation, paints, and other stuff), and that's normal. Gecko doesn't block everything related to script events, only some things on the document and timers, but that's far from enough and not even enough for our purposes since we use our own timer tasks. And not even message events are blocked, even though we *also* use our own message event dispatchers (but it doesn't block Gecko ones either).
So what we have to do is we need to track all the timers and events dispatched that result in script handlers being executed, while "blocking" inside of a sync XHR send(), and queue them up to defer them to be dispatched later, after send() unblocks. But this is easier said that done. There are many corner cases to consider here, for example:
* Events dispatched *synchronously* from within a sync XHR handler or other piece of code called from it.
* Nested sync XHR send() calls (called during handler of another sync XHR).
* Async XHRs having their events dispatched during a blocking sync XHR send() are complicated. `readyStateChange` for example needs to have the async XHR's readyState at the time it was sent, **not** at the time it was actually dispatched, since we're going to delay it and dispatch it later. It's similar with other XHR states, such as responseText (which can be partial).
* Aborts of async XHRs during such handlers.
These patches hopefully should address all the issues and, on a high level, work like this:
* Track the `readyState` and `responseText` length manually, so we can override / force them to specific values.
* "Snapshot" the async XHR at the time we encounter an event for it, and queue this event with such information. When later dispatching this event (after being deferred), we temporarily set the state of the async XHR to the snapshot.
* To deal with nested event dispatches, keep track of a "dispatch depth" (everytime we dispatch an event we increase the depth, and when it returns we decrease it).
* For sync XHRs, we note the depth when send() is called, and defer events at that depth, since they're dispatched during the "blocked" message loop and need to be delayed (except for sync XHR events, which is a special case since it must be dispatched synchronously). When it returns, we restore the previous blocking depth.
--
v6: mshtml: Send all readystatechange events for synchronous XHRs in IE9
mshtml: Implement synchronous XMLHttpRequest.
mshtml: Add separate task list for tasks dispatching events.
mshtml: Track readyState in XHRs and report it manually.
mshtml: Register all event handlers when creating the XMLHttpRequest.
mshtml: Pass optional args to XMLHttpRequest.open() correctly.
mshtml: Free the task after the destructor.
mshtml: Use proper types for readystate_locked and readystate_pending.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2098