On Wed Jun 3 10:18:48 2026 +0000, Marc-Aurel Zent wrote:
``` /* ExtEscape definitions */ enum macdrv_escape_codes { MACDRV_ESCAPE_GET_SURFACE = 6790, MACDRV_ESCAPE_RELEASE_SURFACE, }; struct macdrv_escape_surface { UINT64 surface; UINT64 layer; }; ``` The above would be the "public" API we can't change, and I can't believe this can be made much simpler... Theoretically, we could store a Metal layer to window surface mapping internally, and the consumer only gets the layer, and then later releases the layer, but I am not too sure a 1:1 mapping is always a given there, since the layer is a weak reference...
I see, it's indeed better if doesn't depend on some internal struct, but it still feels quite brittle and difficult to maintain as there's no code user for this API in Wine source. It's then probably up to @julliard if we want to support such private interface. Fwiw I believe there's a precedent in winex11 with some escape codes being used by Gallium Nine, as IIUC it has been broken a couple times and I'm not sure how well we can maintain it in the future either. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/11058#note_142092