The last patch is a huge optimization to what is done in patch 2. Without that the sample is first copied from GPU to CPU each time wg_transform_read_mf() locks the buffer (allocating extra linear buffer on the way) and then copies the data back to GPU. That happens even if there is no sample available from wg_transform. With the last patch there is just one memory copy to the (write-only) locked DXGI surface buffer. And CPU to GPU texture transfer (which would be there anyway in most cases on software path as most of the apps are going to get the image to GPU anyway). In principle we could also skip the explicit staging texture and use _UpdateSubresource instead directly from h264 decoder, but this is currently not supported in wined3d for chroma formats and the overall difference between _UpdateSubresource and explicit mapped staging texture is not that great probably.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2587
The adapter ids used by the host and settings handlers are not guaranteed to be compatible, so ensure we are using the proper id with each
handler.
Note that although the possibly incompatible id was already used in `settings_handler.get_modes()` before, the settings handler was ignoring it anyway for `get_modes()` in the case it was really incompatible (e.g., using host handler xrandr 1.4, settings handler xrandr 1.0), . The problem manifests now since we are additionally calling `settings_handler.get_current_mode()` which does check the id value (e.g., in xrandr 1.0 to differentiate primary vs non-primary).
Signed-off-by: Alexandros Frantzis <alexandros.frantzis(a)collabora.com>
Fixes: 4232312dffe1cd115aa6bfd755f5b7c6a403e3fc
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54781
--
v2: winex11.drv: Do not call desktop get_current_mode() from UpdateDisplayDevices.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2593
The adapter ids used by the host and settings handlers are not guaranteed to be compatible, so ensure we are using the proper id with each
handler.
Note that although the possibly incompatible id was already used in `settings_handler.get_modes()` before, the settings handler was ignoring it anyway for `get_modes()` in the case it was really incompatible (e.g., using host handler xrandr 1.4, settings handler xrandr 1.0), . The problem manifests now since we are additionally calling `settings_handler.get_current_mode()` which does check the id value (e.g., in xrandr 1.0 to differentiate primary vs non-primary).
Signed-off-by: Alexandros Frantzis <alexandros.frantzis(a)collabora.com>
Fixes: 4232312dffe1cd115aa6bfd755f5b7c6a403e3fc
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54781
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2593