You're breathtaking!
This commit is contained in:
53
Source/Engine/Graphics/Async/GPUTasksExecutor.h
Normal file
53
Source/Engine/Graphics/Async/GPUTasksExecutor.h
Normal file
@@ -0,0 +1,53 @@
|
||||
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "Engine/Core/Object.h"
|
||||
#include "Engine/Core/Collections/Array.h"
|
||||
#include "GPUTasksContext.h"
|
||||
|
||||
class GPUTask;
|
||||
|
||||
/// <summary>
|
||||
/// Describes object responsible for GPU jobs execution scheduling.
|
||||
/// </summary>
|
||||
class GPUTasksExecutor : public Object
|
||||
{
|
||||
protected:
|
||||
|
||||
Array<GPUTasksContext*> _contextList;
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Destructor
|
||||
/// </summary>
|
||||
virtual ~GPUTasksExecutor();
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Sync point event called on begin of the frame
|
||||
/// </summary>
|
||||
virtual void FrameBegin() = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Sync point event called on end of the frame
|
||||
/// </summary>
|
||||
virtual void FrameEnd() = 0;
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Gets the context list.
|
||||
/// </summary>
|
||||
/// <returns>GPU contexts</returns>
|
||||
FORCE_INLINE const Array<GPUTasksContext*>* GetContextList() const
|
||||
{
|
||||
return &_contextList;
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
GPUTasksContext* createContext();
|
||||
};
|
||||
Reference in New Issue
Block a user