MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / ~GPUTasksContext

Method ~GPUTasksContext

Source/Engine/Graphics/Async/GPUTasksContext.cpp:26–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24}
25
26GPUTasksContext::~GPUTasksContext()
27{
28 ASSERT(IsInMainThread());
29
30 // Cancel jobs to sync
31 auto tasks = _tasksSyncing;
32 _tasksSyncing.Clear();
33 for (int32 i = 0; i < tasks.Count(); i++)
34 {
35 auto task = tasks[i];
36 if (task->GetSyncPoint() <= _currentSyncPoint && task->GetState() != TaskState::Finished)
37 {
38 if (!Engine::IsRequestingExit)
39 LOG(Warning, "'{0}' has been canceled before a sync", task->ToString());
40 task->CancelSync();
41 }
42 }
43
44#if GPU_TASKS_USE_DEDICATED_CONTEXT
45 SAFE_DELETE(GPU);
46#endif
47}
48
49void GPUTasksContext::Run(GPUTask* task)
50{

Callers

nothing calls this directly

Calls 7

IsInMainThreadFunction · 0.85
CancelSyncMethod · 0.80
ClearMethod · 0.45
CountMethod · 0.45
GetSyncPointMethod · 0.45
GetStateMethod · 0.45
ToStringMethod · 0.45

Tested by

no test coverage detected