Open IvanPopov opened 2 years ago
Shared resource states are only used on resources that are "simultaneous access." For these resources, states "decay" to COMMON
at the end of every ExecuteCommandLists
group. A shared state means that no barriers have actually been issued, but the resource has been read from in a "promotable" way. So, no, I don't think anything is missing here.
https://github.com/microsoft/D3D12TranslationLayer/blob/4a4b40d9c91a9ac8ef728a6e1254c896895c2d43/src/ResourceState.cpp#L105
Most of the time, resources are exclusive and they make the transition on first use to another queue, tipically during PostSubmitUpdateState() -> SetSharedResourceState(). Does I undertand right that we have to copy actual exclusive state to shared in order to be sure that next transition as shared resource will be with correct state "before" ?