These changes are the documented way to implement IMFMediaEventGenerator for a media source. Avoiding using a destroyed event queue is the only reason to lock the CS that I can find. On top of !6783 it seems to resolve hanging while switching characters in Killsquad (not decisively proven though).
--
v2: winegstreamer: Lock the media source critical section while using the event queue.
https://gitlab.winehq.org/wine/wine/-/merge_requests/6800
I'm starting to consider wrapping more vulkan objects in win32u, I think it'll be useful to implement compositing (and incidentally shared resources with interop with the D3DKMT/NtGdi API), starting with nulldrv/offscreen swapchains. Alternatively we could export more functions from win32u and keep all the wrappers in winevulkan, but having access to win32u internals with a generic vulkan object wrapping mechanism seems to be more interesting.
Right now this is not very convenient because the vulkan object hierarchy is only available in winevulkan. This introduces shared structures and API between win32u and winevulkan so they can manipulate the wrapped objects from both side. The interface would only expose what is necessary, ie: the object hierarchy and wrapped handles, the instance and device functions, and the objects rbtree for debugging, so win32u can insert its wrapper there as well.
After moving the surface and swapchain wrappers to win32u, the interface would look like this: https://gitlab.winehq.org/rbernon/wine/-/blob/65ca1280d46a2dff792e298c22242… (I pushed a complete WIP branch to https://gitlab.winehq.org/rbernon/wine/-/commits/wip/vulkan-win32u-driver?r…). We can also consider moving all the winevulkan wrappers to win32u but it's not clear whether it's necessary or desirable, and we can also do that later using this interface.
--
v3: winevulkan: Introduce a new vulkan_physical_device base structure.
winevulkan: Introduce a new vulkan_instance base structure.
winevulkan: Pass physical device array params to some helpers.
winevulkan: Name wine_instance parameters and variables more consistently.
winevulkan: Move vulkan_client_object header to wine/vulkan_driver.h.
winevulkan: Generate vulkan_(device|instance)_funcs in wine/vulkan.h.
win32u: Use PFN_* typedefs for vulkan function pointers.
winevulkan: Add missing wine_vkGetPhysicalDeviceSurfaceFormatsKHR manual wrapper.
https://gitlab.winehq.org/wine/wine/-/merge_requests/6427
Fixes some stuttering in Secret of Mana.
Native seems to only preroll 2 samples, but it still stutters a bit in
Secret of Mana without at least 3 buffers. This is probably caused by
a different sample decoding pattern, and 3 buffers in flight should be
fine.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/6848
bool is a reserved identifier in C23 and would break with GCC 15
moving to -std=gnu23 (based on C23). Use mybool instead, along the
line of myint in the same context.
--
v2: msi: Use mybool instead of bool as variable name.
https://gitlab.winehq.org/wine/wine/-/merge_requests/6893
This MR uses the existing compositor side surface scaling in the driver (through wp_viewporter, currently used for Hi-DPI scaling) to emulate display mode changes. This works wonderfully in coordination with fullscreen since the compositor is required non only to scale the surface, but also to position it properly and provide opaque surroundings (note: some compositors don't implement the last two features properly!).
Since: 1. Wayland doesn't allow clients to change the actual display configuration, and 2. there is no queryable service that holds the display information in a consistent manner (à la xrandr), the MR uses the win32 device settings as the source of truth for the current display mode. We let win32u handle the display mode change in the default manner (i.e., just updating the registry settings), and provide access to the current mode when updating the display devices through a new `gdi_display_manager.get_adapter()` function.
In order to be able to consistently (across all processes) associate an adapter device with its corresponding `wl_output` the MR introduces per-adapter driver data.
Note for people trying this out: many modern games don't change the hardware display settings, but rather scale themselves in right way to achieve the visual effect of a mode change (similarly to how this MR works, but they do it on the application side). To exercise most of the functionality in this MR you need an application that actually uses the `ChangeDisplaySettings` win32 API.
Thanks!
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/4947