Well as you can see it's been broken by https://gitlab.winehq.org/wine/wine/-/merge_requests/11093, and I'm sorry about it but I think it's more of an indication that it's not a good idea to integrate with Wine internal surface details that way.
This was just a bit unfortunately timed... With the ExtEscape version the same change could have been made in the new place instead.
It might be more future proof to integrate through Vulkan, for instance with a Vulkan extension to retrieve a Metal layer from a Vulkan swapchain. Ideally that extension would be an official one, but we could perhaps consider keeping it only in Wine if upstreaming such a Vulkan extension is problematic for some reason.
Yeah I prototyped that approach, but it is a bit annoying for a few reasons... There are already a few Vulkan to Metal extensions, but the exact one we need here does not exist, and having to depend on a specific version of a Vulkan driver to actually make the D3D on Metal implementation possible was met with some pushback. Also, even after upstreaming such an extension, it would still have to be implemented and distributed by the Vulkan to Metal translation layers.
I don't know how this could then work with third party D3D implementations that don't use Vulkan, I'm not sure it can, but I also don't see any way we can support that with current Wine architecture.
I am not entirely sure what is meant with "composited Vulkan swapchains", but if it is related to implementing a compositor in Wine, wouldn't it make more sense to implement this on top of D3D?
Ultimately, and if Metal needs to be a first class citizen we would probably need to have some win32u public interface the same way we have GL and Vulkan, but I don't expect that to be an easy sell.
I actually do also have this version as a draft (and I this would be personally my preferred solution), but as you said maybe a harder sell... I can brush it up and open that as alternative to this MR, if that makes more sense. It adds user driver infrastructure similar to the GL and vulkan drivers and adds a PE winemetal DLL, that for now only exposes the hwnd to metal layer functionality, but could later down the line be a more complete implementation that fully replaces the unix part of DXMT. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/11058#note_143325