MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / FrameBegin

Method FrameBegin

Source/Engine/Graphics/Async/DefaultGPUTasksExecutor.cpp:21–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19}
20
21void 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
43void DefaultGPUTasksExecutor::FrameEnd()
44{

Callers

nothing calls this directly

Calls 4

OnFrameBeginMethod · 0.80
RequestWorkMethod · 0.80
GetTasksManagerMethod · 0.80
RunMethod · 0.45

Tested by

no test coverage detected