--
v2: winegstreamer: Expose the generic video decoder transform.
winegstreamer: Introduce a generic audio decoder transform.
winegstreamer: Rename aac_decoder to audio_decoder.
winegstreamer: Translate generic unknown audio / video media types.
winegstreamer: Support generic audio / video unknown formats.
winegstreamer: Call gst_video_info_from_caps for all video formats.
winegstreamer: Call gst_audio_info_from_caps for all audio formats.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5138
As mentioned in https://gitlab.winehq.org/wine/wine/-/merge_requests/5264, the next step for OpenGL in the Wayland driver is support for WGL_ARB_pixel_format. It seems possible, at least in theory, to move a large part of the logic involved in this extension outside the drivers for common use by all of them (or ones that want to opt-in).
The goal of this RFC MR is, through experimentation and discussion/feedback, evaluate:
1. Whether making such functionality available outside the drivers (likely in an opt-in manner to begin with) is a productive way forward, or the complexity and platform specific decisions favor the current per-driver approach.
2. If we think that (1) is a worthy goal, what's the best mechanism to achieve it.
Note that the focus of this MR is currently on being a proof-of-concept, rather providing ready-for-detailed-review code (although I have done my best to keep the code decent). This MR currently (roughly in commit order):
* Introduces a new wgl driver callback to allow drivers to provide to opengl32/unix a list of formats and many details about them.
* Uses the information in that list to implement wglGetPixelFormatAttrib*.
* Uses the information in that list plus format sorting rules from WineX11 (effectively GLX rules plus tweaks) to implement wglChoosePixelFormatARB.
* Implements the get_pixel_formats callback for the Wayland driver.
* Hacks the get_pixel_formats callback for WineX11, and to allow me to run some experiments to compare the output of native WineX11 and get_pixel_formats-WineX11. In the admittedly not too many games I tried the sort order is the same, so at least that's encouraging.
My thoughts and notes so far:
* Using this approach for wglGetPixelFormatAttrib* works well, and we can also implement wglDescribePixelFormat in this way.
* It's not at all clear what the "right" sorting rules are for wglChoosePixelFormatARB.
* WineX11 uses GLX + tweaks (e.g., changes depth sorting). This means that larger formats tend to be preferred, at least according to the GLX spec. For example, asking for a r5, g6, b5 in the attributes is supposed to give back rgb888 (or even higher if available) as the top format in the list. Interestingly, and to confuse things even more, I haven't been able to make GLX return non-888(8) configs at all to actually test this more, so perhaps that's what saves it here? However, eglChooseConfig works similarly and there I was able to verify this behavior (e.g., got a nice surprise 10-bit format when asking for 5551 :)).
* Winemac has its own custom logic.
* Mesa's WGL implementation uses a different approach, closer to Wine's normal (wgl)ChoosePixelFormat, where proximity to the target format is strongly rewarded (so it seems asking for r5g6b5 is much more likely to actually get you that).
* Of course, the "gold standard" here would be to try to infer and use the rules used by some windows driver.
Looking forward to thoughts/feedback!
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5388
On the client side, frame aperture may be included or omitted. This can be used to include or drop the frame padding, and the VideoProcessor MFT supports it.
On GStreamer side, we can only use the unpadded frame size in the caps, because this is how decoders work, and padding needs to be added as a property of the input/output video buffers. Then, frame size needs to be adjusted to be consistent between input and output, and any difference considered as extra padding to be added on one side or the other.
--
v3: winegstreamer: Respect video format padding for input buffers too.
winegstreamer: Exclude padding from wg_format video frame size.
winegstreamer: Use video info stride in buffer meta rather than videoflip.
winegstreamer: Use a new wg_video_buffer_pool class to add buffer meta.
winegstreamer: Update the output_format when stream format changes.
winegstreamer: Pass optional GstVideoInfo to read_transform_output_data.
winegstreamer: Split read_transform_output_data in two helpers.
winegstreamer: Introduce a new sample_needs_copy_buffer helper.
winegstreamer: Introduce a new sample_set_flags_from_buffer helper.
mf/tests: Add more video processor tests with aperture.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5055
This saves ~1500 LoC, and at the same time allows mapping arbitrary long codec data back and forth GstCaps, which will be required to support arbitrary compressed formats. We can then for instance expose unknown codecs as Wine-specific subtypes, expose generic decoders and pass the backend GstCaps serialized in the codec data.
It makes the code simpler by unifying all frontend mappings and only requiring mapping between GstCaps and a unified set of formats. Mapping between IMFMediaType and the AM_MEDIA_TYPE formats is done using the standard MF functions and are tested and validated in mfplat tests.
--
This merge request has too many patches to be relayed via email.
Please visit the URL below to see the contents of the merge request.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5615
I'm currently, very unsuccessfully, tracking down a crash on the unix side that only happens on Gitlab, and although I'm still unable to reproduce it, it then would be useful to have gdb to attach on segfault when I will.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5367
With [`VK_EXT_device_address_binding_report`](https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VK_EXT_device_address_binding_report.html) we can get [debug_util](https://registry.khronos.org/vulkan/specs/1.3-extensions/man/ht… callbacks used to track memory bindings. Since it's the host's implementation that starts the callback we have to be sure that we have a way of converting it to the client side's variant before it's added to the handle map - i.e. we don't know the host handle at that time yet.
This is [used by vkd3d-proton](https://github.com/HansKristian-Work/vkd3d-proton/pull/1962). Requires Mesa with https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28649.
before (note the missing BIND for VkDevice which actually means `VkDeviceMemory`):
```
vkd3d-proton % VKD3D_TEST_FILTER=create_placed_resource_size VKD3D_CONFIG=fault VKD3D_DEBUG=trace ~/src/wine/build/wine ./tests/d3d12.exe 2>&1 | grep vkd3d_address_binding_callback
trace:vkd3d-proton:vkd3d_address_binding_callback: BIND || VkBuffer || VA ffff800100200000 || size 0000000001000000.
trace:vkd3d-proton:vkd3d_address_binding_callback: BIND || VkImage || VA ffff800100200000 || size 000000000019a000.
trace:vkd3d-proton:vkd3d_address_binding_callback: UNBIND || VkImage || VA ffff800100200000 || size 000000000019a000.
trace:vkd3d-proton:vkd3d_address_binding_callback: UNBIND || VkBuffer || VA ffff800100200000 || size 0000000001000000.
:trace:vkd3d-proton:vkd3d_address_binding_callback: UNBIND || VkDevice || VA ffff800100200000 || size 0000000001000000.
232285.553:0020:0024:trace:vkd3d-proton:vkd3d_address_binding_callback: BIND || VkBuffer || VA ffff800100200000 || size 0000000001000000.
232285.553:0020:0024:trace:vkd3d-proton:vkd3d_address_binding_callback: UNBIND || VkBuffer || VA ffff800100200000 || size 0000000001000000.
232285.553:0020:0024:trace:vkd3d-proton:vkd3d_address_binding_callback: UNBIND || VkDevice || VA ffff800100200000 || size 0000000001000000.
```
after:
```
% VKD3D_TEST_FILTER=create_placed_resource_size VKD3D_CONFIG=fault VKD3D_DEBUG=trace ~/src/wine/build/wine ./tests/d3d12.exe 2>&1 | grep vkd3d_address_binding_callback
232338.036:0020:0024:trace:vkd3d-proton:vkd3d_address_binding_callback: BIND || VkDevice || VA ffff800100200000 || size 0000000001000000.
232338.036:0020:0024:trace:vkd3d-proton:vkd3d_address_binding_callback: BIND || VkBuffer || VA ffff800100200000 || size 0000000001000000.
232338.037:0020:0024:trace:vkd3d-proton:vkd3d_address_binding_callback: BIND || VkImage || VA ffff800100200000 || size 000000000019a000.
232338.037:0020:0024:trace:vkd3d-proton:vkd3d_address_binding_callback: UNBIND || VkImage || VA ffff800100200000 || size 000000000019a000.
232338.037:0020:0024:trace:vkd3d-proton:vkd3d_address_binding_callback: UNBIND || VkBuffer || VA ffff800100200000 || size 0000000001000000.
232338.037:0020:0024:trace:vkd3d-proton:vkd3d_address_binding_callback: UNBIND || VkDevice || VA ffff800100200000 || size 0000000001000000.
232338.037:0020:0024:trace:vkd3d-proton:vkd3d_address_binding_callback: BIND || VkDevice || VA ffff800100200000 || size 0000000001000000.
232338.037:0020:0024:trace:vkd3d-proton:vkd3d_address_binding_callback: BIND || VkBuffer || VA ffff800100200000 || size 0000000001000000.
232338.037:0020:0024:trace:vkd3d-proton:vkd3d_address_binding_callback: UNBIND || VkBuffer || VA ffff800100200000 || size 0000000001000000.
232338.037:0020:0024:trace:vkd3d-proton:vkd3d_address_binding_callback: UNBIND || VkDevice || VA ffff800100200000 || size 0000000001000000.
```
[The spec guarantees](https://registry.khronos.org/vulkan/specs/1.3-extensions/html/v… the following:
> An application can receive multiple callbacks if multiple VkDebugUtilsMessengerEXT objects are created. A callback will always be executed in the same thread as the originating Vulkan call.
As of TLS I went with a suggestion from IRC:
```
<ivyl_> There's an issue with how we handle callbacks related to VK_EXT_debug_utils and VK_EXT_debug_report. In wine_vkAllocateMemory() we call device->funcs.p_vkAllocateMemory() which may execute callback.
<ivyl_> At this point we still don't have handle mapping added because we don't know what host_memory handle will be.
<ivyl_> AFAIU there's a spec guarantee that callback will be executed in the same thread as the call causing it, so I was thinking about maybe keeping `memory` in a tls (if enable_wrapper_list) and using that?
<ivyl_> but that's I don't see any precedent of using thread local storage on the unix side
<ivyl_> tls value would be short-lived in such case - only for the duration of the call to `device->funcs.p_vkAllocateMemory()`
<jacekc_> we usually use teb on unix side, see ntuser_thread_info
```
--
v2: winevulkan: Make device memory wrapper available in callbacks.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5658
More details here: https://devblogs.microsoft.com/oldnewthing/20181206-00/?p=100415
However it does not mention that `PAGE_NOACCESS` and `PAGE_READONLY` still result in an error on Windows, which is properly implemented in this MR.
Only `WriteProcessMemory` offers this "service", `NtWriteVirtualMemory` will fail on non-writeable and executable regions (and already does so, except for the the mach server backend, which needs https://gitlab.winehq.org/wine/wine/-/merge_requests/4826 to also behave correctly here).
--
v4: kernelbase: Flush instruction cache in WriteProcessMemory.
kernelbase: Allow WriteProcessMemory to succeed on PAGE_EXECUTE and PAGE_EXECUTE_READ.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5222
First part of Proton shared memory series. The full branch can be seen at https://gitlab.winehq.org/rbernon/wine/-/commits/mr/shared-memories.
--
v41: win32u: Use the desktop shared data for GetCursorPos.
server: Move the last cursor time to the desktop session object.
server: Move the cursor position to the desktop session object.
win32u: Open the desktop shared object in NtUserSetThreadDesktop.
server: Return the desktop object locator in (get|set)_thread_desktop.
server: Allocate shared session object for desktops.
include: Add ReadNoFence64 inline helpers.
server: Create a global session shared mapping.
https://gitlab.winehq.org/wine/wine/-/merge_requests/3103
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56698
--
v6: quartz: Allow concurrent calls to AVI decoder qc_Notify and Receive.
msvfw32/tests: Test that Cinepak rejects unsupported output types.
iccvid: Reject unsupported output types.
quartz/tests: Add Cinepak test to avi splitter.
winegstreamer: Use end of previous frame if the current frame doesn't have a timestamp.
winegstreamer: Implement AM_MEDIA_TYPE to wg_format converter for Cinepak video.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5744
Two main changes:
- VM configuration in build.yml for the executor.
- The build-mac script is now architecture-agnostic.
--
v3: gitlab: Update configuration for the new Mac runner.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5749
This is the fourth part in cmd.exe's engine rewrite.
It concerns:
- start of decoupling parsing from execution by introducing
ad hoc structure to hold parsing result to be passed for
execution (done here for redirection, and if conditions),
- refactor execution code with putting into helpers:
+ change of input/output streams
+ save / restore of input/output streams before / after
execution
Note:
- the handling of fd > 2 is clearly wrong, but it just
mimics the current implementation. More work will be
required afterwards (likely using directly CRT low level
I/O),
- I kept a few specific debug channels in place. They will
be removed (or simplified at some point), but they
could be useful to debug remaining issues.
--
v4: programs/cmd: Separate IF command parsing from execution.
programs/cmd: Let errorlevel be a signed integer.
programs/cmd: Create helper to execute a command.
programs/cmd: Introduce structure CMD_REDIRECTION.
programs/cmd: Introduce a helper to set std handles.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5641
This table doesn't really grow when the total number of handles
exceeds the initial size. It will instead try to wrap and lead to
an access violation.
Signed-off-by: David Kahurani <k.kahurani(a)gmail.com>
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5353
Project Kunai associates cloud account with a mix of various items,
including board serial number, resulting in several machines being
bound to the same cloud account because the momo serial number is
always empty.
Note: this patch doesn't follow the systemd guidelines of not
exposing directly /etc/machine-id content (but Wine already
exposes /etc/machine-id as Windows machine GUID).
Signed-off-by: Eric Pouech <epouech(a)codeweavers.com>
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/4773
Adds the registry key
`HKEY_CURRENT_USER\\Software\\Wine\\Wayland Driver\\unaccelerated_pointer`
witch allows raw input. This makes it easier
to calculate the same sensitivity in different games,
use sensitivity calculators, and easily change values
when changing DPI and do not depend on the compositor or OS.
For example, you want to set the sensitivity to half as much,
and sensitivity curves in libinput are more difficult
to calculate than in the games themselves.
--
v7: winewayland.drv: Add unaccelerated pointer support
https://gitlab.winehq.org/wine/wine/-/merge_requests/4698
--
v3: widl: Do not write type definitions for types defined in an imported header.
widl: Update the type location in define_type().
widl: Factor out a define_type() helper.
widl: Invert "declonly".
widl: Allow using UDTs with the keyword even when the identifier is also a typedef.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5724
On Fri May 31 21:05:42 2024 +0000, Alex Henrie wrote:
> Thanks for the patch! Reading and following the instructions at
> https://wiki.winehq.org/Submitting_Patches will improve the chances of
> it being accepted.
> Please use your real name in the Git commit, for example:
> ```
> git config --global user.name "Your Name"
> git commit --amend --reset-author
> git push --force
> ```
> Also, drop "See Bug 53960" and "This patch fixes that" from the commit
> message, wrap the paragraph of explanation to 72 characters per line,
> and add a new line `Wine-Bug:
> https://bugs.winehq.org/show_bug.cgi?id=53960` at the end of the commit message.
Done :)
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5752#note_71998
On Fri May 31 20:58:25 2024 +0000, Piotr Caban wrote:
> There's lots of changes that look suspicious, please start with adding
> some tests.
Hi, Piotr Caban. I think the original tests should work here. What kind of extra tests do you need me to test?
Does msvcrt/tests/file.c provide tests for both msvcrt and ucrt?
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5752#note_71995
This series of patches introduces a new set of structures and functions that will enable code to be re-used across various functions in d3dx9, and eventually d3dx10-d3dx11. It might be possible to split this further, but I feel like this initial set gives better context as to where things are heading.
I have a [branch](https://gitlab.winehq.org/cmcadams/wine/-/commits/WIP/d3dx-shared-s… that uses these structures and functions in d3dx10 if further context would be useful. There are a lot of changes here, but after playing around with different approaches this was the best/cleanest way I could come up with for code sharing. I'm sure there will be things I missed or potentially ways to improve this, I'm open to suggestions of course. :)
--
v5: d3dx9: Use d3dx_load_pixels_from_pixels() in D3DXLoadVolumeFromMemory().
d3dx9: Use d3dx_pixels structure in decompression helper function.
d3dx9: Introduce d3dx_load_pixels_from_pixels() helper function.
d3dx9: Use d3dx_image structure in D3DXLoadSurfaceFromFileInMemory().
d3dx9: Introduce d3dx_image structure for use in D3DXGetImageInfoFromFileInMemory().
d3dx9: Refactor WIC image info retrieval code in D3DXGetImageInfoFromFileInMemory().
d3dx9: Refactor WIC GUID to D3DXIMAGE_FILEFORMAT conversion code.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5666