Fixed pass warning in ASV
Signed-off-by: antonmic <56370189+antonmic@users.noreply.github.com>
This commit is contained in:
@@ -43,6 +43,9 @@ namespace AZ
|
||||
// Rendering -> Idle
|
||||
// -> Queued (Rendering will transition to Queued if a pass was queued with the PassSystem during Rendering)
|
||||
//
|
||||
// Any State -> Orphaned (transition to Orphaned state can be outside the jurisdiction of the pass and so can happen from any state)
|
||||
// Orphaned -> Queued (Orphaned state transitions back to idle.
|
||||
//
|
||||
enum class PassState : u8
|
||||
{
|
||||
// Default value, you should only ever see this in the Pass constructor
|
||||
@@ -92,7 +95,10 @@ namespace AZ
|
||||
// |
|
||||
// V
|
||||
// Pass is currently rendering. Pass must be in Idle state before entering this state
|
||||
Rendering
|
||||
Rendering,
|
||||
|
||||
// Special state: Orphaned State, pass was removed from it's parent and is awaiting deletion
|
||||
Orphaned
|
||||
};
|
||||
|
||||
// This enum keeps track of what actions the pass is queued for with the pass system
|
||||
|
||||
@@ -147,6 +147,11 @@ namespace AZ
|
||||
m_treeDepth = m_parent->m_treeDepth + 1;
|
||||
m_path = ConcatPassName(m_parent->m_path, m_name);
|
||||
m_flags.m_partOfHierarchy = m_parent->m_flags.m_partOfHierarchy;
|
||||
|
||||
if (m_state == PassState::Orphaned)
|
||||
{
|
||||
QueueForBuildAndInitialization();
|
||||
}
|
||||
}
|
||||
|
||||
void Pass::RemoveFromParent()
|
||||
@@ -154,7 +159,7 @@ namespace AZ
|
||||
AZ_RPI_PASS_ASSERT(m_parent != nullptr, "Trying to remove pass from parent but pointer to the parent pass is null.");
|
||||
m_parent->RemoveChild(Ptr<Pass>(this));
|
||||
m_queueState = PassQueueState::NoQueue;
|
||||
m_state = PassState::Idle;
|
||||
m_state = PassState::Orphaned;
|
||||
}
|
||||
|
||||
void Pass::OnOrphan()
|
||||
@@ -162,6 +167,8 @@ namespace AZ
|
||||
m_parent = nullptr;
|
||||
m_flags.m_partOfHierarchy = false;
|
||||
m_treeDepth = 0;
|
||||
m_queueState = PassQueueState::NoQueue;
|
||||
m_state = PassState::Orphaned;
|
||||
}
|
||||
|
||||
// --- Getters & Setters ---
|
||||
|
||||
Reference in New Issue
Block a user