At least Doom 64 calls ClipCursor() with identical parameters
repeatedly, which seems to cause a considerable overhead. Together with
high polling rate mouse input this causes the game to almost freeze
while the mouse is being moved. So if the clipping did not change we can
bail out early because it will not cause any observable difference
anyway.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46976
Signed-off-by: Jan Klötzke <jan(a)kloetzke.net>
--
v2: winex11.drv: optimize repeated ClipCursor calls
winex11.drv: create win32 clipping window only once
https://gitlab.winehq.org/wine/wine/-/merge_requests/825
This simplifies future tests that check for object name of devices.
--
v2: server: Fix object name resolution of \Device\Null.
server: Make explicit the ownership of the unix_name buffer.
https://gitlab.winehq.org/wine/wine/-/merge_requests/475
--
v2: d2d1: Implement nodes connection for ID2D1TransformGraph.
d2d1: Implement nodes adding and removal for ID2D1TransformGraph.
d2d1/tests: Add more tests for ID2D1TransformGraph.
https://gitlab.winehq.org/wine/wine/-/merge_requests/698
Every other use of `EDIT_EM_SetSel` updates caret position by calling `EDIT_EM_ScrollCaret` or `EDIT_SetCaretPos`.
Fixes caret blinking in the middle when selecting all text.
![changes](/uploads/019bce6c12e0378d391e1253ecbaf9c6/changes.png)
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3226
The reference count of host is supposed to go up by one in netconn_create.
The missing ref increment causes error handling paths
where netconn_close or release_host is called
to prematurely decrement the ref count of host to zero.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1121
I haven't seen any software that uses this, but some older software out there might use it, so it's good idea to export it.
--
v5: ntoskrnl.exe: add KeNumberProcessors export.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1139
Some games with support for the haptic feedback and speaker features of the Sony DualSense controller select the controller's audio output by filtering on the ContainerId IMMDevice property to find one that matches the controller's HID's. This MR allows this information to be accessible from the IMMDevice's property store when the audio driver provides it (none for now, but I intend to add that feature to `winepulse.drv` and maybe `winealsa.drv`)
This is made specific to containerId rather than supporting VT_CLSID on every property because Wine currently stores VT_BLOBs directly in the registry value, which does not allow us to safely disambiguate between VT_CLSID and VT_BLOB values when reading from registry.
--
v7: mmdevapi: Invalidate ContainerID of unavailable audio devices.
https://gitlab.winehq.org/wine/wine/-/merge_requests/359
Overwatch 2 verifies that every kernel callback that is run, lives in user32. Introduce a callback in user32 that just forwards to the other modules' callbacks.
--
v19: include: Add a comment explaining why all kernel callbacks must be in user32.
user32: Remove NtUserDriverCallback* kernel callbacks.
winex11.drv: Route kernel callbacks through user32.
winex11.drv: Pass a struct to x11drv_ime_set_result.
winex11.drv: Pass a struct to x11drv_dnd_post_drop.
winemac.drv: Route kernel callbacks through user32.
wineandroid.drv: Route kernel callbacks through user32.
opengl32: Route kernel callbacks through user32.
winevulkan: Route kernel callbacks through user32.
user32: Add NtUserDispatchCallback kernel callback.
user.exe16: Move kernel callbacks to wow_callbacks.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1180
The problem is that registry save is a very heavy operation (scheduled each 30sec in wineserver) during which server doesn't process any requests and the whole prefix is stalled for the duration of the operation.
For some reference, the process takes from 50-100ms here up to 1-1.5sec with default initial registry (after some registry modifications which trigger actual registry flush), depending on the filesystem type and state (as huge time may be spent in file close / rename). With the same registry after this patchset the server part (flush_key returning the whole registry data) is taking ~4-5mcs, measured from the client side so that already includes data transfer.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3124
General idea of this test is to show that a lot of factors influence the fog when transformed and untransformed vertex format was used:
- Directly changing z and w (which is not equal in the corners).
- Changing projection matrix that change z and w.
- Using different programmable/ff vs/ps shader.
- Using different depth bias.
- Chaging depth in pixel shader (oDepth) may or may not affect to colors depending on the vendor implementation.
- And various combinations of above.
This gives `succ` in all cases on this configs:
- Windows 10 with Radeon HD 8400 or Ivy Bridge GT1 (Intel HD Graphics).
- Windows 7 with Radeon HD 6450.
- Windows XP with GeForce Go 7300.
--
v2: d3d9/tests: test table fog z vs rhw with shaders, depth bias, oDepth..
https://gitlab.winehq.org/wine/wine/-/merge_requests/2657
This seems to be relied on by some versions of [this Unreal Engine input plugin](https://www.unrealengine.com/marketplace/en-US/product/wm-input-man…
Note: I'm not sure how to deal with `HID_USAGE_GENERIC_KEYPAD`, which (I think) would fall under `RIM_TYPEKEYBOARD`. Do we need to store extra info to differentiate these from `HID_USAGE_GENERIC_KEYBOARD` or is there something in the device info struct that can differentiate them?
--
v4: user32: Post WM_INPUT_DEVICE_CHANGE when registering for notifications
user32: Add tests for WM_INPUT_DEVICE_CHANGE messages
https://gitlab.winehq.org/wine/wine/-/merge_requests/2120
This patch set now has 24 test failures in wmvcore/tests/wmvcore.c: test_async_reader_streaming(). So it won't be merged now. But I'd like to have it reviewed to see if I was doing things in the right direction.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3193
Convert all consecutive calls to d7_DrawPrimitive(TRIANGLE_FAN) into
a single call to d7_DrawPrimitive(TRIANGLE_LIST) with all the vertices.
Note, it *increase* the number of vertices, but bandwith is much less costly
than multiple calls.
Note, only a very precise subset of the calls get buffered in order to
ensure that the disruption is minimal.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=33814
--
v21: ddraw: Increasing the vertex batch size on demand
ddraw: add d3d_perf statistics on buffering
wined3d: Add a TRACE in wined3d_streaming_buffer_unmap()
ddraw: Add a local buffer in d3d_device7_DrawPrimitive()
https://gitlab.winehq.org/wine/wine/-/merge_requests/2105
test_reuseaddr and test_exclusiveaddruse bind to the wildcard address
(0.0.0.0 or [::]). This may trigger a firewall alert on Windows 7, and
the alert UI window may interfere with user32:msg tests.
Fix this by trying to disable the firewall, and skipping the wildcard
address tests if it fails.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53891
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54202
--
v2: ws2_32/tests: Try to disable firewall before testing with any addr.
ws2_32/tests: Factor out test_exclusiveaddruse from test_reuseaddr.
ws2_32/tests: Do ANY address tests in a separate loop in test_reuseaddr.
webservices/tests: Move firewall code to a common header.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2000
I think the behaviour of SetWindowPos() in this case is partially explained by the fact that topmost state is not strictly applicable to child windows and so Windows denies such requests. Child window can still end up with WS_EX_TOPMOST style if it was set at window creation (doesn't work this way in Wine now) or, e. g., like in the test added in the patch.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=20190
Also fixes game load dialog in Indiana Jones and the Infernal Machine.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/667
This is some very old patch series, initially aimed at speeding up Gears of Wars online connection, but it wasn't clear if it was actually necessary.
We now confirmed that it is also required for Gears 5 online mode, and without it, connection fails with an error message. I updated the last change to specifically handle TLS rehandshake vs empty input, to avoid breaking some tests. I think having empty input when renegotiating is a valid scenario, although I'm not sure how to write tests for that (it will require some server-side part to request a re-handshake to the client).
In any case, this has nothing to do with client certificate as the returned ERROR_WINHTTP_CLIENT_AUTH_CERT_NEEDED error in the code seems to suggest.
--
v2: secur32: Perform TLS re-handshake after SEC_I_RENEGOTIATE was returned.
winhttp: Handle SEC_I_RENEGOTIATE after DecryptMessage.
winhttp: Introduce new netconn_negotiate helper.
winhttp: Move connect end checks out of the loop.
https://gitlab.winehq.org/wine/wine/-/merge_requests/3199
Based on [a patch](https://www.winehq.org/mailman3/hyperkitty/list/wine-devel@winehq.or… by Jinoh Kang (@iamahuman) from February 2022.
I removed the need for the event object and implemented fast paths for Linux.
On macOS 10.14+ `thread_get_register_pointer_values` is called on every thread of the process.
On Linux 4.14+ `membarrier(MEMBARRIER_CMD_GLOBAL_EXPEDITED, ...)` is used.
On x86 Linux <= 4.13 and on other platforms `madvise(..., MADV_DONTNEED)` is used, which sends IPIs to all cores causing them to do a memory barrier.
--
v11: ntdll: Add thread_get_register_pointer_values-based implementation of NtFlushProcessWriteBuffers.
ntdll: Add sys_membarrier-based implementation of NtFlushProcessWriteBuffers.
ntdll: Add MADV_DONTNEED-based implementation of NtFlushProcessWriteBuffers.
https://gitlab.winehq.org/wine/wine/-/merge_requests/741
Currently GetFileType() ends up returning the file type solely based on Unix fd type if it gets it from server. The problematic case is when our process gets a pipe or socket fd as a stdin or stderr from Unix. The server object which gets created through wine_server_fd_to_handle is a regular file regardless of the underlying Unix fd type. It probably can't be anything else, at least for pipes, as the pipe should have both ends but we have only one in this case.
That causes problems, e. g., with libuv (used, e. g., by Vampire Survivors). It checks stdout handle type and if it is pipe it tries to do SetNamedPipeHandleState() on it and does not tolerate the failure.
It looks more sensible to me to report all the pipes and sockets created through wine_server_fd_to_handle() as regular files as that matches the server objects we have for them. When that is not the case we should get the correct type from server fd type.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1425
As _WINE_HWND_STYLE and _WINE_HWND_EXSTYLE respectively.
Gamescope parses these to make smarter decisions about what window
to primary focus, or to treat as a dropdown/overlay.
This was originally a Proton commit by Remi Bernon, however,
it would definitely be nice to have support for Gamescope focusing
correctly under upstream Wine as well.
Fixes a bunch of games/launchers run with Wine under Gamescope.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2902
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.
--
v3: winewinrt: Factor IAsyncOperation<boolean> implementations.
winewinrt: Factor IAsyncInfo implementations.
winewinrt: Move Vector<HSTRING> from windows.media.speech.
widl: Write C type names for function parameters.
winewinrt: Factor Vector<IInspectable> implementations.
winewinrt: Introduce new static library.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2298
Shader Model 6 introduces a 16-bit float (half) type, and 16-bit and 64-bit integer types. Storing extra info in the type enum simplifies checking if a type is any integer, floating point or numeric type, and the declaration of SPIR-V types. The benefits depend on using enum vkd3d_data_type in the backend instead of vkd3d_shader_component_type.
Patch 2 is difficult to split because types typically flow through to vkd3d_spirv_get_type_id(), so partial changes would require new calls to conversion functions which would be deleted again later.
--
v5: vkd3d-shader/spirv: Use enum vkd3d_data_type instead of vkd3d_shader_component_type.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/263
Signed-off-by: Fabian Maurer <dark.shadow4(a)web.de>
--
v4: libs/jxr: Compile with ansi flag to avoid typedef redefinitions (gcc 4.3)
wmphoto: Define ansi flag for JXRGlue to avoid typedef redefinitions (gcc 4.3)
https://gitlab.winehq.org/wine/wine/-/merge_requests/3061
--
v2: winex11: Create registry keys for known Xkb layouts.
winex11: Keep a list of every known Xkb layout.
winex11: Read the _XKB_RULES_NAMES root window property.
win32u: Init vsc2vk in NtUserGetKeyNameText only if necessary.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2408
Currently only used to keep rawinput devices updated without iterating the entire list on every change.
This thread will then let us solve several problems:
* Solve issues with input not being polled if/when applications aren't checking their messages. This removes the need for polling messages in DInput, which is known to confuse and break DOSBOX.
* Solve some issues with ll-hook deadlocks between hooking threads and the thread that is currently polling for inputs.
* Useful to process internal messages and implement some user driver mechanisms. It can for instance already process WM_WINE_CLIPCURSOR messages, instead of relying on the foreground thread.
* Similarly, for cursor icon changes, wineserver can notify it on cursor window changes and request the cursor icon to be updated from the user driver, instead of having to check the window the cursor is located in to change its icon on every mouse move.
* Ultimately make it possible to drop the __wine_send_input PE export, the thread can read HID reports from devices that a process has registered for, and send WM_INPUT messages accordingly. This has some drawbacks though, as reading NT devices currently involves much more wineserver roundtrips than `__wine_send_input`.
There's evidence that Windows uses a similar thread to process hardware events (as described in https://devblogs.microsoft.com/oldnewthing/20140213-00/?p=1773), although it's probably a system-wide kernel thread. I considered reading X11 input from a per-prefix dedicated thread (for instance in explorer.exe) or dedicated process, but having one thread per-process has several advantages.
The rawinput device registration state is done per-process and according to https://gitlab.winehq.org/wine/wine/-/merge_requests/2120 it also needs to post notifications that are process specific.
It also keeps the guarantee that each process will read the inputs from the window it has created, and not from some other windows, although the message dispatch may decide to send the message to another process later, it avoids having to listen to input on other processes windows.
It can then be seen as an intermediate step towards having a per-prefix thread, if that's something we end up needing. Moving from a per-process thread to a per-prefix thread should be easier.
--
v2: win32u: Keep rawinput device list updated using WM_DEVICECHANGE.
win32u: Register for device notifications in the rawinput thread.
win32u: Introduce a dedicated thread for rawinput processing.
ntdll/tests: Use combase instead of comctl32 as a test module.
https://gitlab.winehq.org/wine/wine/-/merge_requests/3024
Validate user data before passing it to PolyDraw.
The program in the bug requests to draw figures outrageously outside the DC's region after presumably, some uninitialized values happen as a result of a missing font. Native gdiplus seems to handle this gracefully so we probably also should.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=41617
Signed-off-by: David Kahurani <k.kahurani(a)gmail.com>
--
v5: gdiplus: Clip polygons before drawing them
https://gitlab.winehq.org/wine/wine/-/merge_requests/3288
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
--
v3: winex11: don't let captionless popups be managed
winex11: pass ICCCM withdrawn state as minimized
winex11: restack a window's owned popups above it
https://gitlab.winehq.org/wine/wine/-/merge_requests/2343
The offending font is NotoColorEmoji.ttf which is present in, e. g., google-noto-emoji-color-fonts or noto-fonts-emoji packages available in various distribution. Attempting to load this font on Windows 10 (with AddFontResourceA() or open it with default font viewer) fails while currently succeeds on Windows. fontforge also refuses to open this font. That is because the font is bitmap only but missing bitmap table.
Some apps (Glyph launcher is an example) try to GetOutlineTextMetrics() on this font and do not expect that to have an error return (as we currenly do), which leads to crash on unhandled division by zero exception.
I am attaching a bitmap-only ttf test font (with only one bitmap) which I created with fontforge to make sure that such font can still be loaded in Wine. This font also loads on Windows (both with AddFontResourceA() and with default font viewer).
There are other font types which can be legitimately missing EBDT table, but FT_Load_Sfnt_Table() returns a different error for those and my patch doesn't reject those fonts.
[test.ttf](/uploads/b41472180b80c2c53f9dcc06055990f0/test.ttf)
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/411
Overwatch 2 doesn't like the win32u `-syscall` conversion that happened a while back, because it hooks KiUserCallbackDispatcher. This MR fixes it up to match what Overwatch 2 expects.
--
v3: ntdll: Pass KiUserCallbackDispatcher parameters on stack.
ntdll: Add 5-byte nop to start of KiUserCallbackDispatcher.
ntdll: Align stack pointer when calling KiUserCallbackDispatcher.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1152
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52128
Signed-off-by: Robert Wilhelm <robert.wilhelm(a)gmx.net>
--
v12: scrrun: Return path not found error if no folders were moved in MoveFolder().
scrrun: return path not found error if source ends with path separator in MoveFolder().
scrrun: Move directories only in MoveFolder().
scrrun: Support wildcards in MoveFolder().
scrrun: Move source dir into destination dir if destination ends with separator in MoveFolder().
scrrun: Check that source is directory in MoveFolder().
scrrun: Check for non-existant source in MoveFolder().
scrrun: Test MoveFolder with already existing destination.
scrrun: Check for null and empty arguments in MoveFolder.
scrrun: Implement MoveFolder().
https://gitlab.winehq.org/wine/wine/-/merge_requests/391
When using native xinput in WRC9, vccorlib is needed to make sure xinput doesn't crash.
--
v2: wincorlib: Add stub for platform_details_uninit_data.
wincorlib: Add stub for platform_details_init_data.
vccorlib140: Add stub dll.
wincorlib: Add stub dll.
https://gitlab.winehq.org/wine/wine/-/merge_requests/3334
Previously long URI/URLs (> 1024 characters) would cause a stack corruption and crash Wine. After this MR, Wine will no longer crash but the URL is not opened either primarily due to `SHELL_Argify` limitations.
--
v3: shell32: Increase timeout for long URLs
https://gitlab.winehq.org/wine/wine/-/merge_requests/2383
Using a dedicated exit jmpbuf and removing the need for assembly
routines.
When Wine handles an exception in unix code, we return to user mode by
jumping to the last syscall frame. This can leave some pthread cancel
cleanups registered, in the pthread internal linked list, and at the
same time later overwrite the stack frame they were registered for.
In the same way, jumping to the exit frame on thread exit or abort, can
also leave some cleanup handlers registered for invalid stack frames.
Depending on the implementation, calling pthread_exit will cause all the
registered pthread cleanup handlers to be called, possibly jumping back
to now overwritten stack frames and causing segmentation faults.
Exiting a pthread normally, by returning from its procedure, or calling
exit(0) for the main thread doesn't run pthread_exit and doesn't call
cleanup handlers, avoiding that situation.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52213
### Additional note:
For robustness, we should probably try to execute these cleanup handlers
when unwinding the stack frames, as we would otherwise leave pthread
objects in a potential problematic state (like a mutex locked, etc).
It is however hard to do so when the handlers are registered from some C
code: pthread C implementation is done by calling some internal pthread
functions to register the handlers, and they aren't registered as
standard unwind handlers.
Only pthread_cancel and pthread_exit can unwind and call / unregister
the C handlers, but interrupting that procedure, for instance calling
setjmp / longjmp from withing our own handler isn't supported.
From C++ code, pthread cleanup handlers are registered through C++ class
constructors / destructors, and it would then be possible to partially
unwind and call them at the same time.
--
v10: ntdll: Remove now unnecessary arch-specific exit frame.
ntdll: Avoid calling pthread_exit from abort_thread.
ntdll: Avoid calling abort_thread from the signal stack.
ntdll: Use is_inside_syscall more consistently.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1088
Windows gives this content special protection from being painted over, by some means that I have not investigated yet.
Emulate this protection for the trivial case of an InvalidateRect(...); call on the parent window.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3416
--
v3: d3d10/effect: Add 'ceil' instruction for expressions.
d3d10/effect: Add 'dot' instruction support for expressions.
d3d10/effect: Add trigonometric instructions support for expressions.
d3d10/effect: Add support for shift instructions.
d3d10/effect: Add 'or' instruction support for expressions.
d3d10/effect: Add more integer instructions for expressions.
d3d10/effect: Add signed integer compare instructions for expressions.
d3d10/effect: Implement instructions used for signed integer division.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1684
This avoids stalling the pipeline when upstream nodes have not given enough samples for processing. If there are multiple upstream nodes, request samples in a round-robin fashion.
This fixes an issue where the intro audio of the game Airborne Kingdom stops playing after a few seconds.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2684
Adds the tray icons implementation based on org.kde.StatusNotifierItem interface usage. Does allow restarting StatusNotifierWatcher object, but will fallback to XEMBED or internal tray, if wine gets initialized when there is no StatusNotifierWatcher object registered.
--
v24: winesni.drv: add dbus watch instead of using plain unix fds and flush
winesni.drv: replaced the dbus connection logic with a single connection per each SNI object
winesni.drv: wrap functions with pthread mutex locking
winesni.drv: implement basic balloon notification support
explorer: add winesni.drv tray implementation support
winesni.drv: add KDE StatusNotifierItem implementation for tray
https://gitlab.winehq.org/wine/wine/-/merge_requests/2808
In certain circumstances unmarshalling an object stream from the RunningObjectTable can cause the unmarshalling routines to interrogate the same
table (maybe to resolve a dependant object?) in a different thread causing a deadlock while getting the critical section lock. Leaving the Critical Section before unmarshalling the object stream solve this problem.
Visual Studio 2019 deadlock on start without this.
I'm not sure how to test this properly.
Signed-off-by: Lorenzo Ferrillo <lorenzofersteam(a)live.it>
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3372
It can be unnecessary at best and unsupported at worst (e.g. no ARB_texture_multisample).
--
v3: wined3d: Don't skip ARB fragment program selection when fog state is dirty.
wined3d: Don't force going through a texture when downloading from renderbuffers.
wined3d: Handle depth textures in texture2d_read_from_framebuffer().
wined3d: Rename wined3d_context_gl_apply_fbo_state_blit() function.
wined3d: Don't setup FBO and draw buffers in wined3d_context_gl_apply_blit_state().
wined3d: Don't call wined3d_texture_load() from wined3d_context_gl_apply_blit_state().
wined3d: Don't bind the FBO to GL_READ_FRAMEBUFFER in wined3d_context_gl_apply_blit_state().
wined3d: Prepare/load the destination resource location in arbfp_blitter_blit().
wined3d: Prepare/load the destination resource location in ffp_blitter_blit().
wined3d: Don't call wined3d_context_gl_apply_blit_state() from texture2d_read_from_framebuffer().
https://gitlab.winehq.org/wine/wine/-/merge_requests/3211
Some games with support for the haptic feedback and speaker features of the Sony DualSense controller select the controller's audio output by filtering on the ContainerId IMMDevice property to find one that matches the controller's HID's.
While MRs !359 and !360 implement getting the ContainerID of the IMMDevice, this MR implements getting the ContainerID from the HID device.
As for !360, I marked this MR as a draft because I understand that the way the ���GUID��� is generated is far from ideal. Furthermore, there is code duplication with !360 in the way the container's sysfspath is found and how a GUID is generated from it, so moving that part elsewhere would make sense. But as for !360, I think I will need help with those tasks.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/535
With this pipeline vkd3d automatically gets built on Linux (in an image based on Debian unstable), both in 32 and 64 bit mode. Both builds are tested with radv and llvmpipe. A number of caveats apply, though:
* A number of tests currently fail in llvmpipe, so the llvmpipe jobs are marked as allowed to fail. Ideally we'll eventually fix our bugs and mark the llvmpipe ones in the tests, so that the CI tests completely pass and possible problems in the Vulkan driver are recorded at a better granularity (this is the reason why GitLab says that the pipeline is passed with warnings: the warnings are that there are jobs that failed, even if they were allowed to fail).
* ~~The runners provided by the GitLab instance don't have a GPU available, so I configured my own computer (equipped with an AMD Radeon RX 5700 RX) to provide a runner with access to the GPU. This setup is not currently satisfying: for me, because I use that computer for other things and I don't like having random code submitted to it (it is theoretically sandboxed, but sandboxes are not always bullet-proof, especially if they have access to a GPU); for the users, because my computer might be unavailable at any time. I'll work on a better solution. For the time being I intend the runner to only accept jobs from the master branch; once a better solution is implemented I'd like to run the pipeline for MRs too.~~ **Fixed**, now there is a shared worker with an AMD GPU available.
* While the `Dockerfile` and related assets do not necessarily need to be available in this repository, given that the CI accesses the binary image from the Docker hub anyway, I think it's still valuable to have them, so others can improve them (and for sure improvement opportunities are nowhere near missing). However, other ways to make them available can be found, if for some reason it is not liked to have them in this repository (they are not pretty!).
* ~~One of the reason they are not pretty is that I have a custom hack to compile `widl` from the Wine sources without compiling (or installing from the distribution) the whole of Wine, in the interest of keeping the Docker image small (well, small-ish: Vulkan drivers, compilers and X libraries are not small anyway).~~ **A better solution was implemented**
* ~~Again on the subject of the Docker image, I am currently putting the binary image in my own namespace on the Docker hub. Using the GitLab container registry in the namespace of the Wine project would probably be better, so that I am not a bottleneck in the future.~~ **Done**
* ~~Even if we discount all the points above, this MR cannot be merged yet, because my runner is currently configured for my namespace only. I guess I need the intervention of a GitLab admin to fix that. However, I think there's already material enough for valuable feedback.~~ **Fixed too**
--
v6: ci: Introduce a CI pipeline for GitLab.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/271
There are a few motivations for this:
* Identifiers beginning with vkd3d_shader_ look like external API. Changing the
prefix makes it clear that this is an internal API.
* vkd3d_shader is a very long prefix, which is annoying to type [not least
because "vkd3d" itself is an unwieldy name.] This is also a motivation for
shortening "instruction" to "instr".
* The "vkd3d_instruction" is increasingly growing from a simple parsed
representation of sm4 bytecode, to a proper IR in its own right—e.g. we are
using it for sm1 and sm6, are performing passes over it, and we have plans to
extend its scope further, e.g. to HLSL compilation. Give it a name that
reflects and clearly communicates what it is.
--
v2: vkd3d-shader/ir: Rename vkd3d_shader_instruction to ir_instr.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/264
This reverts commit 41cc117b3f37ab4b9b4ac8a815cd2a496d38fb4b.
This commit broke musl support.
With the changes introduced, the following code evaluates
to the #else branch without checking for SO_DEFAULT_HEADERS
resulting in an error.
server/sock.c +1888
```
\#ifdef HAS_IPX
int ipx_type = protocol - WS_NSPROTO_IPX;
\#ifdef SOL_IPX
setsockopt( sockfd, SOL_IPX, IPX_TYPE, &ipx_type, sizeof(ipx_type) );
\#else
struct ipx val;
/* Should we retrieve val using a getsockopt call and then
* set the modified one? */
val.ipx_pt = ipx_type;
setsockopt( sockfd, 0, SO_DEFAULT_HEADERS, &val, sizeof(val) );
\#endif
\#endif
```
I propose reverting the commit, but we could probably alter
the macro in the code section provided to match the changes
relevant github issue:
https://github.com/void-linux/void-packages/pull/45202
Signed-off-by: Fotios Valasiadis <fvalasiad(a)gmail.com>
--
v2: server: Check for SO_DEFAULT_HEADERS before using it.
https://gitlab.winehq.org/wine/wine/-/merge_requests/3403
This is meant to simplify testing conditions that generally hold true
but may occasionally fail due to interference from external factors
(such as processes that start / stop, network connections being
opened / closed, etc).
The trick is to loop a few times on the set of flaky conditions until
they succeed. During the last attempt all failures are recorded as
usual, while in the previous runs, the tryok() failures area ignored
but cause one more attempt to be made.
The simplest case looks like this:
LOOP_ON_FLAKY_TESTS(3)
{
// ok() failures are never ignored and not retried
ok(..., "check 1", ...);
// tryok() failures are ignored except on the last attempt
tryok(..., "check 2", ...);
}
There is also:
* attempt_retry() which marks the current attempt as failed as if
calling tryok(0), and returns true if another attempt can be made.
* attempt_failed() which returns true if an ok() call failed.
---
This is independent from the 'flaky' mechanism which adds some naming
constraints. The loop macro is still called LOOP_ON_FLAKY_TESTS()
despite being unrelated to the flaky mechanism. The attempt_retry()
and attempt_failed() macro names also don't make it obvious that they
are related to tryok().
I think this mechanism is better than the flaky one because a flaky test
can go bad without anyone noticing, whereas if a tryok() starts failing
systematically it will cause a real failure.
The other side of that coin is that, unlike flaky, the tryok()
mechanism does not entirely eliminate the possibility of getting a
failure, it just reduces it; though by adjusting the maximum number of
attempts one can achieve an arbitrarily low failure rate. For instance
if an ok() call fails 10% of the time and one wants a maximum of 1 in
a million failure rate, use LOOP_ON_FLAKY_TESTS(6). The cost is an
increased run time in the worst case.
This also limits the use of this mechanism to tests that have a
reasonably low failure rate to start with (otherwise one has to loop
too many times). Also note that there are cases where looping
essentially reduce the failure rate to zero. For instance
ieframe:webbrowser fails if IE creates a net session while the test is
counting them. But IE only creates the one net session on start up so
trying even one more time should guarantee that the test will succeed.
Other cases like scheduling delays and the creation of network
connections are more probabilistic in nature. Maybe a comment in test.h
should offer some guideline as to the target failure rate.
Eventually this may replace the flaky mechanism but that depends on
how well it works in practice and how practical it is to loop on flaky
tests. It seems to be going well in the few cases I looked at. But I
think this mechanism has value even if the two end up coexisting
indefinitely.
This MR uses the tryok() in some actual tests for illustration and testing purposes. The final MR will probably split most of those off to separate MRs.
--
v4: mmdevapi/tests: Replace flaky with tryok() in the capture tests.
mmdevapi/tests: Replace flaky with tryok() in the render tests.
quartz/tests: Replace flaky() with tryok() to work around scheduling delays.
DEBUG ieframe/tests: tryok() framework testing ground.
ieframe/tests: Work around a network session race condition.
advapi32/tests: Replace the custom loop with tryok() mechanism.
ntdll/tests: Use tryok() to fix a free disk space race with other processes.
https://gitlab.winehq.org/wine/wine/-/merge_requests/3418
--
v2: tests: Add a test for fmod() with vector arguments.
vkd3d-shader: Use ternary operator in fmod() implementation.
vkd3d-shader/tpf: Use 'movc' to implement ternary operator.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/268
This is similar to https://gitlab.winehq.org/wine/wine/-/merge_requests/2684, https://gitlab.winehq.org/wine/wine/-/merge_requests/3004 or https://gitlab.winehq.org/wine/wine/-/merge_requests/3139 but it validates the session transform node behavior with tests.
The tests are added after the changes because they otherwise don't pass and making them pass would be unnecessarily complicated.
I also have some local tests for MF_TOPONODE_WORKQUEUE_ID attributes and how it is supposed to behave. It basically creates new serialized work queues for every source node and assign them to every node downstream. Any sample request or processing operation is done in the associated queue.
When joining streams, queues are assigned downstream one after another and the last assigned queue is used when requesting samples upstream, but when samples are received and processed downstream it looks like the current queue of the source node is used for every downstream operations.
The request behavior seems to be the same when work queues are used, with round robin input requests, and single ProcessInput call followed by ProcessOutput loop until it fails.
This is yet not optimally efficient, and could be improved, for the following reasons:
1) All session operations are serialized together, even unrelated streams, and ProcessInput / ProcessOutput calls may be costly and stalling the pipeline. I believe that native probably allows parallel processing of unrelated stream requests, this needs to be confirmed.
2) MFT_MESSAGE_COMMAND_DRAIN message use isn't ideal, the message forces the transform to process all queued input synchronously, which can take a long time. I haven't checked exactly what native does but I believe it instead uses MFT_MESSAGE_NOTIFY_END_OF_STREAM messages, which would allow us to notify and drain the GStreamer decoder asynchronously.
3) MFT_MESSAGE_COMMAND_DRAIN also doesn't distinguish between input streams and needs to be sent globally. It's unclear how it should be used when multiple input streams are involved, and when one stream ends its segment then start a new segment while other streams don't have yet reached EOS. MFT_MESSAGE_NOTIFY_END_OF_STREAM messages have a stream ID parameter and would be more appropriate to handle separate input streams independently.
--
v3: mf/tests: Add more media session transform tests with multiple inputs.
mf/tests: Add more media session transform tests with multiple outputs.
mf/tests: Add some media session transform call pattern tests.
mf/session: Increase the stream request count when requests are already queued.
mf/session: Request more samples from upstream when necessary.
mf/session: Push transform input samples one by one to ProcessInput.
mf/session: Use helpers to push and pop samples for transform streams.
mf/session: Flush requests in transform_node_deliver_samples when drained.
mf/session: Use a helper to deliver transform node requested samples.
mf/session: Use local variables to access transform node streams.
https://gitlab.winehq.org/wine/wine/-/merge_requests/3245
--
v2: msxml3: Add tests of ValidateOnParse property.
msxml3: Set ValidateOnParse to VARIANT_TRUE by default.
msxml3: Add ValidateOnParse support for IXMLDOMDocument3_{get,set}Property().
https://gitlab.winehq.org/wine/wine/-/merge_requests/3424
- The initial development was done by Matthew Wong in 2019. I split his v2 patch into testing and implementation commits, making changes needed to get it to compile.
- Some of the feedback given on the v2 patch was addressed by Myah Caron's updated patch versions in 2020, which I split out into a few separate commits.
- I also addressed some of the feedback, expanded the tests, and fixed some results based on those tests.
_(Following is the commit message from Matthew Wong's v2 patch)_
Implement functions used by some games (notably LEGO Island) for
determining which 3D object in a scene was clicked by the mouse cursor.
Fighting Steel also uses this function for mouse over. Previous stubs
would cause LEGO Island to crash upon any click and Fighting Steel
to crash on game start. A patch posted years ago on the bug thread
provided the minimum functionality to prevent crashes, but still
rendered large portions of the game inaccessible without them
implemented correctly.
Picking has been implemented by adding a "pick mode" in
d3d_execute_buffer_execute() which skips any drawing functions
leaving just the vertex processing. Adds click tests for each triangle
when in pick mode for creating an array of D3DPICKRECORDs.
Add a D3DPICKRECORD array and DWORD counter to d3d_device. These are
initiated in d3d_device_init(), allocated/written in
d3d_execute_buffer_execute(), and accessed/read in
d3d_device1_GetPickRecords(). The counter is used to determine the array
size (0 meaning array is not allocated). The array is free'd whenever
the data is no longer necessary by d3d_execute_buffer_execute(),
d3d_device1_GetPickRecords(), and d3d_device_inner_Release().
Add a compliance test to ddraw1 to test whether certain screen points
result in successful picks or not, as well as whether the data returned
from GetPickRecords() is valid and correct.
Stress testing reveals this patch's Pick() implementation may have
slight inaccuracies to the original function; occasionally pixels right
on triangle edges result in successful picks when they don't with the
original function (and vice versa). It may be some sort of floating
point rounding error or other algorithm difference that would be
difficult to determine without seeing the original code. In practice, I
believe this inaccuracy is so negligible that it won't produce any
undesirable results for the user.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=10729
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3420
Today, Wine fails to build with musl libc and Linux kernel 5.14 uAPI
header files.
musl libc doesn't supply any definitions for IPX, such as the SOL_IPX
macro. However, it still provides linux/ipx.h from Linux uAPI header
files if it exists.
Linux kernel wouldn't drop linux/ipx.h from uAPI headers until 5.15,
although IPX support has already been marked obsolete since 2018.
Fix this by not defining HAS_IPX if linux/ipx.h has been included but
nothing defines the SOL_IPX macro.
Status of IPX support from other libcs are noted below:
- bionic: netipx/ipx.h does not exist. linux/ipx.h may or may not
exist. Note that sys/socket.h defines SOL_IPX even if linux/ipx.h is
missing.
- glibc: netipx/ipx.h exists. In this case, Wine assumes IPX support
even if the operating system does not support it in runtime.
- BSD variants: netipx/ipx.h may or may not exist. linux/ipx.h does not
exist. Some BSDs supply SO_DEFAULT_HEADERS instead of SOL_IPX.
--
v2: server: Avoid relying on linux/ipx.h to define SOL_IPX.
ws2_32: Avoid relying on linux/ipx.h to define SOL_IPX.
ntdll: Avoid relying on linux/ipx.h to define SOL_IPX.
https://gitlab.winehq.org/wine/wine/-/merge_requests/3428
SPIR-V says this is undefined behaviour, but Direct3D actually specifies that it
should clamp. Most drivers do clamp, but llvmpipe does not. Hence this fixes a
couple of tests with llvmpipe.
This does of course add overhead to the ftou instruction, but I cannot imagine
that it is a common instruction to execute. This also is not the first time we
perform such checks; cf. udiv.
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/289
I expect this is going to be tricky to get in. I ran into the following issues:
* test_ShowWindow behaves very strangely on Windows. It seems this isn't typical behavior, and is caused by an interaction with test_SetFocus, but I'm not sure exactly what it does to the thread state that causes this.
* Many of the SetWindowPos flag combinations tested don't actually show the window on Windows, therefore they don't send EVENT_SYSTEM_FOREGROUND. I was able to reproduce this with a stand-alone test, so it seems to be normal behavior.
* Windows can show a window without activating it, and Wine on X11 can't do that reliably for managed windows.
* There are a couple of cases where Windows sends an event and Wine doesn't. I figure it's OK to not cover every case, but I can go back and investigate those if needed.
This interacts with https://gitlab.winehq.org/wine/wine/-/merge_requests/2314, in that the tests don't really test much without it. I applied that MR for my own testing.
--
v3: win32u: Implement EVENT_SYSTEM_FOREGROUND.
user32: Run tests that notice focus changes early.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2853
This fixes an issue when the path includes non-ASCII characters.
Signed-off-by: Jactry Zeng <jzeng(a)codeweavers.com>
--
v4: mshtml: Call UrlUnescapeW() with URL_UNESCAPE_AS_UTF8 in is_gecko_path().
shlwapi/tests: Test UrlUnescapeW() with URL_UNESCAPE_AS_UTF8.
kernelbase: Implement URL_UNESCAPE_AS_UTF8 for UrlUnescapeW().
shlwapi/tests: Test UrlUnescapeW() with independent data.
https://gitlab.winehq.org/wine/wine/-/merge_requests/585
DirectX's FFP normalizes the zero vector to the zero vector, but GLSL
normalizes them to all NaN.
This patch creates `ffp_normalize`, which normalizes vectors but
has DirectX's behavior on 0 vectors. Further patches in this set switch
other calls from GLSL's `normalize` to the 0-safe version.
This fixes [36564](https://bugs.winehq.org/show_bug.cgi?id=36564).
--
v3: wined3d: Use ffp_normalize in shader_glsl_ffp_vertex_lighting_footer.
wined3d: Use ffp_normalize in shader_glsl_ffp_vertex_lighting.
wined3d: Implement a zero-safe normalize function for FFP.
https://gitlab.winehq.org/wine/wine/-/merge_requests/3419