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
Calling write_current_mode() in add_gpu seems weird. Not to mention write_current_mode() actually writes the current mode for the last source. write_current_mode() is also called at multiple places. It just seems that it should be called at one appropriate place and that's it.
Also, why is this patch necessary?
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5422#note_67593
'add_physical_source' here just doesn't look consistent with other functions in device_manager. Maybe add a "BOOL is_physical" or something in struct device_manager_ctx so that when both is_physical and is_virtual_desktop() are TRUE we report sources as detached. Then we set is_physical to FALSE and start adding sources for the virtual desktop. Use your best judgment.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5422#note_67592
I don't think These physical sources should be visible in EnumDisplayDevices(). If you report a physical source, doesn't that mean I can attach it? by calling ChangeDisplaySettings() with a valid mode?
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5422#note_67589
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
First part of Proton shared memory series. The full branch can be seen at https://gitlab.winehq.org/rbernon/wine/-/commits/mr/shared-memories.
--
v30: 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 desktop shared objects from session mapping.
server: Return the desktop object info in get_thread_desktop.
server: Allocate shared session object for desktops.
win32u: Open the global session shared mapping.
include: Add ReadNoFence64 inline helpers.
server: Create a global session shared mapping.
https://gitlab.winehq.org/wine/wine/-/merge_requests/3103
Starting with late Windows 10 version, in ucrtbase, stderr is now unbuffered
whatever the type of the underlying fd (previously, native only set it to
unbuffered when attached to character fd (console, NUL...)).
This serie adds also tests for msvcrt & ucrtbase to show the discrepancies.
Note: ucrtbase's tests also include a reversed engineered structure layout
for FILE.
_get_stream_buffer_pointers already gives base, ptr and cnt, and toying with
setvbuf gave easily the rest of the fields.
Didn't spend time in guessing the flags meaning: which look different
from msvcrt's.
Related to https://bugs.winehq.org/show_bug.cgi?id=56459
@piotr: I can share the details (the access to the test result in the bug
report is limited).
--
v4: ucrtbase: Let stderr be always be unbuffered.
ucrtbase/tests: Add tests for checking buffering state of standard streams.
msvcrt/tests: Add tests for check buffering state of standard streams.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5462
Starting with late Windows 10 version, in ucrtbase, stderr is now unbuffered
whatever the type of the underlying fd (previously, native only set it to
unbuffered when attached to character fd (console, NUL...)).
This serie adds also tests for msvcrt & ucrtbase to show the discrepancies.
Note: ucrtbase's tests also include a reversed engineered structure layout
for FILE.
_get_stream_buffer_pointers already gives base, ptr and cnt, and toying with
setvbuf gave easily the rest of the fields.
Didn't spend time in guessing the flags meaning: which look different
from msvcrt's.
Related to https://bugs.winehq.org/show_bug.cgi?id=56459
@piotr: I can share the details (the access to the test result in the bug
report is limited).
--
v3: ucrtbase: Let stderr be always be unbuffered.
ucrtbase/tests: Add tests for checking buffering state of standard streams.
msvcrt/tests: Add tests for check buffering state of standard streams.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5462
Wine incorrectly inserts a sample copier. D3D awareness is handled per
node, and each node will have their own sample allocator created from
the D3D device manager provided by the session.
--
v6: mf/tests: Test device manager handling in the topology loader.
mf/tests: Test D3D awareness handling in the topology loader.
mf/tests: Split topology loader tests to a new file.
mf/tests: Fix printf format warning.
include: Add MFTOPOLOGY_DXVA_MODE enum definition.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5464
Wine incorrectly inserts a sample copier. D3D awareness is handled per
node, and each node will have their own sample allocator created from
the D3D device manager provided by the session.
--
v5: mf/tests: Test device manager handling in the topology loader.
mf/tests: Test D3D awareness handling in the topology loader.
include: Add MFTOPOLOGY_DXVA_MODE enum definition.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5464
This improves performance for the game "Grounded", on a AMD Radeon RX 6700 XT,
with radv from Mesa 22.3.6. Testing was done with the "cb_access_map_w" option
enabled, which also improves performance with the game by itself.
From my testing, it's possible to raise the threshold from 2 ms up to 5 ms or
so, before the driver or GPU seems to reclock back to the lower power level.
However, this measurement is questionable for several reasons. It seems to vary
depending on the scene being rendered, and of course this will be specific to
the game and driver and GPU in question anyway. The game also has a weird
approach to vsync that seems to involve it presenting stale frames (and hence
artificially inflating the FPS), which I'm not fully sure I accounted for while
measuring. And of course, it's hard to be sure that 5 ms is actually the
threshold for how long the driver will go before powering down the GPU. In any
case, it seems better to err on the side of submitting more often, to make sure
the fix affects more drivers.
While submission isn't cheap, it seems to me that submitting every 2 ms is
unlikely to cause a bottleneck [consider that this is at most 8 (more)
submissions per frame].
The maximum of 4 concurrent periodically submitted buffers was chosen
arbitrarily. Removing the maximum altogether does not measurably affect
performance for this game either way.
Credit goes to Philip Rebohle and his work on DXVK for helping me to notice that
periodic submission might make a difference.
--
v2: wined3d: Submit command buffers that are built for longer than 2 ms.
wined3d: Retrieve the VkCommandBuffer from wined3d_context_vk after executing RTV barriers.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2724