I think if we need interop between wrapped/PE side and unwrapped/Unix side objects the safest way would be to use D3DKMT shared resources, either with global or NT handles. We would need to add DMA-BUF support to `d3dkmt_create_resource`,
Sure. I'm not convinced the extra work is worth the risk of VkImage being wrapped though. I can't imagine any reason why it would be.
or allocate a temporary unix-only Vulkan image + memory and export it back as opaque fd, and expose the D3DKMT function.
That would require an unnecessary extra copy.
Also, as you say we might want to skip the blit later on, and share the resource directly, it seems to me that there's a lot of synchronization aspects that simply will require a proper shared resource, so IMO might be better to investigate that way already.
I don't know what you mean by this, but VA synchronization is implicit; there's nothing we will need to do there. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/11535#note_147700