Attempt to fix game cooking regression from ef188d06c4

This commit is contained in:
Wojtek Figat
2025-04-22 23:44:34 +02:00
parent 992b08025f
commit f0bcc70563
3 changed files with 4 additions and 3 deletions

View File

@@ -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);
}

View File

@@ -18,7 +18,7 @@ protected:
CriticalSection _locker;
GPUSyncPoint _currentSyncPoint;
int32 _totalTasksDoneCount = 0;
Array<GPUTask*, InlinedAllocation<64>> _tasksSyncing;
Array<GPUTask*> _tasksSyncing;
public:
/// <summary>

View File

@@ -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