On Tue Apr 21 17:57:50 2026 +0000, Charlotte Pabst wrote:
This is the intent, yes. My understanding is that D3D12_FENCE_FLAG_SHARED enables cross-ID3D12Device usage of the fence. It seems like the test still passes as is however - I'm unsure why. Hmm, that's puzzling. I looked around on the internet, and there isn't much, but the only traces I could find is that `D3D12_FENCE_FLAG_SHARED` allows you to use `CreateSharedHandle()` and `OpenSharedHandle()` on that thing, something you're not doing anyway. I can't see any trace of the fact that it allows using a fence object itself sharing it between two different devices.
[However I did some tests](https://gitlab.winehq.org/giomasce/wine/-/commit/b0ec97e668e93de98c1cdb031ff...), and that seems to work anyway, even between two different adaptors, even without the flag, and it doesn't trigger any validation error. Of course it might be that it works by chance and the validation layer just doesn't catch that. All in all I don't really know what to think. My feeling is that the flag is irrelevant for correctness (either this is fine even without the flags, or it's not good even with the flag). OTOH there's still wide room to belive I'm not correct and using the flag anyway is safer, even if likely less performant. I won't take a hard stance here. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/9777#note_137323