The default behaviour for gstreamer is to use the URI to create the
stream-id. Without this, gstreamer creates a random stream-id per pad
which can cause inconsistent ordering on the decodebin src pads.
This in turn can cause issues, for example, with audio stream selection.
The first commit is a partial cherry-pick of eda34f74c6ad from Proton.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5511
On Mon Apr 22 09:02:12 2024 +0000, Alexandros Frantzis wrote:
> Hi @shmerl, I have already reviewed and approved this MR (and cannot
> merge myself). I guess it has fallen through the cracks, or perhaps
> @julliard and/or @rbernon would like to review themselves?
Yeah, may be some mix up about who can approve it for the final merge. See [here](https://gitlab.winehq.org/wine/wine/-/merge_requests/5178#note_65890)
> It's perhaps instead that approval only show up if the person is assigned as a reviewer, or that it was overlooked.
It would be good to merge it for the next release.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5178#note_68466
As an intermediate step on the way to !5388, I wanted to focus on the infrastructure that will allow us to pass pixel format information from the driver to the PE side. This MR introduces the mechanism to perform this information exchange and uses it to implement `wglDescribePixelFormat` on the PE side. In the current RFC state this MR:
1. Introduces `p_get_pixel_format` driver API to allow drivers to provide pixel format information.
2. Implements `wglDescribePixelFormat` on the PE side using the pixel format information. If the driver doesn't implement `p_get_pixel_format` we fall back to the `wglDescribePixelFormat` driver implementation (temporary measure until all drivers are updated).
3. Caches pixel format information in `NtCurrentTeb()->glReserved1[]`.
4. Implements `p_get_pixel_format` API and removes the custom `wglDescribePixelFormat` for winewayland.
At this point would like to get some more feedback about this approach and the technical details. If the direction seems promising, here are the next steps to get to a final MR:
1. Implement `p_get_pixel_format` for winex11, winemac and dibdrv and remove their custom `wglDescribePixelFormat` implementations.
2. Remove the `wglDescribePixelFormat` driver API.
Thanks!
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5517
Follow up to !5342. This adds the last missing piece for fixing how `ShellExecute` finds files, and restore the ability of running native unix programs with `ShellExecute`
--
v5: shell32: Restore the ability of running native unix programs with ShellExecute
https://gitlab.winehq.org/wine/wine/-/merge_requests/5400
On Mon Apr 22 09:02:12 2024 +0000, Shmerl wrote:
> @afrantzis: A gentle ping. Can you please review and merge this?
Hi @shmerl, I have already reviewed and approved this MR (and cannot merge myself). I guess it has fallen through the cracks, or perhaps @julliard and/or @rbernon would like to review themselves?
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5178#note_68401
Previously, `SetupDiGetINFClassW()` read INF files
with `GetPrivateProfileString()`, which does not substitute %strkey%
tokens.
This caused device installation to fail for devices which had driver
INF files using %strkey% tokens in Version section.
An example of such device is Vernier LabQuest Mini (08f7:0008) for
which Vernier's LoggerPro application includes a driver.
The INF file in question adds a new device setup class and has
following entries in Version section:
```
Class = %ClassName%
ClassGuid = %DeviceClassGUID%
```
Strings section includes following entries:
```
DeviceClassGUID = "{6B8429BF-10AD-4b66-9FBA-2FE72B891721}"
ClassName = "VST_WinUSB"
```
Previously, when LoggerPro was installed and LabQuest Mini was
hotplugged, device installation failed with the following error:
```
fixme:setupapi:SetupDiGetINFClassW failed to convert "L"%DeviceClassGUID"" into a guid
```
This caused GUID_NULL to be used and Class was not set to the registry
for the device.
With this commit, correct class GUID and names are set to the device
registry entry.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56579
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5519
> > > I guess it should perform better with a vidmem buffer if the buffer is holding static data and not locked after the initial upload.
>
> Maybe, yeah. Though I'd be surprised if a ddraw application did that...
That was basically the original idea behind vertex buffers: to hold static data in video memory so that's faster to access by the GPU (mostly in the sense of avoiding data transfers from SYSMEM).
Similar idea behind ProcessVertices(). If you wanted to draw with dynamic data, you'd use the non-VB Draw[Indexed]Primitive variant.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2404#note_68209
> It may be worth including a call to GetVertexBufferDesc() in the tests. As Matteo mentioned in an earlier comment, the docs seem to suggest that omitting D3DVBCAPS_SYSTEMMEMORY allows the driver/runtime to place the buffer as it sees fit.
I mentioned earlier that GetVertexBufferDesc() never returns anything other than the flags used to create the buffer. That holds for both cards. I'll add a test the the suite.
> I guess it should perform better with a vidmem buffer if the buffer is holding static data and not locked after the initial upload.
Maybe, yeah. Though I'd be surprised if a ddraw application did that...
> Can you check D3DDEVICEDESC.dwMaxVertexCount on these cards? Regardless of what we do with these two patches I think we should reduce it to whatever Windows reports. (1024 in my case on Windows 11)
For both cards, the RGB device has 0 in the HAL caps, and 2021 in the HEL caps.
The NVidia card has 32768 (both HAL and HEL), and the ATI card has 2048 (both HAL and HEL).
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2404#note_68208
Overriding the SDL_VIDEODRIVER variable (for Wayland support as an example)
on the Linux side can lead to some games under Wine failing to load (so treat
that variable as special).
--
v3: ntdll: Add SDL_AUDIO*/SDL_VIDEO* to the special variables list.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5231
> At the same time, I haven't seen any evidence that a modern GPU will ever perform better with a vertex buffer not in sysmem unless it's using the streaming pattern
I guess it should perform better with a vidmem buffer if the buffer is holding static data and not locked after the initial upload.
Can you check D3DDEVICEDESC.dwMaxVertexCount on these cards? Regardless of what we do with these two patches I think we should reduce it to whatever Windows reports. (1024 in my case on Windows 11)
Conceptually the two patches have my blessing though, regardless of specifics of what PoP3D is doing.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2404#note_68141
On Thu Apr 18 23:08:03 2024 +0000, Jinoh Kang wrote:
> @rbernon Thanks for your review! Right now I'm tentatively putting this
> MR on hold until I find a solution for a memory leak: a new (redundant)
> dependency edge is added every time the application calls
> `GetProcAddress()` on a forwarded ref.
Has the memory leak been fixed? 🫗️
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7#note_68140
It may be worth including a call to GetVertexBufferDesc() in the tests. As Matteo mentioned in an earlier comment, the docs seem to suggest that omitting D3DVBCAPS_SYSTEMMEMORY allows the driver/runtime to place the buffer as it sees fit.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2404#note_68109
Yet another four files with the same "issue": server/change.c, server/thread.c, server/process.c and server/queue.c. This time found by fgrep(1), so no more similar files left in server directory, I believe.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5503#note_68027
It turned out that the `master_socket_fd_ops` in server/request.c has the same "issue".
Therefore, 1c68e8ed960 (Fix initialization of the master_socket_fd_ops, 2024-04-17) was added into this merge request.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5503#note_68012
Since we are adding more and more media formats to wg_format, the current wg_format struct is getting ugly.
Everytime we add a video format, we need to duplicate width, height, fps. Everytime we add a audio format, we need to duplicate channels, rate. So it would be better if we could share width, height, fps fields between different video formats, also share channels and rate fields between different audio formats.
What makes me found the current wg_format is not in a good shape is when I was writting code for Proton, I found that I need to write some code like this if want to get width/height/fps from a wg_format:
```
static bool get_video_info_from_wg_format(struct wg_format *format,
int32_t *width, int32_t *height, uint32_t *fps_n, uint32_t *fps_d)
{
switch (format->major_type)
{
case WG_MAJOR_TYPE_VIDEO:
*width = format->u.video.width;
*height = format->u.video.height;
*fps_n = format->u.video.fps_n;
*fps_d = format->u.video.fps_d;
return true;
case WG_MAJOR_TYPE_VIDEO_CINEPAK:
*width = format->u.video_cinepak.width;
*height = format->u.video_cinepak.height;
*fps_n = format->u.video_cinepak.fps_n;
*fps_d = format->u.video_cinepak.fps_d;
return true;
case WG_MAJOR_TYPE_VIDEO_H264:
*width = format->u.video_h264.width;
*height = format->u.video_h264.height;
*fps_n = format->u.video_h264.fps_n;
*fps_d = format->u.video_h264.fps_d;
return true;
case WG_MAJOR_TYPE_VIDEO_WMV:
*width = format->u.video_wmv.width;
*height = format->u.video_wmv.height;
*fps_n = format->u.video_wmv.fps_n;
*fps_d = format->u.video_wmv.fps_d;
return true;
case WG_MAJOR_TYPE_VIDEO_INDEO:
*width = format->u.video_indeo.width;
*height = format->u.video_indeo.height;
*fps_n = format->u.video_indeo.fps_n;
*fps_d = format->u.video_indeo.fps_d;
return true;
case WG_MAJOR_TYPE_VIDEO_MPEG1:
*width = format->u.video_mpeg1.width;
*height = format->u.video_mpeg1.height;
*fps_n = format->u.video_mpeg1.fps_n;
*fps_d = format->u.video_mpeg1.fps_d;
return true;
default:
GST_ERROR("Type %d is not a video format.\n", format->major_type);
return false;
}
}
```
Apparently, the code above is ugly. By refactoring wg_format, we can avoid code like this.
This patch is a draft now, it only contains unixlib.h code.
Zeb, I'd like to confirm that if this refactoring would be acceptable for you. If do, I'll continue finishing the remaining parts.
--
v6: winegstreamer: Refactor wg_format.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5369
On Tue Apr 16 22:41:34 2024 +0000, Elizabeth Figura wrote:
> This is now causing a test failure in test_swapchain_resize() due to a
> no longer skipped test; I imagine we want to add a todo_wine there (and
> possibly change the skip to a win_skip).
Thanks, that should be fixed now.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5484#note_67974
On Tue Apr 16 19:49:05 2024 +0000, Ruslan Garipov wrote:
> > I don't know if there is anything preventing using them in the server
> Should I update my patch using designated initializers?
That would be a question for @julliard.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5503#note_67941
Designated initializers will make this more readable and easier to verify. We are using them in various places now, including parts built as unixlibs. I don't know if there is anything preventing using them in the server, apart from being in different style.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5503#note_67938
--
v4: ntdll: Store exception reporting flags for debug events.
ntdll: Store exception reporting flags on suspend.
ntdll: Store exception reporting flags in server context.
ntdll: Set exception reporting flags in NtGetContextThread().
ntdll/tests: Add tests for CONTEXT_EXCEPTION_REQUEST.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5480
--
v2: jscript: Remove PROP_IDX dispex props by handling them in object prop methods.
jscript: Move filling the PROTREF into a helper.
jscript: Simplify get_flags to only check whether it's enumerable.
jscript: Get rid of on_put in the object vtbl.
jscript: Inline prop_put.
jscript: Inline prop_get.
jscript: Inline invoke_prop_func and invoke PROTREFs using their vtbl method.
jscript: Inline delete_prop.
jscript: Use mandatory methods in the object vtbl to operate on props found
jscript: Use mandatory methods in the object vtbl to operate on props
mshtml/tests: Test redefining a writable indexed prop.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5444
On Tue Apr 16 14:47:32 2024 +0000, Elizabeth Figura wrote:
> 1/3 is unfortunately causing some (strange) test failures here:
> 00f0:fixme:quartz:mpeg_splitter_filter_init_gst unexpected format 5
> 00f0:fixme:quartz:mpeg_splitter_filter_init_gst unexpected format 1
> amstream.c:512: Test failed: Got hr 0.
> I see this on the CI too.
Got it. I'll take a look.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5430#note_67920
--
v2: wined3d: Use dynamic state for rasterizer state if possible.
wined3d: Use dynamic state for blend state if possible.
wined3d: Use dynamic state for multisample state if possible.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5471
1/3 is unfortunately causing some (strange) test failures here:
00f0:fixme:quartz:mpeg_splitter_filter_init_gst unexpected format 5
00f0:fixme:quartz:mpeg_splitter_filter_init_gst unexpected format 1
amstream.c:512: Test failed: Got hr 0.
I see this on the CI too.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5430#note_67851
--
v2: ntdll: Store exception reporting flags for debug events.
ntdll: Store exception reporting flags on suspend.
ntdll: Store exception reporting flags in server context.
ntdll: Set exception reporting flags in NtGetContextThread().
ntdll/tests: Add tests for CONTEXT_EXCEPTION_REQUEST.
ntdll/tests: Work around exception test failures on Wine WoW.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5480
Thanks for the review.
> They fail on my Windows XP box, r250 GPU, see the attached log file. It seems that It doesn't follow the alpha = 0xff behavior of newer GPUs and just returns alpha 0x0 in either case. The window positioning test needlessly depends on it. If I mask out the alpha channel in test_get_front_buffer_data_windowed_positioning() it passes.
Interesting. I'd be perfectly fine with dropping the separate alpha test entirely. I also meant to mask out the alpha but I guess I forgot it there or lost it during rebase/cleanup.
> if (foo) { something(); }
> Please put the { on a new line consistently.
Ah, I'm trying. I thought I got it right but I guess old habits die hard. I use the same line { in every other project, so not surprised that I slipped up a couple of times. I'll fix that.
> test_swapchain_buffer_swapping() and test_get_front_buffer_data_alpha() leak your initial device, the one you use to populate present_parameters
> In the case of test_swapchain_buffer_swapping I don't see why you need to call IDirect3D9::CreateDevice yourself - what prevents you from using the device returned by create_device?
Oops, that's a leftover of my original approach. I originally meant to create a new device for each test case and pass the required presentation params but later changed it to just use a single device created using `create_device` and reset that as needed. I meant to get rid of the second device that's created manually.
I will also look into using the current monitor resolution for the fullscreen tests.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5500#note_67838
The tests pass on my Windows 11 machine with a Radeon 560 GPU.
They fail on my Windows XP box, r250 GPU, see the attached log file. It seems that It doesn't follow the alpha = 0xff behavior of newer GPUs and just returns alpha 0x0 in either case. The window positioning test needlessly depends on it. If I mask out the alpha channel in test_get_front_buffer_data_windowed_positioning() it passes.
I haven't looked closely at the code yet - I see some style inconsistencies, like
if (foo) {
something();
}
Please put the { on a new line consistently.
Rather than hardcoding the positions to check in the windowed mode tests please call GetWindowRect after creating the device and calculate the checked positions relative to it. There are window managers on the Linux side that don't allow applications to decide their placement and will break this kind of test. I suspect fvwm2 will cause you trouble otherwise.
test_swapchain_buffer_swapping() and test_get_front_buffer_data_alpha() leak your initial device, the one you use to populate present_parameters. The other unfortunate side effect of initializing present_parameters like that is that you switch the screen to 640x480 fullscreen mode. I recommend to use EnumDisplaySettingsW(ENUM_CURRENT_SETTINGS) to retrieve the current mode and use it to create a fullscreen device that doesn't change the mode. Changing the mode moves around Windows on Windows 10/11 and most Linux desktops.
In the case of test_swapchain_buffer_swapping I don't see why you need to call IDirect3D9::CreateDevice yourself - what prevents you from using the device returned by create_device?
[r200-xp.txt](/uploads/5f577583ec5703e2a040077de884faf3/r200-xp.txt)
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5500#note_67826
To make https://gitlab.winehq.org/wine/wine/-/merge_requests/5422 simpler. This will also make it easier to write the mode list to the registry as a single binary blob, although it is a larger change that could be done later.
--
v3: win32u: Add all display device source modes at once.
win32u: Keep the primary current mode in the device manager context.
win32u: Remove fake source creation when adding display mode.
win32u: Close device manager source key in write_source_to_registry.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5488
To make https://gitlab.winehq.org/wine/wine/-/merge_requests/5422 simpler. This will also make it easier to write the mode list to the registry as a single binary blob, although it is a larger change that could be done later.
--
v2: win32u: Add all display device source modes at once.
win32u: Keep the primary current mode in the device manager context.
win32u: Remove fake source creation when adding display mode.
win32u: Close device manager source key in write_source_to_registry.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5488
Fix errors such as GL_FRAMEBUFFER_UNDEFINED and GL_INVALID_FRAMEBUFFER_OPERATION for OpenGL
functions when the default framebuffer 0 is bound on macOS.
These errors happen because the NSOpenGLContext doesn't have a view bound at the time of an
OpenGL call. The view could not be set for the NSOpenGLContext because the window or view can
still be invisible. Setting an invisible view for the NSOpenGLContext can generate invalid
drawable messages as 682ed910 has shown. Thus setting the view could be deferred because
the NSOpenGLContext needs a visible view.
However, right after the window becomes visible, an OpenGL function that involves the default
framebuffer can be called. And when the view is still not set at the time of the OpenGL call,
errors such as GL_FRAMEBUFFER_UNDEFINED and GL_INVALID_FRAMEBUFFER_OPERATION could happen and
result in rendering errors such as black screen. So we need to set the view for the NSOpenGLContext
as soon as the view becomes visible.
It's possible that the window and view are still invisible when OpenGL functions involving the
default framebuffer get called. In such cases, I think errors like GL_FRAMEBUFFER_UNDEFINED are
justified on macOS.
Fix Active Trader Pro black screen at launch on macOS. The application creates a d3d9 device with
an invisible window. And then it shows the window before calling d3d9_swapchain_Present(). So all
the [NSOpenGLContext setView] opportunities are missed and no view is set. Then when glBlitFramebuffer()
gets called, GL_FRAMEBUFFER_UNDEFINED happens and so nothing is rendered. The application only
renders one frame before login so the window remains black.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5487
This introduces a custom `VkPresentSurfacesInfoWine` struct to the driver queue present. It could very well be a separate vkQueuePresent parameter, now that the driver interface is manually written.
For now it provides the swapchains HWND, for vulkan_surface_presented, which is mostly just for winewayland purposes. Later I intend to change it to pass win32u surfaces wrappers.
--
v4: winevulkan: Remove now unnecessary vkCreateSwapchainKHR driver entry.
winevulkan: Remove now unnecessary vkDestroySwapchain driver entry.
win32u: Move vkQueuePresent implementation out of the user drivers.
winewayland: Remove now unnecessary swapchain wrapper.
winewayland: Remove now unnecessary swapchain extents checks.
win32u: Introduce a new vulkan_surface_presented driver entry.
winevulkan: Pass surface info for each vkQueuePresent swapchain to win32u.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5482
On Mon Apr 22 12:40:26 2024 +0000, Zhiyi Zhang wrote:
> What is this fake source supposed to do now? Virtual desktop has its own
> virtual source.
Was it ever related to virtual desktop mode? I don't know what it was for, I'm fine dropping it altogether.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5422#note_67597