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