Skip to content

[d3d9] Interop: support creating stable-address and stable-layout images#5070

Draft
AlpyneDreams wants to merge 3 commits intodoitsujin:masterfrom
AlpyneDreams:d3d9/interop-images
Draft

[d3d9] Interop: support creating stable-address and stable-layout images#5070
AlpyneDreams wants to merge 3 commits intodoitsujin:masterfrom
AlpyneDreams:d3d9/interop-images

Conversation

@AlpyneDreams
Copy link
Copy Markdown
Contributor

@AlpyneDreams AlpyneDreams commented Jul 4, 2025

One challenge of D3D9 interop is that images can be relocated at any time. DXVK already has a simple solution to this problem, as images can be created with relocation disabled via stable GPU address mode, for shared images. We simply expose a flag in the interop interface for it. This means that there is finally a case where GetVulkanImageInfo can be supported (whereas previously, it was never guaranteed to be safe).

Additionally, dealing with layout transitions can be a challenging part of D3D9 interop. One way to handle it (what I've been using) has been to call GetVulkanImageInfo to check the layout and transition it in your own command buffer if needed. Another way would be to call TransitionTextureLayout. However, DXVK has the ability to automatically transition images to their default layout after each submission, again also for shared images, so this PR exposes that as a flag too. This also helps prevent cases where a clear is deferred until after the next submit, so any deferred clears will be completed by the time the interop user adds commands.

@Blisto91 Blisto91 added the d3d9 label Jul 4, 2025
@AlpyneDreams AlpyneDreams force-pushed the d3d9/interop-images branch from 8f63d4a to 8caae70 Compare July 4, 2025 16:19
@AlpyneDreams AlpyneDreams force-pushed the d3d9/interop-images branch from 8caae70 to 6ab2357 Compare July 12, 2025 00:51
@AlpyneDreams
Copy link
Copy Markdown
Contributor Author

Rebased to 2.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants