LYN-4007 Editor crashes when entering the Game Mode with two Box Shape entities with Game View enabled (#974)

The crash was caused by using gpu query across command lists.
This commit is contained in:
Qing Tao
2021-05-27 13:56:19 -07:00
committed by GitHub
parent 2d562b97c5
commit 85222130d4
4 changed files with 36 additions and 22 deletions
@@ -96,12 +96,6 @@ namespace AZ
return QueryResultCode::Fail;
}
// Limit calling BeginQuery() to the first CommandList in the array.
if (context.GetCommandListIndex() != 0)
{
return QueryResultCode::Success;
}
const auto rhiQueryIndices = GetRhiQueryIndicesFromCurrentFrame();
if (!rhiQueryIndices)
{
@@ -124,12 +118,6 @@ namespace AZ
return QueryResultCode::Fail;
}
// Limit calling EndQuery() to the last CommandList in the array.
if (context.GetCommandListIndex() != context.GetCommandListCount() - 1)
{
return QueryResultCode::Success;
}
// Validate that the queries are recorded for the same scope.
if (m_cachedScopeId != context.GetScopeId())
{