| 49 | } |
| 50 | |
| 51 | void GPUTask::OnCancel() |
| 52 | { |
| 53 | // Check if task is waiting for sync (very likely situation) |
| 54 | if (IsSyncing()) |
| 55 | { |
| 56 | // Task has been performed but is waiting for a CPU/GPU sync so we have to cancel that |
| 57 | _context->OnCancelSync(this); |
| 58 | _context = nullptr; |
| 59 | SetState(TaskState::Canceled); |
| 60 | } |
| 61 | |
| 62 | // Base |
| 63 | Task::OnCancel(); |
| 64 | } |
| 65 | |
| 66 | GPUTasksManager::GPUTasksManager() |
| 67 | { |
nothing calls this directly
no test coverage detected