Attempt to fix game cooking regression from ef188d06c4
This commit is contained in:
@@ -51,7 +51,7 @@ void GPUTasksContext::Run(GPUTask* task)
|
||||
ASSERT(task != nullptr);
|
||||
|
||||
task->Execute(this);
|
||||
if (task->GetSyncStart() != 0)
|
||||
//if (task->GetSyncStart() != 0)
|
||||
_tasksSyncing.Add(task);
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ protected:
|
||||
CriticalSection _locker;
|
||||
GPUSyncPoint _currentSyncPoint;
|
||||
int32 _totalTasksDoneCount = 0;
|
||||
Array<GPUTask*, InlinedAllocation<64>> _tasksSyncing;
|
||||
Array<GPUTask*> _tasksSyncing;
|
||||
|
||||
public:
|
||||
/// <summary>
|
||||
|
||||
@@ -51,11 +51,12 @@ void GPUTask::Enqueue()
|
||||
void GPUTask::OnCancel()
|
||||
{
|
||||
// Check if task is waiting for sync (very likely situation)
|
||||
if (IsSyncing() && _context)
|
||||
if (IsSyncing())
|
||||
{
|
||||
// Task has been performed but is waiting for a CPU/GPU sync so we have to cancel that
|
||||
_context->OnCancelSync(this);
|
||||
_context = nullptr;
|
||||
SetState(TaskState::Canceled);
|
||||
}
|
||||
|
||||
// Base
|
||||
|
||||
Reference in New Issue
Block a user