With [`VK_EXT_device_address_binding_report`](https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VK_EXT_device_address_binding_report.html) we can get [debug_util](https://registry.khronos.org/vulkan/specs/1.3-extensions/man/ht… callbacks used to track memory bindings. Since it's the host's implementation that starts the callback we have to be sure that we have a way of converting it to the client side's variant before it's added to the handle map - i.e. we don't know the host handle at that time yet.
This is [used by vkd3d-proton](https://github.com/HansKristian-Work/vkd3d-proton/pull/1962). Requires Mesa with https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28649 (24.3 is modern enough to have it).
before (note the missing BIND for VkDevice which actually means `VkDeviceMemory`):
```
vkd3d-proton % WINEDLLOVERRIDES="d3d12=n;d3d12core=n" \
VKD3D_TEST_FILTER=create_placed_resource_size \
VKD3D_CONFIG=fault VKD3D_DEBUG=trace \
~/build/wine/wine ./tests/d3d12.exe 2>&1 | grep vkd3d_address_binding_callback
6669.627:0020:0024:trace:vkd3d-proton:vkd3d_address_binding_callback: BIND || VkBuffer || VA ffff800101600000 || size 0000000001000000.
6669.627:0020:0024:trace:vkd3d-proton:vkd3d_address_binding_callback: BIND || VkImage || VA ffff800101600000 || size 000000000019a000.
6669.627:0020:0024:trace:vkd3d-proton:vkd3d_address_binding_callback: UNBIND || VkImage || VA ffff800101600000 || size 000000000019a000.
6669.627:0020:0024:trace:vkd3d-proton:vkd3d_address_binding_callback: UNBIND || VkBuffer || VA ffff800101600000 || size 0000000001000000.
6669.627:0020:0024:trace:vkd3d-proton:vkd3d_address_binding_callback: UNBIND || VkDevice || VA ffff800101600000 || size 0000000001000000.
6669.627:0020:0024:trace:vkd3d-proton:vkd3d_address_binding_callback: BIND || VkBuffer || VA ffff800101600000 || size 0000000001000000.
6669.627:0020:0024:trace:vkd3d-proton:vkd3d_address_binding_callback: UNBIND || VkBuffer || VA ffff800101600000 || size 0000000001000000.
6669.627:0020:0024:trace:vkd3d-proton:vkd3d_address_binding_callback: UNBIND || VkDevice || VA ffff800101600000 || size 0000000001000000
```
after:
```
vkd3d-proton % WINEDLLOVERRIDES="d3d12=n;d3d12core=n" \
VKD3D_TEST_FILTER=create_placed_resource_size \
VKD3D_CONFIG=fault VKD3D_DEBUG=trace \
~/build/wine/wine ./tests/d3d12.exe 2>&1 | grep vkd3d_address_binding_callback
4015.597:0020:0024:trace:vkd3d-proton:vkd3d_address_binding_callback: BIND || VkDevice || VA ffff800101600000 || size 0000000001000000.
4015.597:0020:0024:trace:vkd3d-proton:vkd3d_address_binding_callback: BIND || VkBuffer || VA ffff800101600000 || size 0000000001000000.
4015.597:0020:0024:trace:vkd3d-proton:vkd3d_address_binding_callback: BIND || VkImage || VA ffff800101600000 || size 000000000019a000.
4015.597:0020:0024:trace:vkd3d-proton:vkd3d_address_binding_callback: UNBIND || VkImage || VA ffff800101600000 || size 000000000019a000.
4015.597:0020:0024:trace:vkd3d-proton:vkd3d_address_binding_callback: UNBIND || VkBuffer || VA ffff800101600000 || size 0000000001000000.
4015.597:0020:0024:trace:vkd3d-proton:vkd3d_address_binding_callback: UNBIND || VkDevice || VA ffff800101600000 || size 0000000001000000.
4015.597:0020:0024:trace:vkd3d-proton:vkd3d_address_binding_callback: BIND || VkDevice || VA ffff800101600000 || size 0000000001000000.
4015.597:0020:0024:trace:vkd3d-proton:vkd3d_address_binding_callback: BIND || VkBuffer || VA ffff800101600000 || size 0000000001000000.
4015.597:0020:0024:trace:vkd3d-proton:vkd3d_address_binding_callback: UNBIND || VkBuffer || VA ffff800101600000 || size 0000000001000000.
4015.597:0020:0024:trace:vkd3d-proton:vkd3d_address_binding_callback: UNBIND || VkDevice || VA ffff800101600000 || size 0000000001000000.
```
[The spec guarantees](https://registry.khronos.org/vulkan/specs/1.3-extensions/html/v… the following:
> An application can receive multiple callbacks if multiple VkDebugUtilsMessengerEXT objects are created. A callback will always be executed in the same thread as the originating Vulkan call.
--
v5: winevulkan: Make device memory wrapper available in callbacks.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5658
On Tue Feb 25 08:50:37 2025 +0000, Joe Souza wrote:
> Hmm. The changes in this merge request should affect only Ctrl-C at a
> /P pause. Otherwise should behave the same. I will look at this later
> today. Thanks.
sorry, my post wasn't 100% clear:
* run cmd with full blown console (./wine wineconsole cmd)
* run 'dir /p /s \\\*'
* pressing any key works (and pages output)
* but ctrl-c doesn't stop dir /p as it should
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7400#note_95858
Current code requires entering a newline character in order to continue past DIR /P prompts. This change allows any key to be pressed instead.
Code to handle this was similar to existing WCMD_pause() so we leveraged that code for this purpose as well. Key to the fix was the removal of ENABLE_LINE_INPUT from the console flags, and ENABLE_PROCESSED_INPUT was added in order to preserve the ability to abort the operation via Ctrl-C.
--
v8: cmd: Allow any key to continue past DIR /P pauses.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7400
```
With GCC 14.2 on Debian 11:
$ i686-w64-mingw32-gcc --version
i686-w64-mingw32-gcc (GCC) 14.2.0
Copyright (C) 2024 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
The following error happens:
In file included from ~/src/wine/dlls/krnl386.exe16/file.c:33:
In function 'lstrcpyA',
inlined from 'GetSystemDirectory16' at ~/src/wine/dlls/krnl386.exe16/file.c:648:9,
inlined from 'get_search_path' at ~/src/wine/dlls/krnl386.exe16/file.c:192:12:
~/src/wine/include/winbase.h:2939:12: error: argument 1 null where non-null expected [-Werror=nonnull]
2939 | return strcpy( dst, src );
| ^~~~~~~~~~~~~~~~~~
In file included from ~/src/wine/dlls/krnl386.exe16/file.c:28:
~/src/wine/include/msvcrt/string.h: In function 'get_search_path':
~/src/wine/include/msvcrt/string.h:53:26: note: in a call to function 'strcpy' declared 'nonnull'
53 | _ACRTIMP char* __cdecl strcpy(char*,const char*);
| ^~~~~~
In function 'lstrcatA',
inlined from 'GetSystemDirectory16' at ~/src/wine/dlls/krnl386.exe16/file.c:649:9,
inlined from 'get_search_path' at ~/src/wine/dlls/krnl386.exe16/file.c:192:12:
~/src/wine/include/winbase.h:2952:12: error: argument 1 null where non-null expected [-Werror=nonnull]
2952 | return strcat( dst, src );
| ^~~~~~~~~~~~~~~~~~
~/src/wine/include/winbase.h:2952:12: note: in a call to built-in function '__builtin_strlen'
(built using --with-mingw and --enable-werror to turn it into an error)
The warning doesn't really matter as get_search_path() calls
GetSystemDirectory16(NULL, 0) to get the size for allocation.
`if (count >= len)` in the latter saves us from ever atempting to
strcpy() onto NULL, but the compiler is not smart enough to figure out
that len will be greater than 0.
This change mimics kernel32's GetSystemDirectoryW().
```
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7421
This should allow the CI to fully pass on this merge request.
If it does, master branch could have CI tests enabled to ensure
any actual broken test caused by a merge request is visible just
by the CI status, and master can also reflect the passing status.
Signed-off-by: Damien Zammit <damien(a)zamaudio.com>
--
v2: test-linux32: Disable broken tests that are already released broken
https://gitlab.winehq.org/wine/wine/-/merge_requests/7410
The current YUV to RGB conversion provides values in studio-range [16-235], but full-range is required [0-255]. As a result, we currently write the value of 16 to represent black, and so we get gray instead.
This MR changes the coefficients used in the conversion so that the resultant output is in full-range. It actually uses two sets of coefficients as these differ between SD and HD.
Also included is a number of Direct Draw 7 tests.
The coefficients used are documented here:
https://learn.microsoft.com/en-us/windows/win32/medfound/recommended-8-bit-…
--
v7: wined3d: Use Microsoft provided coefficients for YUV to RGB conversion.
ddraw/tests: Test yuv to rgb blt in ddraw7.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7324
Tidy Cauldron (2708320), a Unity game, uses EnumWindows() to find the first window in the current
thread and maximizes the window when changing to windowed mode. However, before this patch, the IME
UI window and the DXGI fallback device window are on top of the game window at creation and thus
they could get maximized instead. This causes the game window to lose focus and freeze.
--
v2: dxgi: Move the fallback device window to the bottom at creation.
d3d11/tests: Test that the fallback device window shouldn't be above normal windows at creation.
imm32: Move the IME UI window to the bottom at creation.
imm32/tests: Test that the IME UI window shouldn't be above normal windows at creation.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7381
On Tue Feb 4 14:36:04 2025 +0000, Jacek Caban wrote:
> I think it's because we register it in a wrong way, see
> `HKEY_CLASSES_ROOT\CLSID\{9BA05972-F6A8-11CF-A442-00A0C90A8F39}`. On
> Wine, it contains `InprocServer32` key, while on Windows it uses
> `LocalServer32`. We should probably remove `threading()` attribute from
> `ShellWindows` coclass in `exdisp.idl` and have `.rgs` file in shell
> registering it manually.
Interesting. I'll try using the values from Windows and seeing what it does.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7221#note_95821