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
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.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5482
--
v3: win32u: Split virtual desktop modes to a add_virtual_modes helper.
win32u: Delay writing current display settings to the registry.
winex11: Let win32u decide when to force update the display cache.
win32u: Don't force refresh the display cache on thread desktop change.
winex11: Report all sources as detached in virtual desktop mode.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5422