[d3d9] Interop: support creating stable-address and stable-layout images#5070
Draft
AlpyneDreams wants to merge 3 commits intodoitsujin:masterfrom
Draft
[d3d9] Interop: support creating stable-address and stable-layout images#5070AlpyneDreams wants to merge 3 commits intodoitsujin:masterfrom
AlpyneDreams wants to merge 3 commits intodoitsujin:masterfrom
Conversation
8f63d4a to
8caae70
Compare
The only thing this flag affects is whether the image is shared.
8caae70 to
6ab2357
Compare
Contributor
Author
|
Rebased to 2.7 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
GetVulkanImageInfocan 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
GetVulkanImageInfoto check the layout and transition it in your own command buffer if needed. Another way would be to callTransitionTextureLayout. 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.