Conversation
This get's rid of the config-specific sub-directories when using VS generators.
This only happens when ending a render pass that draws directly to a swap-chain back buffer. I reported this to MSFT using discord and they are investigating. Since all barriers of the app are now new enhanced barriers, we should be safe to ignore this error in the long run.
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.
Describe the pull request
This PR changes the barrier interface to make them more flexible to use. This is enabled by the enhanced barrier for DirectX 12, provided by the Agility SDK introduced in #95.
Barriers have been completely re-worked and now support more granular control over synchronization. The old
ResourceStatehas been removed and got replaced by three new enumerations:PipelineStageis a flag set that controls the pipeline stages to block.ResourceAccessis a flag set that controls the access mode to allow/deny.ImageLayoutdefines the different possible layouts for textures.Note that the combinations of those enumerations in a barrier are not arbitrary, but follow rules. When debugging barriers, it is advised to use validation layers to ensure conformity for the target backend(s).
A barrier is always initialized with one or more
PipelineStages to wait for and to continue with. The builder interface makes this easier to read:A barrier in LiteFX is a actually a set of multiple barriers in the individual backends, which share common wait/continue stages. Apart from that, it can contain any number and combination of the following three barrier types:
ResourceAccess, until anotherResourceAccesshas finished. If possible, you should always block individual resources, since this may introduce unnecessary stalls. A global barrier is inserted by callingwaiton the barrier object or usingblockAccessTowithout any resource on the builder interface.ResourceAccessproperties. Note that there's an overload, that takes a sub-resource (i.e. an element index in an array buffer). However, due to API support, this is reserved and effectively also blocks the whole buffer.ImageLayoutin the input. This supports scenarios, where external synchronization appears or implicit layout changes are happening, that cannot be tracked. Apart from that, you should avoid those overloads.Image or buffer barriers are inserted by calling any of the
transitionoverloads on the barrier or the respectiveblockAccessToon the builder. Note that a barrier without a wait or transition instruction will no-op and is not submitted to a command buffer.Here's a more complete example of a barrier built through the new builder interface:
Related issues
Known issues
When not using multi-sampling, the renderer draws directly into the swap chain back buffer. In the DirectX 12 back-end, this causes the transition barrier from
RenderTargettoPresentlayout to raise an validation error about an invalid legacy resource state. The error is described in detail in this repository. Since I do believe that this is a false-positive and all barriers are now using the enhanced barrier feature, this error is explicitly suppressed in the info queue as a (hopefully temporary) workaround.