| 19 | } |
| 20 | |
| 21 | void DefaultGPUTasksExecutor::FrameBegin() |
| 22 | { |
| 23 | PROFILE_CPU(); |
| 24 | |
| 25 | // Ensure to have valid async context |
| 26 | if (_context == nullptr) |
| 27 | _context = createContext(); |
| 28 | |
| 29 | _context->OnFrameBegin(); |
| 30 | |
| 31 | // Default implementation performs async operations on start of the frame which is synchronized with a rendering thread |
| 32 | GPUTask* buffer[32]; |
| 33 | const int32 count = GPUDevice::Instance->GetTasksManager()->RequestWork(buffer, 32); |
| 34 | if (count == 0) |
| 35 | return; |
| 36 | GPUMemoryPass pass(_context->GPU); |
| 37 | for (int32 i = 0; i < count; i++) |
| 38 | { |
| 39 | _context->Run(buffer[i]); |
| 40 | } |
| 41 | } |
| 42 | |
| 43 | void DefaultGPUTasksExecutor::FrameEnd() |
| 44 | { |
nothing calls this directly
no test coverage detected