Optimize GPU textures and buffers uploads with a batched memory barrier
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#include "GPUTask.h"
|
||||
#include "GPUTasksManager.h"
|
||||
#include "Engine/Graphics/GPUDevice.h"
|
||||
#include "Engine/Graphics/GPUPass.h"
|
||||
#include "Engine/Profiler/ProfilerCPU.h"
|
||||
|
||||
DefaultGPUTasksExecutor::DefaultGPUTasksExecutor()
|
||||
@@ -30,6 +31,9 @@ void DefaultGPUTasksExecutor::FrameBegin()
|
||||
// Default implementation performs async operations on start of the frame which is synchronized with a rendering thread
|
||||
GPUTask* buffer[32];
|
||||
const int32 count = GPUDevice::Instance->GetTasksManager()->RequestWork(buffer, 32);
|
||||
if (count == 0)
|
||||
return;
|
||||
GPUMemoryPass pass(_context->GPU);
|
||||
for (int32 i = 0; i < count; i++)
|
||||
{
|
||||
_context->Run(buffer[i]);
|
||||
|
||||
Reference in New Issue
Block a user